Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp102540pja; Fri, 22 Nov 2019 04:05:34 -0800 (PST) X-Google-Smtp-Source: APXvYqwH2fnnKRFeUGHtCj3pGEvRsHPuLmVFXzntvGR6kn2WXNH46NFH9zXSxln0aF8Q8cviaaGw X-Received: by 2002:aa7:d0c1:: with SMTP id u1mr612663edo.27.1574424334658; Fri, 22 Nov 2019 04:05:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574424334; cv=none; d=google.com; s=arc-20160816; b=JEogkN7dmTyXNPVaYCBgu+QxfR0ucso2Z/coS44S1Xvn/vMd6IYXH8Nh+Z5BCLsH5S bXgYaU07fHBhYrkZAmJIPqEfetosBG4y0JPYUMSxVF8t4mJcxiyj+Gmz9lUIsyKvz19p FZcb5ZBHY5jcX0ykOt9lJ1Oledz9+9dW3XLYxNmluN3s7jI3SGMBsoY1DRudTX0367Dw gM2diBl0XkO07/izpmw0yVlAyDjZJhFcyJ29CBvuDpnm63AdNPXY9b1srzMe4DYMc5iB 0byyM2QQSCRL6IV2DdcU8NijM9NhN2RYPzoq0PB9LMpnv5wKmDQw9RzeEvKqamY6HZN6 lE6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=QkDf5N8rlfOfJ83c4Ab74sZbnDm6ZQyxXqxOueoGcYs=; b=josOKuQU1MJk579zwPy3lr0vLyfGEbHHjcPlai3KIIKrPEjx1zunWATrrV2DeynP5s pxlx7skt23MVCqZwTi753y4u9bc4ipsEJtFSIZnwfIsyKGExgN7mBAXcdNYvNu9FkLCP WsQ5YMc8TAo/oyfTufeQGEkM1MkTVL+z/qGIzQl5OjMSON0B4LFPbmupQ2vKAZWtGt0W wD6a4U6gznxQ3tmDmeKFk9XtZQ7J/Kxk6PB/egmnam2+wqdV+P0wvohTm06DPB70+OYN aIaHVsC5xp5z7hQXRHBpHALlgn9cn+O3hc4YZB4btqar165cW+LVyk67BCKq3MqoyY48 T2rA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p29si5415070eda.104.2019.11.22.04.05.03; Fri, 22 Nov 2019 04:05:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727599AbfKVMDY (ORCPT + 99 others); Fri, 22 Nov 2019 07:03:24 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:32970 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727255AbfKVMDY (ORCPT ); Fri, 22 Nov 2019 07:03:24 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id D76088106B322F716145; Fri, 22 Nov 2019 20:03:19 +0800 (CST) Received: from localhost.localdomain (10.90.53.225) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Fri, 22 Nov 2019 20:03:10 +0800 From: Chen Wandun To: , , , , , CC: Subject: [PATCH] nand: onenand: samsung: remove variable 'tmp' set but not used Date: Fri, 22 Nov 2019 20:08:54 +0800 Message-ID: <1574424534-141265-1-git-send-email-chenwandun@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warning: drivers/mtd/nand/onenand/samsung_mtd.c: In function s3c_onenand_check_lock_status: drivers/mtd/nand/onenand/samsung_mtd.c:731:6: warning: variable tmp set but not used [-Wunused-but-set-variable] Signed-off-by: Chen Wandun --- drivers/mtd/nand/onenand/samsung_mtd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/onenand/samsung_mtd.c b/drivers/mtd/nand/onenand/samsung_mtd.c index 55e5536..3573b12 100644 --- a/drivers/mtd/nand/onenand/samsung_mtd.c +++ b/drivers/mtd/nand/onenand/samsung_mtd.c @@ -728,13 +728,12 @@ static void s3c_onenand_check_lock_status(struct mtd_info *mtd) struct onenand_chip *this = mtd->priv; struct device *dev = &onenand->pdev->dev; unsigned int block, end; - int tmp; end = this->chipsize >> this->erase_shift; for (block = 0; block < end; block++) { unsigned int mem_addr = onenand->mem_addr(block, 0, 0); - tmp = s3c_read_cmd(CMD_MAP_01(onenand, mem_addr)); + s3c_read_cmd(CMD_MAP_01(onenand, mem_addr)); if (s3c_read_reg(INT_ERR_STAT_OFFSET) & LOCKED_BLK) { dev_err(dev, "block %d is write-protected!\n", block); -- 2.7.4