* [PATCH] mfd: lm3533: Switch to using the new API kobj_to_dev()
@ 2021-02-23 9:42 Yang Li
2021-03-09 14:46 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2021-02-23 9:42 UTC (permalink / raw)
To: lee.jones; +Cc: linux-kernel, Yang Li
fixed the following coccicheck:
./drivers/mfd/lm3533-core.c:361:60-61: WARNING opportunity for
kobj_to_dev()
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/mfd/lm3533-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/lm3533-core.c b/drivers/mfd/lm3533-core.c
index 22fdffd..5690768 100644
--- a/drivers/mfd/lm3533-core.c
+++ b/drivers/mfd/lm3533-core.c
@@ -358,7 +358,7 @@ static ssize_t store_output(struct device *dev,
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);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mfd: lm3533: Switch to using the new API kobj_to_dev()
2021-02-23 9:42 [PATCH] mfd: lm3533: Switch to using the new API kobj_to_dev() Yang Li
@ 2021-03-09 14:46 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2021-03-09 14:46 UTC (permalink / raw)
To: Yang Li; +Cc: linux-kernel
On Tue, 23 Feb 2021, Yang Li wrote:
> fixed the following coccicheck:
> ./drivers/mfd/lm3533-core.c:361:60-61: WARNING opportunity for
> kobj_to_dev()
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
> drivers/mfd/lm3533-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Fixed up the commit message a bit and applied, thanks.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-09 14:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 9:42 [PATCH] mfd: lm3533: Switch to using the new API kobj_to_dev() Yang Li
2021-03-09 14:46 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).