Re: [PATCH] scsi: sd_zbc: Fix compilation warning

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

 



On 7/14/19 11:38 PM, Damien Le Moal wrote:
> kbuild test robot gets the following compilation warning using gcc 7.4
> cross compilation for c6x (GCC_VERSION=7.4.0 make.cross ARCH=c6x).
> 
>     In file included from include/asm-generic/bug.h:18:0,
>                      from arch/c6x/include/asm/bug.h:12,
>                      from include/linux/bug.h:5,
>                      from include/linux/thread_info.h:12,
>                      from include/asm-generic/current.h:5,
>                      from ./arch/c6x/include/generated/asm/current.h:1,
>                      from include/linux/sched.h:12,
>                      from include/linux/blkdev.h:5,
>                      from drivers//scsi/sd_zbc.c:11:
>     drivers//scsi/sd_zbc.c: In function 'sd_zbc_read_zones':
>>> include/linux/kernel.h:62:48: warning: 'zone_blocks' may be used
>     uninitialized in this function [-Wmaybe-uninitialized]
>      #define __round_mask(x, y) ((__typeof__(x))((y)-1))
>                                                     ^
>     drivers//scsi/sd_zbc.c:464:6: note: 'zone_blocks' was declared here
>       u32 zone_blocks;
>           ^~~~~~~~~~~
> 
> Fix this by initializing the zone_blocks variable to 0.

Probably worth noting that this is a false positive, and even if it is,
include a Fixes: entry as well.

Otherwise obviously looks fine to me. Martin, do you want to pick this
one up?

-- 
Jens Axboe




[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