[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200713144930.1034632-11-lee.jones@linaro.org>
Date: Mon, 13 Jul 2020 15:49:15 +0100
From: Lee Jones <lee.jones@...aro.org>
To: linus.walleij@...aro.org
Cc: linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
Lee Jones <lee.jones@...aro.org>,
Sean Wang <sean.wang@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
linux-mediatek@...ts.infradead.org
Subject: [PATCH 10/25] pinctrl: mediatek: pinctrl-mtk-common-v2: Mark 'mtk_default_register_base_names' as __maybe_unused
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 <sean.wang@...nel.org>
Cc: Matthias Brugger <matthias.bgg@...il.com>
Cc: linux-mediatek@...ts.infradead.org
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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",
};
--
2.25.1
Powered by blists - more mailing lists