* drivers/scsi/ipr.c:4209:61-62: WARNING opportunity for kobj_to_dev()
@ 2021-07-05 11:59 kernel test robot
2021-07-05 11:59 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-07-05 11:59 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a180bd1d7e16173d965b263c5a536aa40afa2a2a
commit: a2fc3718bc22e85378085568ecc5765fb28cabce coccinelle: api: add kobj_to_dev.cocci script
date: 11 months ago
:::::: branch date: 13 hours ago
:::::: commit date: 11 months ago
config: i386-randconfig-c001-20210705 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> drivers/scsi/ipr.c:4209:61-62: WARNING opportunity for kobj_to_dev()
drivers/scsi/ipr.c:4185:61-62: WARNING opportunity for kobj_to_dev()
drivers/scsi/ipr.c:4268:61-62: WARNING opportunity for kobj_to_dev()
drivers/scsi/ipr.c:3459:60-61: WARNING opportunity for kobj_to_dev()
drivers/scsi/ipr.c:4457:61-62: WARNING opportunity for kobj_to_dev()
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 40687 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings 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 ` kernel test robot 0 siblings, 0 replies; 3+ messages in thread From: kernel test robot @ 2021-07-05 11:59 UTC (permalink / raw) To: kbuild [-- Attachment #1: Type: text/plain, Size: 3640 bytes --] CC: kbuild-all(a)lists.01.org CC: linux-kernel(a)vger.kernel.org TO: Denis Efremov <efremov@linux.com> CC: Julia Lawall <Julia.Lawall@lip6.fr> CC: Brian King <brking@us.ibm.com> CC: "James E.J. Bottomley" <jejb@linux.ibm.com> CC: "Martin K. Petersen" <martin.petersen@oracle.com> CC: linux-scsi(a)vger.kernel.org CC: linux-kernel(a)vger.kernel.org From: kernel test robot <lkp@intel.com> drivers/scsi/ipr.c:4209:61-62: WARNING opportunity for kobj_to_dev() drivers/scsi/ipr.c:4185:61-62: WARNING opportunity for kobj_to_dev() drivers/scsi/ipr.c:4268:61-62: WARNING opportunity for kobj_to_dev() drivers/scsi/ipr.c:3459:60-61: WARNING opportunity for kobj_to_dev() drivers/scsi/ipr.c:4457: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> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: kernel test robot <lkp@intel.com> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: a180bd1d7e16173d965b263c5a536aa40afa2a2a commit: a2fc3718bc22e85378085568ecc5765fb28cabce coccinelle: api: add kobj_to_dev.cocci script :::::: branch date: 13 hours ago :::::: commit date: 11 months ago Please take the patch only if it's a positive warning. Thanks! ipr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -3456,7 +3456,7 @@ static ssize_t ipr_read_trace(struct fil 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 ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; unsigned long lock_flags = 0; @@ -4182,7 +4182,7 @@ static ssize_t ipr_read_async_err_log(st struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) { - struct device *cdev = container_of(kobj, struct device, kobj); + struct device *cdev = kobj_to_dev(kobj); struct Scsi_Host *shost = class_to_shost(cdev); struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; struct ipr_hostrcb *hostrcb; @@ -4206,7 +4206,7 @@ static ssize_t ipr_next_async_err_log(st struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) { - struct device *cdev = container_of(kobj, struct device, kobj); + struct device *cdev = kobj_to_dev(kobj); struct Scsi_Host *shost = class_to_shost(cdev); struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; struct ipr_hostrcb *hostrcb; @@ -4265,7 +4265,7 @@ static ssize_t ipr_read_dump(struct file struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) { - struct device *cdev = container_of(kobj, struct device, kobj); + struct device *cdev = kobj_to_dev(kobj); struct Scsi_Host *shost = class_to_shost(cdev); struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; struct ipr_dump *dump; @@ -4454,7 +4454,7 @@ static ssize_t ipr_write_dump(struct fil struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) { - struct device *cdev = container_of(kobj, struct device, kobj); + struct device *cdev = kobj_to_dev(kobj); struct Scsi_Host *shost = class_to_shost(cdev); struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata; int rc; ^ permalink raw reply [flat|nested] 3+ messages in thread
* drivers/scsi/ipr.c:4209:61-62: WARNING opportunity for kobj_to_dev()
@ 2021-03-31 20:25 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-03-31 20:25 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1308 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5e46d1b78a03d52306f21f77a4e4a144b6d31486
commit: a2fc3718bc22e85378085568ecc5765fb28cabce coccinelle: api: add kobj_to_dev.cocci script
date: 7 months ago
:::::: branch date: 23 hours ago
:::::: commit date: 7 months ago
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> drivers/scsi/ipr.c:4209:61-62: WARNING opportunity for kobj_to_dev()
drivers/scsi/ipr.c:4185:61-62: WARNING opportunity for kobj_to_dev()
drivers/scsi/ipr.c:4268:61-62: WARNING opportunity for kobj_to_dev()
drivers/scsi/ipr.c:3459:60-61: WARNING opportunity for kobj_to_dev()
drivers/scsi/ipr.c:4457:61-62: WARNING opportunity for kobj_to_dev()
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 63574 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in threadend of thread, other threads:[~2021-07-05 11:59 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 -- strict thread matches above, loose matches on Subject: below -- 2021-03-31 20:25 drivers/scsi/ipr.c:4209:61-62: WARNING opportunity for kobj_to_dev() kernel test robot
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.