Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1584799pxb; Fri, 6 Nov 2020 13:40:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzj3RAf8ZrtPYwGmtiF+gpzRgbiYbFuvKrX0XvUIHJ6TBptpXrLE/rpRTo7bV9qmSu+aAqj X-Received: by 2002:a17:906:3a8d:: with SMTP id y13mr4203403ejd.460.1604698801207; Fri, 06 Nov 2020 13:40:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604698801; cv=none; d=google.com; s=arc-20160816; b=UXUhC6GIuRmRHvMkxRbblk0L4iSoNc14EIHFkTjHiaj8OBd190f/p0pISWx4aheBKs 49VHz77eddoN7VTyptmqA9Fby3V9pMEAf22YUqKCti9/kv1Rk5mjJ1XWpGH/UN2xJHXI fWiPUEerFS7FoCW1EXfXlkyQY+khESDkd+p1oyr6rm0VZDdZW1AShbPjIPXRej/u+6Ea 1QMiTj+jze6DGPbQ8+b8iKMS/yZdaGBqY5BvNCx6aE/Zj1NVqvtlbUY5g+KEm9luOYcC Xyx7aTpbJFSZjrS7xorw4obHEwxBkHv5NqlMx/aiUCt+41NsQTE0+1CddgburMVkqxtU hl/Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zU6AEe7QJ86BUUdNT9vgeNl78+UInfUWOmxhJubmBR0=; b=Lj3Ps1mj8tmPq7yQHWk9APgsFasxm6t225eS7bK5gnRx5Lkzf6VNIKEooMAWJjz7OR D7jpSAPKgHHeckAYaRL5f1RnG6KjsuiuOY+jarElehLckJ3ahHm+FacrHYCY1z5nY9N1 T6LCRMe1R0tSrE4Dpz85DXlN59nbn/ocmE/Zmo3lDW0F7NffzQ8GIDqD8EJlPXJ13lhr 5vk+0zjP6UBEbN/IV8e9GSeKlcRrHKAveh4Dvmn+vrnS1jV61sztTt2R7UFbrdioBT6j giXt4j4oknQjdcwZWUmApgKb2q/jr2JXgYb2x6q9s81OgXkOdaegzWMJEsQoJRl1nqhQ uzDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YuusY46l; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y3si1950485edq.324.2020.11.06.13.39.38; Fri, 06 Nov 2020 13:40:01 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=YuusY46l; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728637AbgKFVha (ORCPT + 99 others); Fri, 6 Nov 2020 16:37:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728591AbgKFVhV (ORCPT ); Fri, 6 Nov 2020 16:37:21 -0500 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B33FFC0613CF for ; Fri, 6 Nov 2020 13:37:20 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id y12so2771573wrp.6 for ; Fri, 06 Nov 2020 13:37:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zU6AEe7QJ86BUUdNT9vgeNl78+UInfUWOmxhJubmBR0=; b=YuusY46lidvYZNZcyIlP029LugBzFM5/o75ceo7IvkH//GmrbJTHOAsMyoRKekOXtQ TMitq0JQgNzh3BTtq1WMw7iHMlVscy6Pm0oe+l3nNt7n3n58MDHtM1EgF5zfaxwvzpej TrplfRFEutXmar5oP3bwEM/W2dm2yvMrpuTx2ZmGIUVIQ1qysS9V7ChRifCaiMV2VLli Z6eIumohXtw/X03cudUHrEE4fE8PNkpyvpHPyHsyDCwlxgc1xtzbCYB6P2eQTjFfiaDI PkJJ9KI6WIdnWirDj9iQCXiQ8OV6wQLGf1xhikpyTW4Lge5bH3lIbJzAe3MfnGOBtvBX gCyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zU6AEe7QJ86BUUdNT9vgeNl78+UInfUWOmxhJubmBR0=; b=pDAtOImdmyMB8An+WQ8PAaWT6qdvBpF04gH6M7+YxPTWMyBTwcPQ/hiwUaBXDWxBl5 rAHTJKxb4JvaEI1CMCBHIX5t3vmZodikD3fA2kHGVxzzqB/AVkluTdeP4WSoEkeIqr7d TsODhwMdDmRyscc+4jXKE7Wu+/+g+GycYHQphY0swqLHab4WeCmRGrE28t68sGeBKt2v BBPb9rUruS/UNvQUwHwHfMGMk9QDEKWQ9cgEQ5qykBdrr+BwzFLxo0XUOjLA14uFQs05 fEgqb+Dtk8Nlo5PnlGYTN0hkVArj9xE6TRbqGCf4R5iD8b6qZioUa4SPYkz7d64uEW58 i/6g== X-Gm-Message-State: AOAM532G+b+5EY7xKnF/x1emLN3ho9/Wz64vta4o795AjnJZp+gCPiHj cgKyiX5YYxrDP5bXCT1dCJGh7g== X-Received: by 2002:adf:fd06:: with SMTP id e6mr4794908wrr.206.1604698639476; Fri, 06 Nov 2020 13:37:19 -0800 (PST) Received: from dell.default ([91.110.221.236]) by smtp.gmail.com with ESMTPSA id d16sm3984942wrw.17.2020.11.06.13.37.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Nov 2020 13:37:18 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Cc: linux-kernel@vger.kernel.org, Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Boris Brezillon , Dan Brown , David Woodhouse , Thomas Gleixner , linux-mtd@lists.infradead.org Subject: [PATCH v2 15/23] mtd: nand: raw: diskonchip: Marking unused variables as __always_unused Date: Fri, 6 Nov 2020 21:36:47 +0000 Message-Id: <20201106213655.1838861-16-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201106213655.1838861-1-lee.jones@linaro.org> References: <20201106213655.1838861-1-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'dummy' is never checked (as per the nomenclature) and the use of 'emtpymatch' is currently #if 0'ed out. We could also #if 0 the declaration, but #ifery is pretty ugly, so I like to keep it to a minimum. Fixes the following W=1 kernel build warning(s): drivers/mtd/nand/raw/diskonchip.c: In function ‘DoC_Delay’: drivers/mtd/nand/raw/diskonchip.c:219:16: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] drivers/mtd/nand/raw/diskonchip.c: In function ‘doc200x_calculate_ecc’: drivers/mtd/nand/raw/diskonchip.c:706:6: warning: variable ‘emptymatch’ set but not used [-Wunused-but-set-variable] Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Boris Brezillon Cc: Dan Brown Cc: David Woodhouse Cc: Thomas Gleixner Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones --- drivers/mtd/nand/raw/diskonchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/diskonchip.c b/drivers/mtd/nand/raw/diskonchip.c index 94432a453e5ee..d5050e32cc421 100644 --- a/drivers/mtd/nand/raw/diskonchip.c +++ b/drivers/mtd/nand/raw/diskonchip.c @@ -216,7 +216,7 @@ static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc) static void DoC_Delay(struct doc_priv *doc, unsigned short cycles) { - volatile char dummy; + volatile char __always_unused dummy; int i; for (i = 0; i < cycles; i++) { @@ -703,7 +703,7 @@ static int doc200x_calculate_ecc(struct nand_chip *this, const u_char *dat, struct doc_priv *doc = nand_get_controller_data(this); void __iomem *docptr = doc->virtadr; int i; - int emptymatch = 1; + int __always_unused emptymatch = 1; /* flush the pipeline */ if (DoC_is_2000(doc)) { -- 2.25.1