From: kbuild test robot <lkp@intel.com>
To: Bean Huo <huobean@gmail.com>,
miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com,
s.hauer@pengutronix.de, boris.brezillon@collabora.com,
derosier@gmail.com
Cc: kbuild-all@lists.01.org, linux-mtd@lists.infradead.org,
linux-kernel@vger.kernel.org, huobean@gmail.com,
Bean Huo <beanhuo@micron.com>
Subject: Re: [RESET PATCH v5 5/5] mtd: rawnand: micron: Micron SLC NAND filling block
Date: Wed, 20 May 2020 09:04:55 +0800 [thread overview]
Message-ID: <202005200841.yKkJSjNC%lkp@intel.com> (raw)
In-Reply-To: <20200519101734.19927-6-huobean@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 7121 bytes --]
Hi Bean,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.7-rc6 next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Bean-Huo/Micron-SLC-NAND-filling-block/20200519-205658
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 642b151f45dd54809ea00ecd3976a56c1ec9b53d
config: microblaze-randconfig-r024-20200519 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/linux/bits.h:23,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from ./arch/microblaze/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/slab.h:15,
from drivers/mtd/nand/raw/nand_micron.c:9:
drivers/mtd/nand/raw/nand_micron.c: In function 'micron_nand_write_oob':
include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/nand_micron.c:506:32: note: in expansion of macro 'GENMASK'
506 | micron->writtenp[first_eb] |= GENMASK(first_p + nb_p, 0) &
| ^~~~~~~
include/linux/bits.h:26:40: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/nand_micron.c:506:32: note: in expansion of macro 'GENMASK'
506 | micron->writtenp[first_eb] |= GENMASK(first_p + nb_p, 0) &
| ^~~~~~~
include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/nand_micron.c:518:27: note: in expansion of macro 'GENMASK'
518 | micron->writtenp[eb] |= GENMASK(remaining_p - 1, 0) &
| ^~~~~~~
include/linux/bits.h:26:40: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/nand_micron.c:518:27: note: in expansion of macro 'GENMASK'
518 | micron->writtenp[eb] |= GENMASK(remaining_p - 1, 0) &
| ^~~~~~~
In file included from include/asm-generic/bug.h:5,
from ./arch/microblaze/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/slab.h:15,
from drivers/mtd/nand/raw/nand_micron.c:9:
>> include/linux/compiler.h:56:23: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~
>> drivers/mtd/nand/raw/nand_micron.c:517:2: note: in expansion of macro 'if'
517 | if (remaining_p)
| ^~
drivers/mtd/nand/raw/nand_micron.c:520:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
520 | return 0;
| ^~~~~~
vim +/if +517 drivers/mtd/nand/raw/nand_micron.c
484
485 static int micron_nand_write_oob(struct nand_chip *chip, loff_t to,
486 struct mtd_oob_ops *ops)
487 {
488 struct micron_nand *micron = nand_get_manufacturer_data(chip);
489 u32 eb_sz = nanddev_eraseblock_size(&chip->base);
490 u32 p_sz = nanddev_page_size(&chip->base);
491 u32 ppeb = nanddev_pages_per_eraseblock(&chip->base);
492 u32 nb_p_tot = ops->len / p_sz;
493 u32 first_eb = DIV_ROUND_DOWN_ULL(to, eb_sz);
494 u32 first_p = DIV_ROUND_UP_ULL(to - (first_eb * eb_sz), p_sz);
495 u32 nb_eb = DIV_ROUND_UP_ULL(first_p + nb_p_tot, ppeb);
496 u32 remaining_p, eb, nb_p;
497 int ret;
498
499 ret = nand_write_oob_nand(chip, to, ops);
500
501 if (ret || ops->len != ops->retlen)
502 return ret;
503
504 /* Mark the last pages of the first erase block to write */
505 nb_p = min(nb_p_tot, ppeb - first_p);
506 micron->writtenp[first_eb] |= GENMASK(first_p + nb_p, 0) &
507 MICRON_PAGE_MASK_TRIGGER;
508 remaining_p = nb_p_tot - nb_p;
509
510 /* Mark all the pages of all "in-the-middle" erase blocks */
511 for (eb = first_eb + 1; eb < first_eb + nb_eb - 1; eb++) {
512 micron->writtenp[eb] |= MICRON_PAGE_MASK_TRIGGER;
513 remaining_p -= ppeb;
514 }
515
516 /* Mark the first pages of the last erase block to write */
> 517 if (remaining_p)
518 micron->writtenp[eb] |= GENMASK(remaining_p - 1, 0) &
519 MICRON_PAGE_MASK_TRIGGER;
520 return 0;
521 }
522
---
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: 29579 bytes --]
prev parent reply other threads:[~2020-05-20 1:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 10:17 [RESET PATCH v5 0/5] " Bean Huo
2020-05-19 10:17 ` [RESET PATCH v5 1/5] mtd: rawnand: group all NAND specific ops into new nand_chip_ops Bean Huo
2020-05-19 10:17 ` [RESET PATCH v5 2/5] mtd: rawnand: Add {pre,post}_erase hooks in nand_chip_ops Bean Huo
2020-05-19 10:17 ` [RESET PATCH v5 3/5] mtd: rawnand: Add write_oob hook " Bean Huo
2020-05-19 10:17 ` [RESET PATCH v5 4/5] mtd: rawnand: Introduce a new function nand_check_is_erased_page() Bean Huo
2020-05-19 10:17 ` [RESET PATCH v5 5/5] mtd: rawnand: micron: Micron SLC NAND filling block Bean Huo
2020-05-19 20:32 ` kbuild test robot
2020-05-20 1:04 ` kbuild test robot [this message]
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=202005200841.yKkJSjNC%lkp@intel.com \
--to=lkp@intel.com \
--cc=beanhuo@micron.com \
--cc=boris.brezillon@collabora.com \
--cc=derosier@gmail.com \
--cc=huobean@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=s.hauer@pengutronix.de \
--cc=vigneshr@ti.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
Powered by JetHome