CC: [email protected]
BCC: [email protected]
CC: "Dutta, Ranjan" <[email protected]>
CC: Andy Shevchenko <[email protected]>

From: kernel test robot <[email protected]>

drivers/platform/x86/intel/pmc/core.c:702: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

CC: Kate Hsuan <[email protected]>
Reported-by: kernel test robot <[email protected]>
Signed-off-by: kernel test robot <[email protected]>
---

tree:   https://github.com/intel/linux-intel-lts.git 5.10/yocto
head:   6410aba3b60feba47b9713f297d9b3bdb79981f5
commit: 7dedd84bf98ed8d614e6803403d773c9566b333a [2/21] platform/x86: 
intel_pmc_core: Move to intel sub-directory
:::::: branch date: 6 days ago
:::::: commit date: 7 months ago

Please take the patch only if it's a positive warning. Thanks!

 drivers/platform/x86/intel/pmc/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/platform/x86/intel/pmc/core.c
+++ b/drivers/platform/x86/intel/pmc/core.c
@@ -699,7 +699,7 @@ static umode_t etr3_is_visible(struct ko
                                struct attribute *attr,
                                int idx)
 {
-       struct device *dev = container_of(kobj, struct device, kobj);
+       struct device *dev = kobj_to_dev(kobj);
        struct pmc_dev *pmcdev = dev_get_drvdata(dev);
        const struct pmc_reg_map *map = pmcdev->map;
        u32 reg;
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to