* [PATCH] ACPI/video: mark acpi_video_get_levels inline
@ 2016-05-12 21:00 Arnd Bergmann
2016-05-13 21:59 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2016-05-12 21:00 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Arnd Bergmann, Robert Moore, Lv Zheng, Len Brown, Hans de Goede,
Darren Hart, Borislav Petkov, Aaron Lu, Sudeep Holla, linux-acpi,
devel, linux-kernel
A recent patch added a stub function for acpi_video_get_levels when
CONFIG_ACPI_VIDEO is disabled. However, this is marked as 'static'
and causes a warning about an unused function whereever the header
gets included:
In file included from ../drivers/gpu/drm/radeon/radeon_acpi.c:28:0:
include/acpi/video.h:74:12: error: 'acpi_video_get_levels' defined but not used [-Werror=unused-function]
This makes the declaration 'static inline', which gets rid of the
warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 059500940def ("ACPI/video: export acpi_video_get_levels")
---
include/acpi/video.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/acpi/video.h b/include/acpi/video.h
index a4b96c971564..70a41f742037 100644
--- a/include/acpi/video.h
+++ b/include/acpi/video.h
@@ -71,7 +71,7 @@ static inline bool acpi_video_handles_brightness_key_presses(void)
{
return false;
}
-static int acpi_video_get_levels(struct acpi_device *device,
+static inline int acpi_video_get_levels(struct acpi_device *device,
struct acpi_video_device_brightness **dev_br)
{
return -ENODEV;
--
2.7.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ACPI/video: mark acpi_video_get_levels inline
2016-05-12 21:00 [PATCH] ACPI/video: mark acpi_video_get_levels inline Arnd Bergmann
@ 2016-05-13 21:59 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2016-05-13 21:59 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Rafael J. Wysocki, Robert Moore, Lv Zheng, Len Brown,
Hans de Goede, Darren Hart, Borislav Petkov, Aaron Lu,
Sudeep Holla, ACPI Devel Maling List, devel,
Linux Kernel Mailing List
On Thu, May 12, 2016 at 11:00 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> A recent patch added a stub function for acpi_video_get_levels when
> CONFIG_ACPI_VIDEO is disabled. However, this is marked as 'static'
> and causes a warning about an unused function whereever the header
> gets included:
>
> In file included from ../drivers/gpu/drm/radeon/radeon_acpi.c:28:0:
> include/acpi/video.h:74:12: error: 'acpi_video_get_levels' defined but not used [-Werror=unused-function]
>
> This makes the declaration 'static inline', which gets rid of the
> warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 059500940def ("ACPI/video: export acpi_video_get_levels")
> ---
> include/acpi/video.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/acpi/video.h b/include/acpi/video.h
> index a4b96c971564..70a41f742037 100644
> --- a/include/acpi/video.h
> +++ b/include/acpi/video.h
> @@ -71,7 +71,7 @@ static inline bool acpi_video_handles_brightness_key_presses(void)
> {
> return false;
> }
> -static int acpi_video_get_levels(struct acpi_device *device,
> +static inline int acpi_video_get_levels(struct acpi_device *device,
> struct acpi_video_device_brightness **dev_br)
> {
> return -ENODEV;
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-13 21:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-12 21:00 [PATCH] ACPI/video: mark acpi_video_get_levels inline Arnd Bergmann
2016-05-13 21:59 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®