[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2103171258010.2981@hadrien>
Date: Wed, 17 Mar 2021 13:00:26 +0100 (CET)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Corentin Chary <corentin.chary@...il.com>,
Darren Hart <dvhart@...radead.org>,
Andy Shevchenko <andy@...radead.org>,
acpi4asus-user@...ts.sourceforge.net
cc: platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
kbuild-all@...ts.01.org, Denis Efremov <efremov@...ux.com>
Subject: [PATCH] asus-laptop: fix kobj_to_dev.cocci warnings
From: kernel test robot <lkp@...el.com>
Use kobj_to_dev() instead of container_of()
Generated by: scripts/coccinelle/api/kobj_to_dev.cocci
CC: Denis Efremov <efremov@...ux.com>
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: kernel test robot <lkp@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...ia.fr>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1df27313f50a57497c1faeb6a6ae4ca939c85a7d
commit: a2fc3718bc22e85378085568ecc5765fb28cabce coccinelle: api: add kobj_to_dev.cocci script
:::::: branch date: 5 hours ago
:::::: commit date: 7 months ago
asus-laptop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -1569,7 +1569,7 @@ static umode_t asus_sysfs_is_visible(str
struct attribute *attr,
int idx)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct asus_laptop *asus = dev_get_drvdata(dev);
acpi_handle handle = asus->handle;
bool supported;
Powered by blists - more mailing lists