summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ibmvscsi/ibmvfc.c
diff options
context:
space:
mode:
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>2021-03-04 10:28:44 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2021-03-10 05:47:17 +0100
commit18c2a59a419009601d09c13e0ee8e5be826a95d8 (patch)
treee2420d07f864df3a348666c8ba1897b0748a275b /drivers/scsi/ibmvscsi/ibmvfc.c
parentscsi: ufs: Remove duplicate include in ufshcd (diff)
downloadlinux-18c2a59a419009601d09c13e0ee8e5be826a95d8.tar.xz
linux-18c2a59a419009601d09c13e0ee8e5be826a95d8.zip
scsi: ibmvfc: Switch to using kobj_to_dev()
Fix the following coccicheck warnings: ./drivers/scsi/ibmvscsi/ibmvfc.c:3483:60-61: WARNING opportunity for kobj_to_dev(). Link: https://lore.kernel.org/r/1614850124-54111-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot <abaci@linux.alibaba.com> Acked-by: Tyrel Datwyler <tyreld@linux.ibm.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ibmvscsi/ibmvfc.c')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvfc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index 755313b766b9..e5f1ca70faf9 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -3480,7 +3480,7 @@ static ssize_t ibmvfc_read_trace(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t count)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct Scsi_Host *shost = class_to_shost(dev);
struct ibmvfc_host *vhost = shost_priv(shost);
unsigned long flags = 0;