lkml.org 
[lkml]   [2021]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 06/11] block: drbd: drbd_main: Remove duplicate field initialisation
On Fri, Mar 12, 2021 at 11:57 AM Lee Jones <lee.jones@linaro.org> 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@linbit.com>
> Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: drbd-dev@lists.linbit.com
> Cc: linux-block@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

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@kernel.org/

Arnd

\
 
 \ /
  Last update: 2021-03-19 15:58    [W:0.230 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site