Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2136175iof; Tue, 7 Jun 2022 20:58:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKUi85/AXsHsCr9WZm9A9USzEDfyv39VI79gPobUYkbXiuUQuLY1/UzlLBmTQzhR8+2ImK X-Received: by 2002:a17:90b:17d2:b0:1e2:c0a2:80fb with SMTP id me18-20020a17090b17d200b001e2c0a280fbmr59809758pjb.67.1654660684861; Tue, 07 Jun 2022 20:58:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654660684; cv=none; d=google.com; s=arc-20160816; b=tkFBsiXvwYKsee/xAm2gg/KIN9LCWQD+UzbspQ5YMSX8zj3oSP07JFtsBOn8cUZ/SI Y7kTksppa/DHipOpq/Jr9e0glSb2f+KPpQbWLYqitCrDTBdMTrgcK2eOr0W+IY66IWPY BkaTi++BWIPtXGOokmxtm1fhefgJdc7DkCjzUAHNY9ew6SnkfnbSQpBFwf5VgTfvezAv NeOUNUyNDfjGRht+BYMFvKrG/Ig7jVHyCJ+qEy0t/LyvcalZSo6dvLaonxomNnPToqZE hExQddOOehuoi84ROS3j2+QkkI8+pl5l2sP2z/x8o8Drt9O5MUfvD/R0Gh+PNKi+Y0y7 UYrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+gBQSgaKV28Uu8ziicwPF8E99E4jLCTjbGjPIsUmgm4=; b=nM2AinfhT+fJNbl/J8UqOGLDrAH18A8sDjvvtIMB1xS3XzGWlMeWfGgP8gP1lWDCdc hlFKhhjen4J/BPEnRMlj/H6hmrMKr+ZMe8zJwy9OFPsi6dj6qX6RMAnA+PgcmZOyu37T zRYfNrseOjrTm3rhkecxMZ98oF5fi3m+aUvGS83xOuGOZJ8GhwhBDfKBZtL8asmNhq5G j7wEZAxF4X3NHWZdrlAAa8rG2IjwfTBL/4tvAA3PuhjV5Mw4VmOgKAY+8MeehUUdeQno 6GQqA+CKOvIqXXVwTKN+o/VvwFZnAtC3Xb7GRlz0Hv8Vnsl9hsyXEcRB4Rbsi3a+Z3rM cTMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zc3xGvfa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b17-20020a63a111000000b003fc1bb74001si13157487pgf.54.2022.06.07.20.58.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 20:58:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zc3xGvfa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 67390398CE3; Tue, 7 Jun 2022 20:19:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382511AbiFGWez (ORCPT + 99 others); Tue, 7 Jun 2022 18:34:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377404AbiFGVWc (ORCPT ); Tue, 7 Jun 2022 17:22:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB82F224D1C; Tue, 7 Jun 2022 12:00:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 36A97612F2; Tue, 7 Jun 2022 19:00:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D10DC385A2; Tue, 7 Jun 2022 19:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628415; bh=BHm42J4EtXHmLewcSfTYir17/pQm9FwwdRgBDhV7gME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zc3xGvfaNp138jS0Nm5yEWfNbHATesp8u1f6LzpPaPcdEiUQY4w9cBUuZWDlRqpkT N9K+mAiGDEUsDECAGD2pHf7lI5ljgtLBzsAV6OELvxdmYSy4OwypsT33abHfjYLlN0 TdEctNqTyP8A5BkWD8E3A300C/NwlOYQEAUXFnho= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= , Jens Axboe , Sasha Levin Subject: [PATCH 5.18 320/879] drbd: fix duplicate array initializer Date: Tue, 7 Jun 2022 18:57:18 +0200 Message-Id: <20220607165012.141756926@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 33cb0917bbe241dd17a2b87ead63514c1b7e5615 ] There are two initializers for P_RETRY_WRITE: drivers/block/drbd/drbd_main.c:3676:22: warning: initialized field overwritten [-Woverride-init] Remove the first one since it was already ignored by the compiler and reorder the list to match the enum definition. As P_ZEROES had no entry, add that one instead. Fixes: 036b17eaab93 ("drbd: Receiving part for the PROTOCOL_UPDATE packet") Fixes: f31e583aa2c2 ("drbd: introduce P_ZEROES (REQ_OP_WRITE_ZEROES on the "wire")") Signed-off-by: Arnd Bergmann Reviewed-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20220406190715.1938174-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- drivers/block/drbd/drbd_main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 7b501c8d5992..57b23e49ee91 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -3581,9 +3581,8 @@ const char *cmdname(enum drbd_packet cmd) * when we want to support more than * one PRO_VERSION */ static const char *cmdnames[] = { + [P_DATA] = "Data", - [P_WSAME] = "WriteSame", - [P_TRIM] = "Trim", [P_DATA_REPLY] = "DataReply", [P_RS_DATA_REPLY] = "RSDataReply", [P_BARRIER] = "Barrier", @@ -3594,7 +3593,6 @@ const char *cmdname(enum drbd_packet cmd) [P_DATA_REQUEST] = "DataRequest", [P_RS_DATA_REQUEST] = "RSDataRequest", [P_SYNC_PARAM] = "SyncParam", - [P_SYNC_PARAM89] = "SyncParam89", [P_PROTOCOL] = "ReportProtocol", [P_UUIDS] = "ReportUUIDs", [P_SIZES] = "ReportSizes", @@ -3602,6 +3600,7 @@ const char *cmdname(enum drbd_packet cmd) [P_SYNC_UUID] = "ReportSyncUUID", [P_AUTH_CHALLENGE] = "AuthChallenge", [P_AUTH_RESPONSE] = "AuthResponse", + [P_STATE_CHG_REQ] = "StateChgRequest", [P_PING] = "Ping", [P_PING_ACK] = "PingAck", [P_RECV_ACK] = "RecvAck", @@ -3612,23 +3611,25 @@ const char *cmdname(enum drbd_packet cmd) [P_NEG_DREPLY] = "NegDReply", [P_NEG_RS_DREPLY] = "NegRSDReply", [P_BARRIER_ACK] = "BarrierAck", - [P_STATE_CHG_REQ] = "StateChgRequest", [P_STATE_CHG_REPLY] = "StateChgReply", [P_OV_REQUEST] = "OVRequest", [P_OV_REPLY] = "OVReply", [P_OV_RESULT] = "OVResult", [P_CSUM_RS_REQUEST] = "CsumRSRequest", [P_RS_IS_IN_SYNC] = "CsumRSIsInSync", + [P_SYNC_PARAM89] = "SyncParam89", [P_COMPRESSED_BITMAP] = "CBitmap", [P_DELAY_PROBE] = "DelayProbe", [P_OUT_OF_SYNC] = "OutOfSync", - [P_RETRY_WRITE] = "RetryWrite", [P_RS_CANCEL] = "RSCancel", [P_CONN_ST_CHG_REQ] = "conn_st_chg_req", [P_CONN_ST_CHG_REPLY] = "conn_st_chg_reply", [P_PROTOCOL_UPDATE] = "protocol_update", + [P_TRIM] = "Trim", [P_RS_THIN_REQ] = "rs_thin_req", [P_RS_DEALLOCATED] = "rs_deallocated", + [P_WSAME] = "WriteSame", + [P_ZEROES] = "Zeroes", /* enum drbd_packet, but not commands - obsoleted flags: * P_MAY_IGNORE -- 2.35.1