From patchwork Thu Mar 30 21:27:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 77419 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp145309vqo; Thu, 30 Mar 2023 14:33:55 -0700 (PDT) X-Google-Smtp-Source: AK7set8zCoVi0NGOXBymAbdc5RGVflE/wGa3+KfxFWB+74uWe4YJxOPKOzfSZRL3lL1T5PxJmDm9 X-Received: by 2002:a05:6a20:7921:b0:d7:4339:fac6 with SMTP id b33-20020a056a20792100b000d74339fac6mr19721217pzg.5.1680212034842; Thu, 30 Mar 2023 14:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680212034; cv=none; d=google.com; s=arc-20160816; b=p3ENs+PBXx9OMoJ0Wi0i5r5o71K/2M/hsHqaWOQtrS5eXcs6GFiUOLo81qTaMIOHLJ bzS55KbdqcNrWtuyx1mhGrhnf6qySRHc8Pnv8efyPaePNmbbSG2l0uaVJERATabkUbZv Pd12rOu8Bv6HVwPZxNAkYVR6DgMnx/2PUqYvr7y64WuygJjDR8q594yewEQ4mAd+u8Vt ntdye1hhMulEQ451w28qeRiInr7TXmQScoayjb/fgJ6e9a5OjR6/okgID/pEf73o34Xc Hbc28xsgSgUplHFRlRIJpxAk1pU5b0QYog//kdH+mhgD0gbqZ3OwzoXak+X5RnEakVW9 2D1Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=rt6EJ3ZeV4qq0asIu+DFVmM346d+zHCFno0fyrsIV8Y=; b=lLticEv4getex39Dc8b+0ISAWSTpc3OFTycDzZclqEv29Q37AYb6WcHsgzY6n037KB +ncYSuq5CcWJSPZX0Tdy7SrO7G1nCYPQ/18viK+oHRyi/M84ramq71osuxgcGKViQcgd z7hxtDcp3sdqaSHWsaCmpbeEeH06gJu++K3wPrT0RCjhxApXTy0TqDrlHkqCoBs4GN1o mDE5pG/HlneqbTGhbpDlsNOtwOu7W3+E52tIzAoKgnV4BaQNVlugL0iFnX+LnfJVT2mS Rm8DmNxAsLsw6bqogsArjrUDgHYIb7GJ5xwf1UmwUFqIbqBaPKR2RfNlkNOiiep4tYpS 4Rpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cwV52hb7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y1-20020a633201000000b0050bf5879be4si685336pgy.209.2023.03.30.14.33.42; Thu, 30 Mar 2023 14:33:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cwV52hb7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230079AbjC3V2u (ORCPT + 99 others); Thu, 30 Mar 2023 17:28:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229921AbjC3V2t (ORCPT ); Thu, 30 Mar 2023 17:28:49 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 603B1C17F for ; Thu, 30 Mar 2023 14:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680211684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=rt6EJ3ZeV4qq0asIu+DFVmM346d+zHCFno0fyrsIV8Y=; b=cwV52hb7p/KMn+wVpqNYDJLUvurHhr10jButSBWJteuHCPdXqSGPRnDRvaSjS9VMzf6Gkw 8ueARUtTTtw2CPWJQPD+ghCoTg1ER1UcanJF2/gFg+KCE+19da3/A8OLGQK52uQWSS/264 hA3rIlckzX5X4cwzcWHbcvn90yo4kRs= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-650-r3kBRERzMCmZ-p6nAIAPRQ-1; Thu, 30 Mar 2023 17:28:03 -0400 X-MC-Unique: r3kBRERzMCmZ-p6nAIAPRQ-1 Received: by mail-qt1-f199.google.com with SMTP id v7-20020a05622a188700b003e0e27bbc2eso13292938qtc.8 for ; Thu, 30 Mar 2023 14:28:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680211682; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rt6EJ3ZeV4qq0asIu+DFVmM346d+zHCFno0fyrsIV8Y=; b=k+LVetN/xSQrYwPbRxu83leVMGQkZrai/I9xhAxmiXj4WfKHJ45zRPZh1FLWlpXP2+ 6FtQehojVjj1r73CNIvSmGb7ilPbf3xDI763gcynUWZxru+MriDEiLXL015+7iVKPBS7 ObcBafFBfhLjqwFvsU+cuREflvffBU1liYKB+mUifW6syY11HcovnebRHGsGB41gxcMg PKo0+9UoxEW3V5fJ9mrKgiIjJi/5CGPLQCXyM8uNFv51xqiSFwyaYb/WVFnUf05x2W6M 11wd+YBEtCn24tBo7Z6vE1BC3vE1x7m7onyr+ZrCuTNtiZ3Wp8z1j+Z8ZpYnhNnbETgt DbFw== X-Gm-Message-State: AAQBX9dp15ej67Di0UBAuUuskhcaavYDjLxeNmZD42ejQ1fxGmbdlBhb pgBhnhjV0QmvTkNwONZiFp8nebaAOca+pU7MXTUfV8XkbzCXF2rSpMgpeXCHcO6fsxyrMMHcYiH FjcqHIhRS454pSHx7QEY0FoUX X-Received: by 2002:ad4:4eaf:0:b0:570:bf43:48c with SMTP id ed15-20020ad44eaf000000b00570bf43048cmr43188298qvb.17.1680211682480; Thu, 30 Mar 2023 14:28:02 -0700 (PDT) X-Received: by 2002:ad4:4eaf:0:b0:570:bf43:48c with SMTP id ed15-20020ad44eaf000000b00570bf43048cmr43188280qvb.17.1680211682193; Thu, 30 Mar 2023 14:28:02 -0700 (PDT) Received: from dell-per740-01.7a2m.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id 18-20020a05620a041200b00746059d9c3fsm172156qkp.35.2023.03.30.14.28.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 14:28:01 -0700 (PDT) From: Tom Rix To: agk@redhat.com, snitzer@kernel.org, nathan@kernel.org, ndesaulniers@google.com Cc: dm-devel@redhat.com, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Tom Rix Subject: [PATCH] dm raid: remove unused d variable Date: Thu, 30 Mar 2023 17:27:53 -0400 Message-Id: <20230330212753.1843266-1-trix@redhat.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761830014488286894?= X-GMAIL-MSGID: =?utf-8?q?1761830014488286894?= clang with W=1 reports drivers/md/dm-raid.c:2212:15: error: variable 'd' set but not used [-Werror,-Wunused-but-set-variable] unsigned int d; ^ This variable is not used so remove it. Signed-off-by: Tom Rix --- drivers/md/dm-raid.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index 60632b409b80..2dfd51509647 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -2209,7 +2209,6 @@ static int super_load(struct md_rdev *rdev, struct md_rdev *refdev) static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev) { int role; - unsigned int d; struct mddev *mddev = &rs->md; uint64_t events_sb; uint64_t failed_devices[DISKS_ARRAY_ELEMS]; @@ -2324,7 +2323,6 @@ static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev) * to provide capacity for redundancy or during reshape * to add capacity to grow the raid set. */ - d = 0; rdev_for_each(r, mddev) { if (test_bit(Journal, &rdev->flags)) continue; @@ -2340,8 +2338,6 @@ static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev) if (test_bit(FirstUse, &r->flags)) rebuild_and_new++; } - - d++; } if (new_devs == rs->raid_disks || !rebuilds) {