Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2578557rwb; Sun, 4 Sep 2022 19:55:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR4XgKbA0yA+/JQgQUXsu/w+5xAN0u0Aj2hrRTDEm2dRDvMe45QuqsPydWXvc+Jk9l4IfirW X-Received: by 2002:a17:906:9b87:b0:733:1795:2855 with SMTP id dd7-20020a1709069b8700b0073317952855mr34212052ejc.156.1662346527501; Sun, 04 Sep 2022 19:55:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662346527; cv=none; d=google.com; s=arc-20160816; b=RxDDakw150eRdnyjqrLN5EIbDUZfj9EhgTzX85+mfVKSgrPKz/OqN9NPhI9wgPb7aA T4ygUp2YMiieQxOkdh3V76w51M4lrRG5RGb1kLxXRicxB1ujS8SUj66XSLoE8Ey7ien1 UKMtwy5qVWDxe4ifID6sWpZrYwwMSeUkAmJ38e9eN8FnMEl3vsohVOrQ1QR/grPEeJ4v 9M322I3fSG5ApbknEscw5vuXzLyy2oWijPJfedGa+RI+HPjVq3MSQwnI6CASyQWt721s kL/2gCKHJYSBgx7GwQvCI2Y+dFBUPK9AmRR0Zy+vSn+3hsTqYM4OLNsjFFVk3DEIM2y4 kCmg== 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; bh=lRSg08CZYRpeL6krSZyhk0D9iH4EWhUNrjIXUqAj9vs=; b=zW0pr8i9D8p2/J+gkr2NFzl+jd9AjLxMPGyLPbJPk/NYfCycDGlT2dOVRUI50/wcG4 CILqx1qm+5NUL6E/xjW4Rf7tEgJEiKfa7/q4Vr7VaAjb6brgaYd3vp0UIqAkoR5wUFvJ 9eCAxF2rhspucuRYOLTU54PXh8coI4glYxoS1DRtB7r8k5pHl665GuWHNP5FrZdhWwOF YztPkb7n/DpzT1Uv8giKxscKKvtb2c7aMYmzf9N3cmm1wZKylJjscPq5hISECYBMCe0q ZPm20Pfn0EZiDhZ5q8LoUpM8384iT7g/lKND/UnRme7KEpfsxZ7+2mBFvcnxYVn14S36 Gfog== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p10-20020a1709060dca00b0073d6a11ff3dsi5793839eji.456.2022.09.04.19.55.02; Sun, 04 Sep 2022 19:55:27 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235545AbiIEC0X (ORCPT + 99 others); Sun, 4 Sep 2022 22:26:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231820AbiIEC0U (ORCPT ); Sun, 4 Sep 2022 22:26:20 -0400 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CBD0275E9; Sun, 4 Sep 2022 19:26:18 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0VOJODjO_1662344755; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VOJODjO_1662344755) by smtp.aliyun-inc.com; Mon, 05 Sep 2022 10:26:16 +0800 From: Jiapeng Chong To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] block/blk-map: Remove set but unused variable 'added' Date: Mon, 5 Sep 2022 10:25:53 +0800 Message-Id: <20220905022553.77178-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham 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 The variable added is not effectively used in the function, so delete it. block/blk-map.c:273:16: warning: variable 'added' set but not used. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2049 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- block/blk-map.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/blk-map.c b/block/blk-map.c index 2fbe298d3822..a06919822a73 100644 --- a/block/blk-map.c +++ b/block/blk-map.c @@ -270,7 +270,7 @@ static int bio_map_user_iov(struct request *rq, struct iov_iter *iter, while (iov_iter_count(iter)) { struct page **pages, *stack_pages[UIO_FASTIOV]; ssize_t bytes; - size_t offs, added = 0; + size_t offs = 0; int npages; if (nr_vecs <= ARRAY_SIZE(stack_pages)) { @@ -306,7 +306,6 @@ static int bio_map_user_iov(struct request *rq, struct iov_iter *iter, break; } - added += n; bytes -= n; offs = 0; } -- 2.20.1.7.g153144c