Re: [PATCH 06/11] block: drbd: drbd_main: Remove duplicate field initialisation

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

 



On Fri, Mar 12, 2021 at 11:57 AM Lee Jones <lee.jones@xxxxxxxxxx> wrote:
>
> [P_RETRY_WRITE] is initialised more than once.
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/block/drbd/drbd_main.c: In function ‘cmdname’:
>  drivers/block/drbd/drbd_main.c:3660:22: warning: initialized field overwritten [-Woverride-init]
>  drivers/block/drbd/drbd_main.c:3660:22: note: (near initialization for ‘cmdnames[44]’)
>
> Cc: Philipp Reisner <philipp.reisner@xxxxxxxxxx>
> Cc: Lars Ellenberg <lars.ellenberg@xxxxxxxxxx>
> Cc: Jens Axboe <axboe@xxxxxxxxx>
> Cc: drbd-dev@xxxxxxxxxxxxxxxx
> Cc: linux-block@xxxxxxxxxxxxxxx
> Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>

Looks correct. I had actually posted a slightly different fix last year,
but either one addresses the warning:

https://lore.kernel.org/lkml/20201026215043.3893318-1-arnd@xxxxxxxxxx/

         Arnd




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux