From: kernel test robot <lkp@intel.com>
To: Gregory Price <gourry@gourry.net>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [gourryinverse:private_compression 19/60] drivers/dax/kmem.c:216:1: warning: control reaches end of non-void function
Date: Sun, 22 Feb 2026 19:58:18 +0800 [thread overview]
Message-ID: <202602221901.2hvPihLP-lkp@intel.com> (raw)
tree: https://github.com/gourryinverse/linux private_compression
head: 9fa5ffee4fd4726e31f05deebb938cccfa0b460f
commit: 5ff2dd414217df1fbed8de6c06536504e2ec2103 [19/60] dax/kmem: add sysfs interface for atomic whole-device hotplug
config: s390-randconfig-002-20260222 (https://download.01.org/0day-ci/archive/20260222/202602221901.2hvPihLP-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260222/202602221901.2hvPihLP-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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602221901.2hvPihLP-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/dax/kmem.c: In function 'dax_kmem_do_hotremove':
drivers/dax/kmem.c:215:10: error: 'ENOSUPP' undeclared (first use in this function); did you mean 'ENOTSUPP'?
return -ENOSUPP;
^~~~~~~
ENOTSUPP
drivers/dax/kmem.c:215:10: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/dax/kmem.c:216:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
vim +216 drivers/dax/kmem.c
af7cd15fb8a39f Gregory Price 2026-01-14 166
af7cd15fb8a39f Gregory Price 2026-01-14 167 #ifdef CONFIG_MEMORY_HOTREMOVE
af7cd15fb8a39f Gregory Price 2026-01-14 168 /**
af7cd15fb8a39f Gregory Price 2026-01-14 169 * dax_kmem_do_hotremove - hot-remove memory for dax kmem device
af7cd15fb8a39f Gregory Price 2026-01-14 170 * @dev_dax: the dev_dax instance
af7cd15fb8a39f Gregory Price 2026-01-14 171 * @data: the dax_kmem_data structure with resource tracking
af7cd15fb8a39f Gregory Price 2026-01-14 172 *
5ff2dd414217df Gregory Price 2026-01-14 173 * Offlines and removes all ranges in the dev_dax region.
af7cd15fb8a39f Gregory Price 2026-01-14 174 *
5ff2dd414217df Gregory Price 2026-01-14 175 * Returns the number of successfully removed ranges, or negative error.
af7cd15fb8a39f Gregory Price 2026-01-14 176 */
af7cd15fb8a39f Gregory Price 2026-01-14 177 static int dax_kmem_do_hotremove(struct dev_dax *dev_dax,
af7cd15fb8a39f Gregory Price 2026-01-14 178 struct dax_kmem_data *data)
af7cd15fb8a39f Gregory Price 2026-01-14 179 {
af7cd15fb8a39f Gregory Price 2026-01-14 180 struct device *dev = &dev_dax->dev;
af7cd15fb8a39f Gregory Price 2026-01-14 181 int i, success = 0;
af7cd15fb8a39f Gregory Price 2026-01-14 182
af7cd15fb8a39f Gregory Price 2026-01-14 183 for (i = 0; i < dev_dax->nr_range; i++) {
af7cd15fb8a39f Gregory Price 2026-01-14 184 struct range range;
af7cd15fb8a39f Gregory Price 2026-01-14 185 int rc;
af7cd15fb8a39f Gregory Price 2026-01-14 186
af7cd15fb8a39f Gregory Price 2026-01-14 187 rc = dax_kmem_range(dev_dax, i, &range);
af7cd15fb8a39f Gregory Price 2026-01-14 188 if (rc)
af7cd15fb8a39f Gregory Price 2026-01-14 189 continue;
af7cd15fb8a39f Gregory Price 2026-01-14 190
af7cd15fb8a39f Gregory Price 2026-01-14 191 /* Skip ranges not currently added */
af7cd15fb8a39f Gregory Price 2026-01-14 192 if (!data->res[i])
af7cd15fb8a39f Gregory Price 2026-01-14 193 continue;
af7cd15fb8a39f Gregory Price 2026-01-14 194
5ff2dd414217df Gregory Price 2026-01-14 195 rc = offline_and_remove_memory(range.start, range_len(&range));
af7cd15fb8a39f Gregory Price 2026-01-14 196 if (rc == 0) {
af7cd15fb8a39f Gregory Price 2026-01-14 197 /* Release the resource for the successfully removed range */
af7cd15fb8a39f Gregory Price 2026-01-14 198 remove_resource(data->res[i]);
af7cd15fb8a39f Gregory Price 2026-01-14 199 kfree(data->res[i]);
af7cd15fb8a39f Gregory Price 2026-01-14 200 data->res[i] = NULL;
af7cd15fb8a39f Gregory Price 2026-01-14 201 success++;
af7cd15fb8a39f Gregory Price 2026-01-14 202 continue;
af7cd15fb8a39f Gregory Price 2026-01-14 203 }
af7cd15fb8a39f Gregory Price 2026-01-14 204 any_hotremove_failed = true;
af7cd15fb8a39f Gregory Price 2026-01-14 205 dev_err(dev, "mapping%d: %#llx-%#llx hotremove failed\n",
af7cd15fb8a39f Gregory Price 2026-01-14 206 i, range.start, range.end);
af7cd15fb8a39f Gregory Price 2026-01-14 207 }
af7cd15fb8a39f Gregory Price 2026-01-14 208
af7cd15fb8a39f Gregory Price 2026-01-14 209 return success;
af7cd15fb8a39f Gregory Price 2026-01-14 210 }
af7cd15fb8a39f Gregory Price 2026-01-14 211 #else
af7cd15fb8a39f Gregory Price 2026-01-14 212 static int dax_kmem_do_hotremove(struct dev_dax *dev_dax,
af7cd15fb8a39f Gregory Price 2026-01-14 213 struct dax_kmem_data *data)
af7cd15fb8a39f Gregory Price 2026-01-14 214 {
af7cd15fb8a39f Gregory Price 2026-01-14 215 return -ENOSUPP;
af7cd15fb8a39f Gregory Price 2026-01-14 @216 }
af7cd15fb8a39f Gregory Price 2026-01-14 217 #endif /* CONFIG_MEMORY_HOTREMOVE */
af7cd15fb8a39f Gregory Price 2026-01-14 218
:::::: The code at line 216 was first introduced by commit
:::::: af7cd15fb8a39fb0d8799c2d54dae5864d67632b dax/kmem: extract hotplug/hotremove helper functions
:::::: TO: Gregory Price <gourry@gourry.net>
:::::: CC: Gregory Price <gourry@gourry.net>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-02-22 11:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202602221901.2hvPihLP-lkp@intel.com \
--to=lkp@intel.com \
--cc=gourry@gourry.net \
--cc=oe-kbuild-all@lists.linux.dev \
/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.