lkml.org 
[lkml]   [2023]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mfd: intel-lpss: hide suspend/resume functions in #ifdef
On Tue, 16 May 2023, Arnd Bergmann wrote:

> From: Arnd Bergmann <arnd@arndb.de>
>
> When CONFIG_PM is disabled, the prototypes for these two functions
> are not visible:
>
> drivers/mfd/intel-lpss.c:482:5: error: no previous prototype for 'intel_lpss_suspend' [-Werror=missing-prototypes]
> 482 | int intel_lpss_suspend(struct device *dev)
> | ^~~~~~~~~~~~~~~~~~
> drivers/mfd/intel-lpss.c:503:5: error: no previous prototype for 'intel_lpss_resume' [-Werror=missing-prototypes]
> 503 | int intel_lpss_resume(struct device *dev)
>
> Add the same #ifdef around the definition of the unused functions,
> which avoids the warning and slightly reduces the code size.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/mfd/intel-lpss.c | 2 ++
> 1 file changed, 2 insertions(+)

Applied, thanks

--
Lee Jones [李琼斯]

\
 
 \ /
  Last update: 2023-05-25 12:33    [W:4.012 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site