Re: [PATCH 10/25] pinctrl: mediatek: pinctrl-mtk-common-v2: Mark 'mtk_default_register_base_names' as __maybe_unused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 13, 2020 at 7:49 AM Lee Jones <lee.jones@xxxxxxxxxx> 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@xxxxxxxxxx>
> Cc: Matthias Brugger <matthias.bgg@xxxxxxxxx>
> Cc: linux-mediatek@xxxxxxxxxxxxxxxxxxx
> Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>

Those MediaTek SoCs with multiple register bases wouldn't refer to the array
Acked-by: Sean Wang <sean.wang@xxxxxxxxxx>

> ---
>  drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h | 2 +-




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux