From patchwork Mon Jul 13 14:49:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 235447 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2906888ilg; Mon, 13 Jul 2020 07:50:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWI04n/4X2uYk4tgxW0nv4Q4n3VQcj7ZSi/X22jHE7bNwh8Iyx/PTXjIdx+QIiTaP+YlWP X-Received: by 2002:a17:906:958f:: with SMTP id r15mr139022ejx.77.1594651852754; Mon, 13 Jul 2020 07:50:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594651852; cv=none; d=google.com; s=arc-20160816; b=zYKrqpKJu189sMLJL2uRcdKUg1Nvk4JlQizIxEb48/NeAoJFbgK9eCZMmWqnCjqGHH aDFwe5cxnRTCzAhQUJyWlnj9lKOAz39eT+/Wlher/P+4m6vc0ITfs1+TaeyqORiRV9Yq Bjp8+WAGcQcZuDPh3Lv0W7O5g2dH7MTt6daMriQ3bV1VM+iZQUO2nfkovEuyiy60v5rz aExLqGHs5Gaz6DLa5FDA4K9Kg/W4lVw0Tm/EPUcoIB93jnmB5plk8fncJynyoBBx5eMO ADs4COceaezIIScRCH+7WFQuBdrcf3gSPTSGySEa+bVhoM/Uqb+AKclP09GIB2KaisXX EzrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4tW5IFgDDqy7qyYDWJ2VHhOu5cDN/GOhkX5hDm+X0KA=; b=NLnJjWLgy/697+wSHQx3eK+aPZ6BO7JfO1VbdkyNS9iTWFH/DzF/ouQwVRhTElbDM4 6C9PumFmlnlYN/GmMVSvhttaUgl+2lZL2YmeaKVl7pChlzdsfzKdG7+CdUhRoIYLh51U jaSLP8l+stPcufQ22S11nbxxFPxl3g2uUfB4gOMsGbAoCyeODLF2DoSq7s5sEovtjHs8 brmdq4Ca1vJ5Me2VjebKbVm/zCvNtbf4hSXcdZd+g6N/uBYYk22j4of2MLC4J+YbolEI cHKiDq/T0kk2GRZK8u95YrlYafy9mp7ohLgBmjaAcPqwK8w8KLqCRAunFOZplj5PWs/+ HcwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WjClSL1n; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-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 dg8si8889492edb.184.2020.07.13.07.50.52; Mon, 13 Jul 2020 07:50:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-gpio-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=WjClSL1n; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-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 S1730146AbgGMOtp (ORCPT + 5 others); Mon, 13 Jul 2020 10:49:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730143AbgGMOtp (ORCPT ); Mon, 13 Jul 2020 10:49:45 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A579C061755 for ; Mon, 13 Jul 2020 07:49:45 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id j18so13588598wmi.3 for ; Mon, 13 Jul 2020 07:49:45 -0700 (PDT) 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=4tW5IFgDDqy7qyYDWJ2VHhOu5cDN/GOhkX5hDm+X0KA=; b=WjClSL1n2aF+iDQnyRNBBuqCOZEhWicWvABW9Y8n0ov9NCQi2T/5ZDyNbEbMC7NP4L gLKJ/VyZFokhHMKwL1I5ZkRbNsutDxl40DWjr7FLj53d0G3Uc4v/jZvzcCgJa7RAaa78 X/gvNjcxjE3WvbULnI1iDQKcK7NBquO/2uRMuBzxL+zDjXbwCOs6xEHHiURiyeiZFbLh dIIEYNY38n3ovFlJHQCXVnRuIbfvoCaUwGoEVhgzxpuhPwMs+jOKfKNn5T02n9JrJRs3 6VVnu31yidyKhClTtm7F1yqAh6E+hTVa2ZoJLWSP1fgL3/Xk0L6mPHWs2TP09tsqcWSS 24kA== 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=4tW5IFgDDqy7qyYDWJ2VHhOu5cDN/GOhkX5hDm+X0KA=; b=kBjP5xMqsIvXyzpyGmCDjMvRi+htKH8J3UwfzZFJRBTYatOJysyTLhGDut5oNTQpHJ bvF/HZ75hZH5xo24wVFv5QlrKpC03e8n4sS/B1o/QKlVKGIQpG3KP28KTqDMfH2azhxH I9uhuFcx0IALtoR02AP7aC90mYUs2utuH8X+ui7yzI+A6VQ3NV5CryhQ8EOCH9COdxWm 48bf6SdTyguOQpXufXK334hWk9oN4nM5/6WtnZFAcrWn/nYK7MqvyguVlRq4J4BLtRTf 0nxSTltVRhAdKs2glL9qR81O204DSmX9m5TWbXkMQO6Z52KKtWcEMAoVyuclLGG/lg4K R0Eg== X-Gm-Message-State: AOAM531CM3D9fx1YPdR4pozVDFou6w7jja3xOQW5bEGXDtMLPziqipB7 VWNxK1bf6neoXzm12HM2XeZZLQ== X-Received: by 2002:a1c:3546:: with SMTP id c67mr329914wma.102.1594651783867; Mon, 13 Jul 2020 07:49:43 -0700 (PDT) Received: from localhost.localdomain ([2.31.163.6]) by smtp.gmail.com with ESMTPSA id o29sm26207756wra.5.2020.07.13.07.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 07:49:43 -0700 (PDT) From: Lee Jones To: linus.walleij@linaro.org Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Lee Jones , Sean Wang , Matthias Brugger , linux-mediatek@lists.infradead.org Subject: [PATCH 10/25] pinctrl: mediatek: pinctrl-mtk-common-v2: Mark 'mtk_default_register_base_names' as __maybe_unused Date: Mon, 13 Jul 2020 15:49:15 +0100 Message-Id: <20200713144930.1034632-11-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200713144930.1034632-1-lee.jones@linaro.org> References: <20200713144930.1034632-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Not all sourcefiles which end up including pinctrl-mtk-common-v2.h make use of 'mtk_default_register_base_names' and there is nowhere we can place the definition to void the need for __maybe_unused except its own headerfile, which seems like overkill. So instead we tell the compiler that it's okay for it to be unused by some of the consumers. Fixes the following W=1 kernel build warning(s): In file included from drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c:19: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h:83:27: warning: ‘mtk_default_register_base_names’ defined but not used [-Wunused-const-variable=] 83 | static const char const mtk_default_register_base_names[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/pinctrl/mediatek/pinctrl-moore.h:25, from drivers/pinctrl/mediatek/pinctrl-moore.c:12: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h:83:27: warning: ‘mtk_default_register_base_names’ defined but not used [-Wunused-const-variable=] 83 | static const char const mtk_default_register_base_names[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/pinctrl/mediatek/pinctrl-paris.h:27, from drivers/pinctrl/mediatek/pinctrl-paris.c:15: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h:83:27: warning: ‘mtk_default_register_base_names’ defined but not used [-Wunused-const-variable=] 83 | static const char const mtk_default_register_base_names[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/pinctrl/mediatek/pinctrl-paris.h:27, from drivers/pinctrl/mediatek/pinctrl-mtk-mt6797.h:15, from drivers/pinctrl/mediatek/pinctrl-mt6797.c:13: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h:83:27: warning: ‘mtk_default_register_base_names’ defined but not used [-Wunused-const-variable=] 83 | static const char const mtk_default_register_base_names[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/pinctrl/mediatek/pinctrl-paris.h:27, from drivers/pinctrl/mediatek/pinctrl-mtk-mt8183.h:12, from drivers/pinctrl/mediatek/pinctrl-mt8183.c:9: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h:83:27: warning: ‘mtk_default_register_base_names’ defined but not used [-Wunused-const-variable=] 83 | static const char const mtk_default_register_base_names[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/pinctrl/mediatek/pinctrl-paris.h:27, from drivers/pinctrl/mediatek/pinctrl-mtk-mt6765.h:12, from drivers/pinctrl/mediatek/pinctrl-mt6765.c:10: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h:83:27: warning: ‘mtk_default_register_base_names’ defined but not used [-Wunused-const-variable=] 83 | static const char const mtk_default_register_base_names[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Sean Wang Cc: Matthias Brugger Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones --- drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1 Acked-by: Sean Wang diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h index 27df087363960..45aa0fdbe3306 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h @@ -80,7 +80,7 @@ enum { DRV_GRP_MAX, }; -static const char * const mtk_default_register_base_names[] = { +static const char * const mtk_default_register_base_names[] __maybe_unused = { "base", };