* [sashal-linux-stable:queue-4.19 37/242] drivers/mtd/ubi/wl.c:314:27: warning: variable 'prev_e' set but not used
@ 2020-09-29 5:32 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-09-29 5:32 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4907 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.19
head: 76372ca86ebe9f76848cc20dee55115508601a3a
commit: 6011fc2046d06ca9bf7e5935a13491ac4f57120d [37/242] ubi: Fix producing anchor PEBs
config: arc-randconfig-r002-20200929 (attached as .config)
compiler: arc-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/commit/?id=6011fc2046d06ca9bf7e5935a13491ac4f57120d
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-4.19
git checkout 6011fc2046d06ca9bf7e5935a13491ac4f57120d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/mtd/ubi/wl.c: In function 'find_wl_entry':
>> drivers/mtd/ubi/wl.c:314:27: warning: variable 'prev_e' set but not used [-Wunused-but-set-variable]
314 | struct ubi_wl_entry *e, *prev_e = NULL;
| ^~~~~~
drivers/mtd/ubi/wl.c:577: warning: Function parameter or member 'nested' not described in 'schedule_erase'
drivers/mtd/ubi/wl.c:1055: warning: Excess function parameter 'shutdown' description in '__erase_worker'
vim +/prev_e +314 drivers/mtd/ubi/wl.c
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 300
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 301 /**
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 302 * find_wl_entry - find wear-leveling entry closest to certain erase counter.
8199b901a31b6e Richard Weinberger 2012-09-26 303 * @ubi: UBI device description object
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 304 * @root: the RB-tree where to look for
add8287e3fa216 Artem Bityutskiy 2012-03-07 305 * @diff: maximum possible difference from the smallest erase counter
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 306 *
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 307 * This function looks for a wear leveling entry with erase counter closest to
add8287e3fa216 Artem Bityutskiy 2012-03-07 308 * min + @diff, where min is the smallest erase counter.
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 309 */
8199b901a31b6e Richard Weinberger 2012-09-26 310 static struct ubi_wl_entry *find_wl_entry(struct ubi_device *ubi,
8199b901a31b6e Richard Weinberger 2012-09-26 311 struct rb_root *root, int diff)
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 312 {
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 313 struct rb_node *p;
8199b901a31b6e Richard Weinberger 2012-09-26 @314 struct ubi_wl_entry *e, *prev_e = NULL;
add8287e3fa216 Artem Bityutskiy 2012-03-07 315 int max;
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 316
23553b2c08c9b6 Xiaochuan-Xu 2008-12-09 317 e = rb_entry(rb_first(root), struct ubi_wl_entry, u.rb);
add8287e3fa216 Artem Bityutskiy 2012-03-07 318 max = e->ec + diff;
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 319
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 320 p = root->rb_node;
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 321 while (p) {
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 322 struct ubi_wl_entry *e1;
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 323
23553b2c08c9b6 Xiaochuan-Xu 2008-12-09 324 e1 = rb_entry(p, struct ubi_wl_entry, u.rb);
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 325 if (e1->ec >= max)
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 326 p = p->rb_left;
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 327 else {
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 328 p = p->rb_right;
8199b901a31b6e Richard Weinberger 2012-09-26 329 prev_e = e;
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 330 e = e1;
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 331 }
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 332 }
801c135ce73d5d Artem B. Bityutskiy 2006-06-27 333
8199b901a31b6e Richard Weinberger 2012-09-26 334 return e;
8199b901a31b6e Richard Weinberger 2012-09-26 335 }
8199b901a31b6e Richard Weinberger 2012-09-26 336
:::::: The code at line 314 was first introduced by commit
:::::: 8199b901a31b6e89b63842643f644fc05b403b20 UBI: Add fastmap support to the WL sub-system
:::::: TO: Richard Weinberger <richard@nod.at>
:::::: CC: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 17730 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-29 5:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 5:32 [sashal-linux-stable:queue-4.19 37/242] drivers/mtd/ubi/wl.c:314:27: warning: variable 'prev_e' set but not used kernel test robot
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.