From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings
Date: Fri, 02 Oct 2020 23:06:21 +0800 [thread overview]
Message-ID: <20201002150621.GA25748@8cbb73b479b5> (raw)
In-Reply-To: <202010022336.F4IlTzZV-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 4197 bytes --]
CC: kbuild-all(a)lists.01.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Lee Duncan <lduncan@suse.com>
CC: Chris Leech <cleech@redhat.com>
CC: "James E.J. Bottomley" <jejb@linux.ibm.com>
CC: "Martin K. Petersen" <martin.petersen@oracle.com>
CC: open-iscsi(a)googlegroups.com
CC: linux-scsi(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
drivers/scsi/scsi_transport_iscsi.c:4041:61-62: WARNING opportunity for kobj_to_dev()
drivers/scsi/scsi_transport_iscsi.c:1128:60-61: WARNING opportunity for kobj_to_dev()
drivers/scsi/scsi_transport_iscsi.c:926:60-61: WARNING opportunity for kobj_to_dev()
drivers/scsi/scsi_transport_iscsi.c:4454:61-62: WARNING opportunity for kobj_to_dev()
drivers/scsi/scsi_transport_iscsi.c:436:60-61: WARNING opportunity for kobj_to_dev()
drivers/scsi/scsi_transport_iscsi.c:4310:61-62: WARNING opportunity for kobj_to_dev()
Use kobj_to_dev() instead of container_of()
Generated by: scripts/coccinelle/api/kobj_to_dev.cocci
Fixes: a2fc3718bc22 ("coccinelle: api: add kobj_to_dev.cocci script")
CC: Denis Efremov <efremov@linux.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux.git for-5.10
head: 44d8870f21529cfa8f50b503b5d949c6d46e6fc1
commit: a2fc3718bc22e85378085568ecc5765fb28cabce [3/10] coccinelle: api: add kobj_to_dev.cocci script
:::::: branch date: 19 hours ago
:::::: commit date: 6 weeks ago
Please take the patch only if it's a positive warning. Thanks!
scsi_transport_iscsi.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -433,7 +433,7 @@ iscsi_iface_attr(iface, initiator_name,
static umode_t iscsi_iface_attr_is_visible(struct kobject *kobj,
struct attribute *attr, int i)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct iscsi_iface *iface = iscsi_dev_to_iface(dev);
struct iscsi_transport *t = iface->transport;
int param;
@@ -923,7 +923,7 @@ static umode_t iscsi_flashnode_sess_attr
struct attribute *attr,
int i)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct iscsi_bus_flash_session *fnode_sess =
iscsi_dev_to_flash_session(dev);
struct iscsi_transport *t = fnode_sess->transport;
@@ -1125,7 +1125,7 @@ static umode_t iscsi_flashnode_conn_attr
struct attribute *attr,
int i)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct iscsi_bus_flash_conn *fnode_conn = iscsi_dev_to_flash_conn(dev);
struct iscsi_transport *t = fnode_conn->transport;
int param;
@@ -4038,7 +4038,7 @@ static struct attribute *iscsi_conn_attr
static umode_t iscsi_conn_attr_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 iscsi_cls_conn *conn = transport_class_to_conn(cdev);
struct iscsi_transport *t = conn->transport;
int param;
@@ -4307,7 +4307,7 @@ static struct attribute *iscsi_session_a
static umode_t iscsi_session_attr_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 iscsi_cls_session *session = transport_class_to_session(cdev);
struct iscsi_transport *t = session->transport;
int param;
@@ -4451,7 +4451,7 @@ static struct attribute *iscsi_host_attr
static umode_t iscsi_host_attr_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_Host *shost = transport_class_to_shost(cdev);
struct iscsi_internal *priv = to_iscsi_internal(shost->transportt);
int param;
next prev parent reply other threads:[~2020-10-02 15:06 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-02 15:06 [jlawall:for-5.10 3/10] drivers/nvme/host/core.c:3646:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-10-02 15:06 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-10-02 15:06 ` kernel test robot
2020-10-02 15:06 ` kernel test robot
2020-10-02 15:06 ` kernel test robot
2020-10-02 15:06 ` kernel test robot
2020-10-02 15:06 ` kernel test robot
2020-10-02 15:06 ` kernel test robot
2020-10-02 15:06 ` kernel test robot [this message]
2020-10-02 15:06 ` kernel test robot
2020-10-02 15:06 ` kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-07-05 11:59 drivers/scsi/ipr.c:4209:61-62: WARNING opportunity for kobj_to_dev() kernel test robot
2021-07-05 11:59 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2021-04-03 0:10 drivers/nvdimm/region_devs.c:762:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2021-04-03 0:10 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2021-03-31 20:25 drivers/scsi/ipr.c:4209:61-62: WARNING opportunity for kobj_to_dev() kernel test robot
2021-03-31 20:25 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2021-03-16 22:20 drivers/platform/x86/asus-laptop.c:1572:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2021-03-16 22:21 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2021-03-10 0:31 drivers/input/misc/ims-pcu.c:1231:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2021-03-10 0:31 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2021-03-10 0:31 ` kernel test robot
2021-01-08 9:40 drivers/nvdimm/namespace_devs.c:1626:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2021-01-08 9:40 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2021-01-01 9:01 drivers/platform/x86/ideapad-laptop.c:522:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2021-01-01 9:01 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-12-21 6:39 drivers/mfd/lm3533-core.c:361:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-12-21 6:39 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-12-21 6:38 drivers/mfd/lm3533-core.c:361:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-12-21 6:38 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-12-20 11:36 drivers/mfd/lm3533-core.c:361:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-12-20 11:36 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-12-15 9:25 drivers/nvdimm/namespace_devs.c:1626:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-12-15 9:25 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-12-10 5:15 drivers/scsi/esas2r/esas2r_main.c:62:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-12-10 5:15 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-12-03 1:10 drivers/scsi/3w-sas.c:102:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-12-03 1:10 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-11-23 22:20 drivers/scsi/scsi_transport_spi.c:1460:61-62: WARNING opportunity for kobj_to_dev() kernel test robot
2020-11-23 22:20 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-11-20 11:00 drivers/scsi/scsi_transport_iscsi.c:4041:61-62: WARNING opportunity for kobj_to_dev() kernel test robot
2020-11-20 11:00 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-11-16 13:14 drivers/nvdimm/namespace_devs.c:1626:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-11-16 13:14 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-11-13 8:52 drivers/hwmon/pwm-fan.c:150:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-11-13 8:52 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-11-11 9:50 drivers/nvme/host/lightnvm.c:1244:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-11-11 9:50 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-09-28 2:40 [jlawall:for-5.10 3/9] drivers/block/virtio_blk.c:634:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-09-28 2:40 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-09-01 9:46 [jlawall:for-5.10 3/4] drivers/iio/adc/adi-axi-adc.c:279:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-09-01 9:46 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-09-01 9:46 ` kernel test robot
2020-09-01 9:46 ` kernel test robot
2020-09-01 9:46 ` kernel test robot
2020-09-01 9:46 ` kernel test robot
2020-09-01 9:46 ` kernel test robot
2020-09-01 9:46 ` kernel test robot
2020-09-01 9:46 ` kernel test robot
2020-09-01 9:46 ` kernel test robot
2020-09-01 9:46 ` kernel test robot
2020-09-01 9:46 ` kernel test robot
2020-09-01 9:46 ` kernel test robot
2020-08-27 20:13 Julia Lawall
2020-08-27 20:13 ` Julia Lawall
2020-08-27 20:13 ` Julia Lawall
2020-08-27 22:24 ` Jens Axboe
2020-08-27 22:24 ` Jens Axboe
2020-08-27 17:03 Markus Elfring
2020-08-27 20:05 ` Julia Lawall
2020-08-27 20:05 ` Julia Lawall
2020-08-27 20:05 ` Julia Lawall
2020-08-27 20:05 ` Julia Lawall
2020-08-28 16:52 ` Markus Elfring
2020-08-28 16:52 ` Markus Elfring
2020-08-26 23:27 [jlawall:for-5.10 3/3] drivers/scsi/3w-sas.c:102:60-61: WARNING opportunity for kobj_to_dev() kernel test robot
2020-08-26 23:27 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
2020-08-26 23:27 ` kernel test robot
2020-08-26 23:27 ` kernel test robot
2020-08-26 23:27 ` kernel test robot
2020-08-26 23:27 ` kernel test robot
2020-08-26 23:27 ` kernel test robot
[not found] <CGME20200826205412eucas1p16c748e9d73f4cd924aae1d6386ab450c@eucas1p1.samsung.com>
2020-08-26 20:54 ` Julia Lawall
2020-08-26 20:54 ` Julia Lawall
2020-08-26 20:54 ` Julia Lawall
2020-08-26 20:54 ` Julia Lawall
2020-09-08 11:37 ` Bartlomiej Zolnierkiewicz
2020-09-08 11:37 ` Bartlomiej Zolnierkiewicz
2020-09-08 11:37 ` Bartlomiej Zolnierkiewicz
2020-09-08 11:37 ` Bartlomiej Zolnierkiewicz
2020-08-26 19:51 [jlawall:for-5.10 3/3] drivers/video/fbdev/udlfb.c:1460:62-63: WARNING opportunity for kobj_to_dev() kernel test robot
2020-08-26 19:51 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201002150621.GA25748@8cbb73b479b5 \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.