[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGp9LzoQVPPPgoBVYeLTuTsWjS_Ug48wjTDh=Pk3KWdpFrLiaQ@mail.gmail.com>
Date: Tue, 14 Jul 2020 14:21:54 -0700
From: Sean Wang <sean.wang@...nel.org>
To: Lee Jones <lee.jones@...aro.org>
Cc: Linus Walleij <linus.walleij@...aro.org>,
lkml <linux-kernel@...r.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH 10/25] pinctrl: mediatek: pinctrl-mtk-common-v2: Mark
'mtk_default_register_base_names' as __maybe_unused
On Mon, Jul 13, 2020 at 7:49 AM Lee Jones <lee.jones@...aro.org> wrote:
>
> 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>
Those MediaTek SoCs with multiple register bases wouldn't refer to the array
Acked-by: Sean Wang <sean.wang@...nel.org>
> ---
> drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h | 2 +-
Powered by blists - more mailing lists