All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/x86: intel_pmc_ipc: Mark ipc_data_readb() as __maybe_unused
@ 2017-05-25 22:15 Matthias Kaehlcke
  2017-05-26  9:53 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Kaehlcke @ 2017-05-25 22:15 UTC (permalink / raw)
  To: Zha Qipeng, Darren Hart, Andy Shevchenko, Alan Cox
  Cc: linux-kernel, platform-driver-x86, Douglas Anderson, Matthias Kaehlcke

The function is currently not used, however it is part of the API and
might be used in the future. Adding the attribute fixes the following
warning when building with clang:

    drivers/platform/x86/intel_pmc_ipc.c:189:18: error: unused function
        'ipc_data_readb' [-Werror,-Wunused-function]

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
 drivers/platform/x86/intel_pmc_ipc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c
index e4d4dfe3e1d1..bb792a52248b 100644
--- a/drivers/platform/x86/intel_pmc_ipc.c
+++ b/drivers/platform/x86/intel_pmc_ipc.c
@@ -186,7 +186,7 @@ static inline void ipc_data_writel(u32 data, u32 offset)
 	writel(data, ipcdev.ipc_base + IPC_WRITE_BUFFER + offset);
 }
 
-static inline u8 ipc_data_readb(u32 offset)
+static inline u8 __maybe_unused ipc_data_readb(u32 offset)
 {
 	return readb(ipcdev.ipc_base + IPC_READ_BUFFER + offset);
 }
-- 
2.13.0.219.gdb65acc882-goog

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] platform/x86: intel_pmc_ipc: Mark ipc_data_readb() as __maybe_unused
  2017-05-25 22:15 [PATCH] platform/x86: intel_pmc_ipc: Mark ipc_data_readb() as __maybe_unused Matthias Kaehlcke
@ 2017-05-26  9:53 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2017-05-26  9:53 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Zha Qipeng, Darren Hart, Andy Shevchenko, Alan Cox, linux-kernel,
	Platform Driver, Douglas Anderson

On Fri, May 26, 2017 at 1:15 AM, Matthias Kaehlcke <mka@chromium.org> wrote:
> The function is currently not used, however it is part of the API and
> might be used in the future. Adding the attribute fixes the following
> warning when building with clang:
>
>     drivers/platform/x86/intel_pmc_ipc.c:189:18: error: unused function
>         'ipc_data_readb' [-Werror,-Wunused-function]
>

Pushed to testing, thanks!

> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
>  drivers/platform/x86/intel_pmc_ipc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c
> index e4d4dfe3e1d1..bb792a52248b 100644
> --- a/drivers/platform/x86/intel_pmc_ipc.c
> +++ b/drivers/platform/x86/intel_pmc_ipc.c
> @@ -186,7 +186,7 @@ static inline void ipc_data_writel(u32 data, u32 offset)
>         writel(data, ipcdev.ipc_base + IPC_WRITE_BUFFER + offset);
>  }
>
> -static inline u8 ipc_data_readb(u32 offset)
> +static inline u8 __maybe_unused ipc_data_readb(u32 offset)
>  {
>         return readb(ipcdev.ipc_base + IPC_READ_BUFFER + offset);
>  }
> --
> 2.13.0.219.gdb65acc882-goog
>



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-26  9:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-25 22:15 [PATCH] platform/x86: intel_pmc_ipc: Mark ipc_data_readb() as __maybe_unused Matthias Kaehlcke
2017-05-26  9:53 ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.