[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202207101958.s0Y7cDjK-lkp@intel.com>
Date: Sun, 10 Jul 2022 19:43:22 +0800
From: kernel test robot <lkp@...el.com>
To: "Fabio M. De Francesco" <fmdefrancesco@...il.com>,
Luis Chamberlain <mcgrof@...nel.org>,
Russ Weight <russell.h.weight@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Nick Terrell <terrelln@...com>, linux-kernel@...r.kernel.org
Cc: kbuild-all@...ts.01.org,
"Fabio M. De Francesco" <fmdefrancesco@...il.com>,
Ira Weiny <ira.weiny@...el.com>
Subject: Re: [PATCH] firmware_loader: Replace kmap() with kmap_local_page()
Hi "Fabio,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on driver-core/driver-core-testing]
[also build test WARNING on linus/master v5.19-rc5 next-20220708]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Fabio-M-De-Francesco/firmware_loader-Replace-kmap-with-kmap_local_page/20220710-181336
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 2c8f7ef4b3c4ac67a876b2a9fe7b6a1128265104
config: x86_64-allyesconfig
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/8b8434c9157ae5b8db5ff5a623c4f95d978097f7
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Fabio-M-De-Francesco/firmware_loader-Replace-kmap-with-kmap_local_page/20220710-181336
git checkout 8b8434c9157ae5b8db5ff5a623c4f95d978097f7
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/base/firmware_loader/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/base/firmware_loader/sysfs.c: In function 'firmware_rw':
>> drivers/base/firmware_loader/sysfs.c:245:23: warning: unused variable 'page_data' [-Wunused-variable]
245 | void *page_data;
| ^~~~~~~~~
vim +/page_data +245 drivers/base/firmware_loader/sysfs.c
e0c11a8b985137 Russ Weight 2022-04-21 240
e0c11a8b985137 Russ Weight 2022-04-21 241 static void firmware_rw(struct fw_priv *fw_priv, char *buffer,
e0c11a8b985137 Russ Weight 2022-04-21 242 loff_t offset, size_t count, bool read)
e0c11a8b985137 Russ Weight 2022-04-21 243 {
e0c11a8b985137 Russ Weight 2022-04-21 244 while (count) {
e0c11a8b985137 Russ Weight 2022-04-21 @245 void *page_data;
e0c11a8b985137 Russ Weight 2022-04-21 246 int page_nr = offset >> PAGE_SHIFT;
e0c11a8b985137 Russ Weight 2022-04-21 247 int page_ofs = offset & (PAGE_SIZE - 1);
e0c11a8b985137 Russ Weight 2022-04-21 248 int page_cnt = min_t(size_t, PAGE_SIZE - page_ofs, count);
e0c11a8b985137 Russ Weight 2022-04-21 249
e0c11a8b985137 Russ Weight 2022-04-21 250 if (read)
8b8434c9157ae5 Fabio M. De Francesco 2022-07-10 251 memcpy_from_page(buffer, fw_priv->pages[page_nr],
8b8434c9157ae5 Fabio M. De Francesco 2022-07-10 252 page_ofs, page_cnt);
e0c11a8b985137 Russ Weight 2022-04-21 253 else
8b8434c9157ae5 Fabio M. De Francesco 2022-07-10 254 memcpy_to_page(fw_priv->pages[page_nr], page_ofs,
8b8434c9157ae5 Fabio M. De Francesco 2022-07-10 255 buffer, page_cnt);
e0c11a8b985137 Russ Weight 2022-04-21 256
e0c11a8b985137 Russ Weight 2022-04-21 257 buffer += page_cnt;
e0c11a8b985137 Russ Weight 2022-04-21 258 offset += page_cnt;
e0c11a8b985137 Russ Weight 2022-04-21 259 count -= page_cnt;
e0c11a8b985137 Russ Weight 2022-04-21 260 }
e0c11a8b985137 Russ Weight 2022-04-21 261 }
e0c11a8b985137 Russ Weight 2022-04-21 262
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (286757 bytes)
Powered by blists - more mailing lists