From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 615C5C55179 for ; Fri, 6 Nov 2020 21:37:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08290208C7 for ; Fri, 6 Nov 2020 21:37:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="YuusY46l" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728643AbgKFVhb (ORCPT ); Fri, 6 Nov 2020 16:37:31 -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-Google-Smtp-Source: ABdhPJy0Ln9YOb1EajhIy7Mo7bt888ijqJbJAEpFYJf3GJYPpvuee8zVbgMhCF7sJ2CcQerM5hcZHQ== 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