Re: [PATCH v2 1/4] block: Add concurrent positioning ranges support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Damien,

I love your patch! Perhaps something to improve:

[auto build test WARNING on block/for-next]
[also build test WARNING on scsi/for-next mkp-scsi/for-next v5.14-rc2 next-20210723]
[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]

url: https://github.com/0day-ci/linux/commits/Damien-Le-Moal/Initial-support-for-multi-actuator-HDDs/20210723-092320 base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
:::::: branch date: 26 hours ago
:::::: commit date: 26 hours ago
config: x86_64-randconfig-c001-20210723 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9625ca5b602616b2f5584e8a49ba93c52c141e40)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/5bede30cfe0b7db2174fbf8393a311fb21baa66a
        git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Damien-Le-Moal/Initial-support-for-multi-actuator-HDDs/20210723-092320
        git checkout 5bede30cfe0b7db2174fbf8393a311fb21baa66a
        # save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


clang-analyzer warnings: (new ones prefixed by >>)
                ^~~~~~~~~~~~
   fs/fs-writeback.c:1198:6: note: Left side of '||' is false
           if (!skip_if_busy || !writeback_in_progress(&bdi->wb)) {
               ^
   fs/fs-writeback.c:1198:23: note: Assuming the condition is true
           if (!skip_if_busy || !writeback_in_progress(&bdi->wb)) {
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/fs-writeback.c:1198:2: note: Taking true branch
           if (!skip_if_busy || !writeback_in_progress(&bdi->wb)) {
           ^
   fs/fs-writeback.c:1200:3: note: Calling 'wb_queue_work'
                   wb_queue_work(&bdi->wb, base_work);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/fs-writeback.c:163:6: note: Assuming field 'done' is null
           if (work->done)
               ^~~~~~~~~~
   fs/fs-writeback.c:163:2: note: Taking false branch
           if (work->done)
           ^
   fs/fs-writeback.c:168:6: note: Assuming the condition is false
           if (test_bit(WB_registered, &wb->state)) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/fs-writeback.c:168:2: note: Taking false branch
           if (test_bit(WB_registered, &wb->state)) {
           ^
   fs/fs-writeback.c:172:3: note: Calling 'finish_writeback_work'
                   finish_writeback_work(wb, work);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/fs-writeback.c:147:6: note: Assuming field 'auto_free' is not equal to 0
           if (work->auto_free)
               ^~~~~~~~~~~~~~~
   fs/fs-writeback.c:147:2: note: Taking true branch
           if (work->auto_free)
           ^
fs/fs-writeback.c:148:3: note: Argument to kfree() is the address of the local variable 'work', which is not memory allocated by malloc()
                   kfree(work);
                   ^     ~~~~
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
block/blk-cranges.c:206:32: warning: Access to field 'nr_ranges' results in a dereference of a null pointer (loaded from variable 'new') [clang-analyzer-core.NullDereference]
           if (!old || old->nr_ranges != new->nr_ranges)
                                         ^
   block/blk-cranges.c:251:19: note: Assuming 'cr' is non-null
           if (WARN_ON_ONCE(cr && !cr->nr_ranges)) {
                            ^
include/asm-generic/bug.h:104:25: note: expanded from macro 'WARN_ON_ONCE'
           int __ret_warn_on = !!(condition);                      \
                                  ^~~~~~~~~
   block/blk-cranges.c:251:19: note: Left side of '&&' is true
           if (WARN_ON_ONCE(cr && !cr->nr_ranges)) {
                            ^
block/blk-cranges.c:251:25: note: Assuming field 'nr_ranges' is not equal to 0
           if (WARN_ON_ONCE(cr && !cr->nr_ranges)) {
                                  ^
include/asm-generic/bug.h:104:25: note: expanded from macro 'WARN_ON_ONCE'
           int __ret_warn_on = !!(condition);                      \
                                  ^~~~~~~~~
   block/blk-cranges.c:251:6: note: Taking false branch
           if (WARN_ON_ONCE(cr && !cr->nr_ranges)) {
               ^
include/asm-generic/bug.h:105:2: note: expanded from macro 'WARN_ON_ONCE'
           if (unlikely(__ret_warn_on))                            \
           ^
   block/blk-cranges.c:251:2: note: Taking false branch
           if (WARN_ON_ONCE(cr && !cr->nr_ranges)) {
           ^
   block/blk-cranges.c:259:6: note: 'cr' is non-null
           if (cr && !blk_check_ranges(disk, cr)) {
               ^~
   block/blk-cranges.c:259:6: note: Left side of '&&' is true
   block/blk-cranges.c:259:12: note: Assuming the condition is true
           if (cr && !blk_check_ranges(disk, cr)) {
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   block/blk-cranges.c:259:2: note: Taking true branch
           if (cr && !blk_check_ranges(disk, cr)) {
           ^
   block/blk-cranges.c:261:3: note: Null pointer value stored to 'cr'
                   cr = NULL;
                   ^~~~~~~~~
block/blk-cranges.c:264:33: note: Passing null pointer value via 2nd parameter 'new'
           if (!blk_cranges_changed(disk, cr)) {
                                          ^~
   block/blk-cranges.c:264:7: note: Calling 'blk_cranges_changed'
           if (!blk_cranges_changed(disk, cr)) {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   block/blk-cranges.c:206:6: note: Assuming 'old' is non-null
           if (!old || old->nr_ranges != new->nr_ranges)
               ^~~~
   block/blk-cranges.c:206:6: note: Left side of '||' is false
block/blk-cranges.c:206:32: note: Access to field 'nr_ranges' results in a dereference of a null pointer (loaded from variable 'new')
           if (!old || old->nr_ranges != new->nr_ranges)
                                         ^~~
   Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (4 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (4 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (4 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (4 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (4 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   8 warnings generated.
drivers/char/tpm/eventlog/tpm1.c:276:2: warning: Value stored to 'len' is never read [clang-analyzer-deadcode.DeadStores]
           len += get_event_name(eventname, event, event_entry);
           ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/char/tpm/eventlog/tpm1.c:276:2: note: Value stored to 'len' is never read
           len += get_event_name(eventname, event, event_entry);
           ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 7 warnings (5 in non-user code, 2 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (4 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (4 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (4 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (4 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.

vim +206 block/blk-cranges.c

5bede30cfe0b7d Damien Le Moal 2021-07-23 200 5bede30cfe0b7d Damien Le Moal 2021-07-23 201 static bool blk_cranges_changed(struct gendisk *disk, struct blk_cranges *new)
5bede30cfe0b7d Damien Le Moal 2021-07-23  202  {
5bede30cfe0b7d Damien Le Moal 2021-07-23 203 struct blk_cranges *old = disk->queue->cranges;
5bede30cfe0b7d Damien Le Moal 2021-07-23  204  	int i;
5bede30cfe0b7d Damien Le Moal 2021-07-23 205 5bede30cfe0b7d Damien Le Moal 2021-07-23 @206 if (!old || old->nr_ranges != new->nr_ranges)
5bede30cfe0b7d Damien Le Moal 2021-07-23  207  		return true;
5bede30cfe0b7d Damien Le Moal 2021-07-23 208 5bede30cfe0b7d Damien Le Moal 2021-07-23 209 for (i = 0; i < new->nr_ranges; i++) { 5bede30cfe0b7d Damien Le Moal 2021-07-23 210 if (old->ranges[i].sector != new->ranges[i].sector || 5bede30cfe0b7d Damien Le Moal 2021-07-23 211 old->ranges[i].nr_sectors != new->ranges[i].nr_sectors)
5bede30cfe0b7d Damien Le Moal 2021-07-23  212  			return true;
5bede30cfe0b7d Damien Le Moal 2021-07-23  213  	}
5bede30cfe0b7d Damien Le Moal 2021-07-23 214 5bede30cfe0b7d Damien Le Moal 2021-07-23 215 return false;
5bede30cfe0b7d Damien Le Moal 2021-07-23  216  }
5bede30cfe0b7d Damien Le Moal 2021-07-23  217
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- kbuild@xxxxxxxxxxxx
To unsubscribe send an email to kbuild-leave@xxxxxxxxxxxx


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux