Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp261568pxy; Wed, 28 Apr 2021 03:55:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoTIh+/u59nuI++4feu/Aqt5hd5TKHs50QJ2vxcnfWY3sl3CPDe1yu1hJwZoKuoQBVOLGP X-Received: by 2002:a17:906:828b:: with SMTP id h11mr20194891ejx.305.1619607331458; Wed, 28 Apr 2021 03:55:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619607331; cv=none; d=google.com; s=arc-20160816; b=KA7KTHnTeJHigvCVkfh1euBneBBBMPVYnFor3hQohe40z4zgpTYBAYatsT4zk5FjAi y5a58/OYrLv+vw9ZmfKxZl1NDoqBDDwCwsY/GgznHLHOHU/i0/5rTS+kBGQ1wnC29Bm/ AGbOI4lQwAwgUqOElBilXj1ndfpZ7xcgtJVQaKazo8sDHKrypX3pxEpEk2N/uCLspZ7m K7TeBqLpOrBY0zgVZL0UbHWWxk24uiivl3uXmcVQd8AE190Wk2XRnDVX5mt2iskwk14U WulXlVvb2rW/h+ulQ/RpBMzNH2y0En7k/HF3FPYdxEcuxtt2SsXopKEG5XyPmdXhGTZE jZ0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=E7bETbHtYP75m/X4AaA+oI4NtzS4fT7gq/ei6Z7g43w=; b=PYCzyN993xP20K3IoKJTuJbCBirgRqIJh77eYoD9l7ItwRWmaEkNhx/fOuYVoLLw+h VFq9+3gXXt7i56hSH0M63WkkDNJElZJJG48iFVmQXSYOj1FV5ZafV8q2LdTcWTExfv/v zZETAIDXMFmkuB4rzNV4XCk+JQTWNRxnwtUwEmhQITvMHGvAkrv37I3XQUNIZVJoWWAm 4uaxbh2Zta/RFnr62Pc8YQuoJuJe2uif03R8hObi0QLpOuMV2FP3gXW0fb05tw1dYQ+4 G8YlQA7Uta6VSfK0sONt3NBPggQ/HHeUGJMoGqQm9rLyZD6nKcVwqyFR8WYl5PI8Ccpe /PNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cn23si1753283edb.168.2021.04.28.03.55.06; Wed, 28 Apr 2021 03:55:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S238927AbhD1KDP (ORCPT + 99 others); Wed, 28 Apr 2021 06:03:15 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:59554 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238684AbhD1KDM (ORCPT ); Wed, 28 Apr 2021 06:03:12 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R251e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0UX3IHwS_1619604144; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UX3IHwS_1619604144) by smtp.aliyun-inc.com(127.0.0.1); Wed, 28 Apr 2021 18:02:26 +0800 From: Yang Li To: miquel.raynal@bootlin.com Cc: richard@nod.at, vigneshr@ti.com, nathan@kernel.org, ndesaulniers@google.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Yang Li Subject: [PATCH] mtd: tests: Remove redundant assignment to err Date: Wed, 28 Apr 2021 18:02:22 +0800 Message-Id: <1619604142-119891-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable 'err' is set to 0 but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: drivers/mtd/tests/torturetest.c:233:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/mtd/tests/torturetest.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/mtd/tests/torturetest.c b/drivers/mtd/tests/torturetest.c index 6787ac5..841689b 100644 --- a/drivers/mtd/tests/torturetest.c +++ b/drivers/mtd/tests/torturetest.c @@ -230,8 +230,6 @@ static int __init tort_init(void) if (!bad_ebs) goto out_check_buf; - err = 0; - /* Initialize patterns */ memset(patt_FF, 0xFF, mtd->erasesize); for (i = 0; i < mtd->erasesize / pgsize; i++) { -- 1.8.3.1