From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH v2 15/16] treewide: Remove uninitialized_var() usage
Date: Sat, 20 Jun 2020 20:36:56 +0800 [thread overview]
Message-ID: <202006202000.ehKVf265%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 9827 bytes --]
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200620033007.1444705-15-keescook@chromium.org>
References: <20200620033007.1444705-15-keescook@chromium.org>
TO: Kees Cook <keescook@chromium.org>
Hi Kees,
I love your patch! Perhaps something to improve:
[auto build test WARNING on wireless-drivers-next/master]
[also build test WARNING on linus/master v5.8-rc1 next-20200618]
[cannot apply to wireless-drivers/master rw-ubifs/next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Kees-Cook/Remove-uninitialized_var-macro/20200620-113245
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago
config: i386-randconfig-m021-20200620 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/mtd/nand/raw/nand_ecc.c:357 __nand_calculate_ecc() error: uninitialized symbol 'rp17'.
# https://github.com/0day-ci/linux/commit/f58ed1805d1492d80a38f58702a37a0996973ffc
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout f58ed1805d1492d80a38f58702a37a0996973ffc
vim +/rp17 +357 drivers/mtd/nand/raw/nand_ecc.c
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 291
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 292 /* finally reduce par to 8 bits */
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 293 par ^= (par >> 8);
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 294 par &= 0xff;
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 295
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 296 /*
d68156cfad0fe0 drivers/mtd/nand/nand_ecc.c Singh, Vimal 2008-08-23 297 * and calculate rp5..rp15..rp17
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 298 * note that par = rp4 ^ rp5 and due to the commutative property
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 299 * of the ^ operator we can say:
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 300 * rp5 = (par ^ rp4);
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 301 * The & 0xff seems superfluous, but benchmarking learned that
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 302 * leaving it out gives slightly worse results. No idea why, probably
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 303 * it has to do with the way the pipeline in pentium is organized.
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 304 */
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 305 rp5 = (par ^ rp4) & 0xff;
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 306 rp7 = (par ^ rp6) & 0xff;
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 307 rp9 = (par ^ rp8) & 0xff;
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 308 rp11 = (par ^ rp10) & 0xff;
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 309 rp13 = (par ^ rp12) & 0xff;
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 310 rp15 = (par ^ rp14) & 0xff;
d68156cfad0fe0 drivers/mtd/nand/nand_ecc.c Singh, Vimal 2008-08-23 311 if (eccsize_mult == 2)
d68156cfad0fe0 drivers/mtd/nand/nand_ecc.c Singh, Vimal 2008-08-23 312 rp17 = (par ^ rp16) & 0xff;
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 313
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 314 /*
7854d3f7495b11 drivers/mtd/nand/nand_ecc.c Brian Norris 2011-06-23 315 * Finally calculate the ECC bits.
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 316 * Again here it might seem that there are performance optimisations
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 317 * possible, but benchmarks showed that on the system this is developed
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 318 * the code below is the fastest
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 319 */
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 320 if (sm_order) {
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 321 code[0] = (invparity[rp7] << 7) | (invparity[rp6] << 6) |
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 322 (invparity[rp5] << 5) | (invparity[rp4] << 4) |
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 323 (invparity[rp3] << 3) | (invparity[rp2] << 2) |
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 324 (invparity[rp1] << 1) | (invparity[rp0]);
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 325 code[1] = (invparity[rp15] << 7) | (invparity[rp14] << 6) |
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 326 (invparity[rp13] << 5) | (invparity[rp12] << 4) |
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 327 (invparity[rp11] << 3) | (invparity[rp10] << 2) |
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 328 (invparity[rp9] << 1) | (invparity[rp8]);
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 329 } else {
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 330 code[1] = (invparity[rp7] << 7) | (invparity[rp6] << 6) |
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 331 (invparity[rp5] << 5) | (invparity[rp4] << 4) |
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 332 (invparity[rp3] << 3) | (invparity[rp2] << 2) |
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 333 (invparity[rp1] << 1) | (invparity[rp0]);
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 334 code[0] = (invparity[rp15] << 7) | (invparity[rp14] << 6) |
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 335 (invparity[rp13] << 5) | (invparity[rp12] << 4) |
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 336 (invparity[rp11] << 3) | (invparity[rp10] << 2) |
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 337 (invparity[rp9] << 1) | (invparity[rp8]);
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 338 }
309600c14e36d0 drivers/mtd/nand/raw/nand_ecc.c Boris Brezillon 2018-09-04 339
d68156cfad0fe0 drivers/mtd/nand/nand_ecc.c Singh, Vimal 2008-08-23 340 if (eccsize_mult == 1)
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 341 code[2] =
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 342 (invparity[par & 0xf0] << 7) |
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 343 (invparity[par & 0x0f] << 6) |
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 344 (invparity[par & 0xcc] << 5) |
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 345 (invparity[par & 0x33] << 4) |
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 346 (invparity[par & 0xaa] << 3) |
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 347 (invparity[par & 0x55] << 2) |
e6cf5df1838c28 drivers/mtd/nand/nand_ecc.c frans 2008-08-15 348 3;
d68156cfad0fe0 drivers/mtd/nand/nand_ecc.c Singh, Vimal 2008-08-23 349 else
d68156cfad0fe0 drivers/mtd/nand/nand_ecc.c Singh, Vimal 2008-08-23 350 code[2] =
d68156cfad0fe0 drivers/mtd/nand/nand_ecc.c Singh, Vimal 2008-08-23 351 (invparity[par & 0xf0] << 7) |
d68156cfad0fe0 drivers/mtd/nand/nand_ecc.c Singh, Vimal 2008-08-23 352 (invparity[par & 0x0f] << 6) |
d68156cfad0fe0 drivers/mtd/nand/nand_ecc.c Singh, Vimal 2008-08-23 353 (invparity[par & 0xcc] << 5) |
d68156cfad0fe0 drivers/mtd/nand/nand_ecc.c Singh, Vimal 2008-08-23 354 (invparity[par & 0x33] << 4) |
d68156cfad0fe0 drivers/mtd/nand/nand_ecc.c Singh, Vimal 2008-08-23 355 (invparity[par & 0xaa] << 3) |
d68156cfad0fe0 drivers/mtd/nand/nand_ecc.c Singh, Vimal 2008-08-23 356 (invparity[par & 0x55] << 2) |
d68156cfad0fe0 drivers/mtd/nand/nand_ecc.c Singh, Vimal 2008-08-23 @357 (invparity[rp17] << 1) |
d68156cfad0fe0 drivers/mtd/nand/nand_ecc.c Singh, Vimal 2008-08-23 358 (invparity[rp16] << 0);
1c63aca32903ef drivers/mtd/nand/nand_ecc.c Akinobu Mita 2009-10-22 359 }
1c63aca32903ef drivers/mtd/nand/nand_ecc.c Akinobu Mita 2009-10-22 360 EXPORT_SYMBOL(__nand_calculate_ecc);
1c63aca32903ef drivers/mtd/nand/nand_ecc.c Akinobu Mita 2009-10-22 361
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33379 bytes --]
next reply other threads:[~2020-06-20 12:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-20 12:36 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-06-20 13:56 [PATCH v2 15/16] treewide: Remove uninitialized_var() usage kernel test robot
2020-06-20 3:29 [PATCH v2 00/16] Remove uninitialized_var() macro Kees Cook
2020-06-20 3:30 ` [PATCH v2 15/16] treewide: Remove uninitialized_var() usage Kees Cook
2020-06-22 11:32 ` Dan Carpenter
2020-06-22 11:32 ` Dan Carpenter
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=202006202000.ehKVf265%lkp@intel.com \
--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.