Apologies if it was already reported (working backwards through emails missed during the holidays), but this warning looks legit. Can you please take a look? On Sat, Jan 4, 2020 at 11:48 AM kbuild test robot <lkp@xxxxxxxxx> wrote: > > CC: kbuild-all@xxxxxxxxxxxx > In-Reply-To: <20200103135628.3185-1-guoqing.jiang@xxxxxxxxxxxxxxx> > References: <20200103135628.3185-1-guoqing.jiang@xxxxxxxxxxxxxxx> > TO: jgq516@xxxxxxxxx > CC: liu.song.a23@xxxxxxxxx, linux-raid@xxxxxxxxxxxxxxx, Guoqing Jiang <guoqing.jiang@xxxxxxxxxxxxxxx>, linux-raid@xxxxxxxxxxxxxxx, Guoqing Jiang <guoqing.jiang@xxxxxxxxxxxxxxx> > CC: linux-raid@xxxxxxxxxxxxxxx, Guoqing Jiang <guoqing.jiang@xxxxxxxxxxxxxxx> > > Hi, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on linus/master] > [also build test WARNING on v5.5-rc4 next-20191220] > [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/jgq516-gmail-com/raid5-add-more-checks-before-add-sh-lru-to-plug-cb-list/20200104-172752 > base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 3a562aee727a7bfbb3a37b1aa934118397dad701 > config: x86_64-allyesconfig (attached as .config) > compiler: clang version 10.0.0 (git://gitmirror/llvm_project 320b43c39f0eb636c84815ce463893b21befdc8f) > reproduce: > # save the attached .config to linux build tree > make ARCH=x86_64 > > If you fix the issue, kindly add following tag > Reported-by: kbuild test robot <lkp@xxxxxxxxx> > > All warnings (new ones prefixed by >>): > > >> drivers//md/raid5.c:5484:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] > if (!atomic_read(&sh->count) == 0 && > ^ ~~ > drivers//md/raid5.c:5484:6: note: add parentheses after the '!' to evaluate the comparison first > if (!atomic_read(&sh->count) == 0 && > ^ > ( ) > drivers//md/raid5.c:5484:6: note: add parentheses around left hand side expression to silence this warning > if (!atomic_read(&sh->count) == 0 && > ^ > ( ) > 1 warning generated. > > vim +5484 drivers//md/raid5.c > > 5461 > 5462 static void release_stripe_plug(struct mddev *mddev, > 5463 struct stripe_head *sh) > 5464 { > 5465 struct blk_plug_cb *blk_cb = blk_check_plugged( > 5466 raid5_unplug, mddev, > 5467 sizeof(struct raid5_plug_cb)); > 5468 struct raid5_plug_cb *cb; > 5469 > 5470 if (!blk_cb) { > 5471 raid5_release_stripe(sh); > 5472 return; > 5473 } > 5474 > 5475 cb = container_of(blk_cb, struct raid5_plug_cb, cb); > 5476 > 5477 if (cb->list.next == NULL) { > 5478 int i; > 5479 INIT_LIST_HEAD(&cb->list); > 5480 for (i = 0; i < NR_STRIPE_HASH_LOCKS; i++) > 5481 INIT_LIST_HEAD(cb->temp_inactive_list + i); > 5482 } > 5483 > > 5484 if (!atomic_read(&sh->count) == 0 && > 5485 !test_bit(STRIPE_ON_RELEASE_LIST, &sh->state) && > 5486 !test_and_set_bit(STRIPE_ON_UNPLUG_LIST, &sh->state)) > 5487 list_add_tail(&sh->lru, &cb->list); > 5488 else > 5489 raid5_release_stripe(sh); > 5490 } > 5491 > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@xxxxxxxxxxxxxxxx. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/202001050333.SnzanhNo%25lkp%40intel.com. -- Thanks, ~Nick Desaulniers