linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, shiju.jose@huawei.com,
	linux-cxl@vger.kernel.org, linux-mm@kvack.org, dave@stgolabs.net,
	jonathan.cameron@huawei.com, dave.jiang@intel.com,
	alison.schofield@intel.com, vishal.l.verma@intel.com,
	ira.weiny@intel.com, dan.j.williams@intel.com
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	david@redhat.com, Vilas.Sridharan@amd.com, leo.duran@amd.com,
	Yazen.Ghannam@amd.com, rientjes@google.com, jiaqiyan@google.com,
	tony.luck@intel.com, Jon.Grimm@amd.com,
	dave.hansen@linux.intel.com, rafael@kernel.org, lenb@kernel.org,
	naoya.horiguchi@nec.com, james.morse@arm.com,
	jthoughton@google.com, somasundaram.a@hpe.com,
	erdemaktas@google.com, pgonda@google.com, duenwen@google.com,
	mike.malvestuto@intel.com
Subject: Re: [PATCH v2 06/10] memory: scrub: Add scrub driver supports configuring memory scrubbers in the system
Date: Wed, 22 Nov 2023 05:42:44 -0500	[thread overview]
Message-ID: <416c6883-7eaf-469a-9f5f-1829f729b78e@suswa.mountain> (raw)
In-Reply-To: <20231121101844.1161-7-shiju.jose@huawei.com>

Hi,

kernel test robot noticed the following build warnings:

https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/shiju-jose-huawei-com/cxl-mbox-Add-GET_SUPPORTED_FEATURES-mailbox-command/20231121-182247
base:   linus/master
patch link:    https://lore.kernel.org/r/20231121101844.1161-7-shiju.jose%40huawei.com
patch subject: [PATCH v2 06/10] memory: scrub: Add scrub driver supports configuring memory scrubbers in the system
config: powerpc-randconfig-r071-20231122 (https://download.01.org/0day-ci/archive/20231122/202311221028.fsptP2bp-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231122/202311221028.fsptP2bp-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202311221028.fsptP2bp-lkp@intel.com/

smatch warnings:
drivers/memory/scrub/memory-scrub.c:71 scrub_dev_attr_is_visible() warn: this array is probably non-NULL. 'scrub_dev->name'

vim +71 drivers/memory/scrub/memory-scrub.c

248ee451a36346 Shiju Jose 2023-11-21  65  static umode_t scrub_dev_attr_is_visible(struct kobject *kobj,
248ee451a36346 Shiju Jose 2023-11-21  66  					    struct attribute *attr, int n)
248ee451a36346 Shiju Jose 2023-11-21  67  {
248ee451a36346 Shiju Jose 2023-11-21  68  	struct device *dev = kobj_to_dev(kobj);
248ee451a36346 Shiju Jose 2023-11-21  69  	struct scrub_device *scrub_dev = to_scrub_device(dev);
248ee451a36346 Shiju Jose 2023-11-21  70  
248ee451a36346 Shiju Jose 2023-11-21 @71  	if (attr == &dev_attr_name.attr && scrub_dev->name == NULL)

I wrote this check 12 years ago and it's crap.  scrub_dev->name is the
first struct member so it's the same as same as "scrub_dev".  However
to_scrub_device() can't return NULL so this check is dead code.

248ee451a36346 Shiju Jose 2023-11-21  72  		return 0;
248ee451a36346 Shiju Jose 2023-11-21  73  
248ee451a36346 Shiju Jose 2023-11-21  74  	return attr->mode;
248ee451a36346 Shiju Jose 2023-11-21  75  }

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



  parent reply	other threads:[~2023-11-22 10:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 10:18 [PATCH v2 00/10] cxl: Add support for CXL feature commands, CXL device patrol scrub control and DDR5 ECS control features shiju.jose
2023-11-21 10:18 ` [PATCH v2 01/10] cxl/mbox: Add GET_SUPPORTED_FEATURES mailbox command shiju.jose
2023-11-21 21:27   ` kernel test robot
2023-11-22  0:04   ` kernel test robot
2023-11-21 10:18 ` [PATCH v2 02/10] cxl/mbox: Add GET_FEATURE " shiju.jose
2023-11-21 22:52   ` kernel test robot
2023-11-22  2:10   ` kernel test robot
2023-11-21 10:18 ` [PATCH v2 03/10] cxl/mbox: Add SET_FEATURE " shiju.jose
2023-11-22  1:01   ` Davidlohr Bueso
2023-11-21 10:18 ` [PATCH v2 04/10] cxl/memscrub: Add CXL device patrol scrub control feature shiju.jose
2023-11-22  0:21   ` Davidlohr Bueso
2023-11-22  9:48     ` Shiju Jose
2023-11-22 12:40   ` kernel test robot
2023-11-21 10:18 ` [PATCH v2 05/10] cxl/memscrub: Add CXL device DDR5 ECS " shiju.jose
2023-11-21 10:18 ` [PATCH v2 06/10] memory: scrub: Add scrub driver supports configuring memory scrubbers in the system shiju.jose
2023-11-22  1:59   ` kernel test robot
2023-11-22 10:42   ` Dan Carpenter [this message]
2023-11-21 10:18 ` [PATCH v2 07/10] cxl/memscrub: Register CXL device patrol scrub with scrub configure driver shiju.jose
2023-11-22  7:19   ` kernel test robot
2023-11-21 10:18 ` [PATCH v2 08/10] memory: scrub: Add scrub control attributes for the DDR5 ECS shiju.jose
2023-11-21 10:18 ` [PATCH v2 09/10] cxl/memscrub: Register CXL device DDR5 ECS with scrub configure driver shiju.jose
2023-11-21 10:18 ` [PATCH v2 10/10] cxl: scrub: sysfs: Add Documentation for CXL memory device scrub control attributes shiju.jose

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=416c6883-7eaf-469a-9f5f-1829f729b78e@suswa.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=Jon.Grimm@amd.com \
    --cc=Vilas.Sridharan@amd.com \
    --cc=Yazen.Ghannam@amd.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=david@redhat.com \
    --cc=duenwen@google.com \
    --cc=erdemaktas@google.com \
    --cc=ira.weiny@intel.com \
    --cc=james.morse@arm.com \
    --cc=jiaqiyan@google.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=jthoughton@google.com \
    --cc=lenb@kernel.org \
    --cc=leo.duran@amd.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=mike.malvestuto@intel.com \
    --cc=naoya.horiguchi@nec.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    --cc=pgonda@google.com \
    --cc=rafael@kernel.org \
    --cc=rientjes@google.com \
    --cc=shiju.jose@huawei.com \
    --cc=somasundaram.a@hpe.com \
    --cc=tony.luck@intel.com \
    --cc=vishal.l.verma@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox