* drivers/mfd/lm3533-core.c:361:60-61: WARNING opportunity for kobj_to_dev()
@ 2020-12-20 11:36 kernel test robot
2020-12-20 11:36 ` [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings kernel test robot
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2020-12-20 11:36 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1034 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: 467f8165a2b0e6accf3d0dd9c8089b1dbde29f7f
commit: a2fc3718bc22e85378085568ecc5765fb28cabce coccinelle: api: add kobj_to_dev.cocci script
date: 4 months ago
:::::: branch date: 15 hours ago
:::::: commit date: 4 months ago
config: c6x-randconfig-c004-20201219 (attached as .config)
compiler: c6x-elf-gcc (GCC) 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>
"coccinelle warnings: (new ones prefixed by >>)"
>> drivers/mfd/lm3533-core.c:361:60-61: 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: 20297 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings
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 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-12-20 11:36 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1625 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: Lee Jones <lee.jones@linaro.org>
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
drivers/mfd/lm3533-core.c:361:60-61: 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: 467f8165a2b0e6accf3d0dd9c8089b1dbde29f7f
commit: a2fc3718bc22e85378085568ecc5765fb28cabce coccinelle: api: add kobj_to_dev.cocci script
:::::: branch date: 15 hours ago
:::::: commit date: 4 months ago
Please take the patch only if it's a positive warning. Thanks!
lm3533-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/mfd/lm3533-core.c
+++ b/drivers/mfd/lm3533-core.c
@@ -358,7 +358,7 @@ static struct attribute *lm3533_attribut
static umode_t lm3533_attr_is_visible(struct kobject *kobj,
struct attribute *attr, int n)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct lm3533 *lm3533 = dev_get_drvdata(dev);
struct device_attribute *dattr = to_dev_attr(attr);
struct lm3533_device_attribute *lattr = to_lm3533_dev_attr(dattr);
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/mfd/lm3533-core.c:361:60-61: WARNING opportunity for kobj_to_dev()
@ 2020-12-21 6:38 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-12-21 6:38 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1034 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: 467f8165a2b0e6accf3d0dd9c8089b1dbde29f7f
commit: a2fc3718bc22e85378085568ecc5765fb28cabce coccinelle: api: add kobj_to_dev.cocci script
date: 4 months ago
:::::: branch date: 34 hours ago
:::::: commit date: 4 months ago
config: c6x-randconfig-c004-20201219 (attached as .config)
compiler: c6x-elf-gcc (GCC) 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>
"coccinelle warnings: (new ones prefixed by >>)"
>> drivers/mfd/lm3533-core.c:361:60-61: 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: 20297 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/mfd/lm3533-core.c:361:60-61: WARNING opportunity for kobj_to_dev()
@ 2020-12-21 6:39 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-12-21 6:39 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1034 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: 467f8165a2b0e6accf3d0dd9c8089b1dbde29f7f
commit: a2fc3718bc22e85378085568ecc5765fb28cabce coccinelle: api: add kobj_to_dev.cocci script
date: 4 months ago
:::::: branch date: 34 hours ago
:::::: commit date: 4 months ago
config: c6x-randconfig-c004-20201219 (attached as .config)
compiler: c6x-elf-gcc (GCC) 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>
"coccinelle warnings: (new ones prefixed by >>)"
>> drivers/mfd/lm3533-core.c:361:60-61: 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: 20297 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-21 6:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
-- strict thread matches above, loose matches on Subject: below --
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:39 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.