From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] cxl/acpi: fix kobj_to_dev.cocci warnings
Date: Sat, 08 May 2021 13:45:03 +0800 [thread overview]
Message-ID: <20210508054503.GA85847@ded366bab7bf> (raw)
In-Reply-To: <202105081211.Ds8JuHNU-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1587 bytes --]
CC: kbuild-all(a)lists.01.org
In-Reply-To: <162042790793.1202325.13507889482183963289.stgit@dwillia2-desk3.amr.corp.intel.com>
References: <162042790793.1202325.13507889482183963289.stgit@dwillia2-desk3.amr.corp.intel.com>
TO: Dan Williams <dan.j.williams@intel.com>
TO: linux-cxl(a)vger.kernel.org
CC: linux-pci(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
CC: linux-acpi(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
drivers/cxl/core.c:88: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: Dan Williams <dan.j.williams@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
url: https://github.com/0day-ci/linux/commits/Dan-Williams/CXL-Port-Enumeration-and-Plans-for-v5-14/20210508-065317
base: a38fd8748464831584a19438cbb3082b5a2dab15
:::::: branch date: 6 hours ago
:::::: commit date: 6 hours ago
Please take the patch only if it's a positive warning. Thanks!
core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/cxl/core.c
+++ b/drivers/cxl/core.c
@@ -85,7 +85,7 @@ static struct attribute *cxl_address_spa
static umode_t cxl_address_space_visible(struct kobject *kobj,
struct attribute *a, int n)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct cxl_address_space *space = dev_to_address_space(dev);
if (a == &dev_attr_supports_pmem.attr &&
next prev parent reply other threads:[~2021-05-08 5:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-08 5:44 [PATCH 5/8] cxl/acpi: Introduce ACPI0017 driver and cxl_root kernel test robot
2021-05-08 5:45 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-04-01 23:52 [PATCH v2 " kernel test robot
2021-04-01 23:52 ` [PATCH] cxl/acpi: fix kobj_to_dev.cocci warnings kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210508054503.GA85847@ded366bab7bf \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.