[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1614589229-52170-1-git-send-email-yang.lee@linux.alibaba.com>
Date: Mon, 1 Mar 2021 17:00:29 +0800
From: Yang Li <yang.lee@...ux.alibaba.com>
To: martin.petersen@...cle.com
Cc: jejb@...ux.ibm.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org, Yang Li <yang.lee@...ux.alibaba.com>
Subject: [PATCH] scsi: scsi_transport_spi: Switch to using the new API kobj_to_dev()
fixed the following coccicheck:
./drivers/scsi/scsi_transport_spi.c:1471:61-62: WARNING opportunity for
kobj_to_dev()
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
---
drivers/scsi/scsi_transport_spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c
index c37dd15..6ea5635 100644
--- a/drivers/scsi/scsi_transport_spi.c
+++ b/drivers/scsi/scsi_transport_spi.c
@@ -1468,7 +1468,7 @@ static int spi_host_configure(struct transport_container *tc,
static umode_t target_attribute_is_visible(struct kobject *kobj,
struct attribute *attr, int i)
{
- struct device *cdev = container_of(kobj, struct device, kobj);
+ struct device *cdev = kobj_to_dev(kobj);
struct scsi_target *starget = transport_class_to_starget(cdev);
struct Scsi_Host *shost = transport_class_to_shost(cdev);
struct spi_internal *si = to_spi_internal(shost->transportt);
--
1.8.3.1
Powered by blists - more mailing lists