diff mbox series

[2/3] platform: classmate: mark SPI related data as maybe unused

Message ID 20230312132624.352703-2-krzysztof.kozlowski@linaro.org (mailing list archive)
State Accepted, archived
Headers show
Series [1/3] platform: olpc: mark SPI related data as maybe unused | expand

Commit Message

Krzysztof Kozlowski March 12, 2023, 1:26 p.m. UTC
The driver can be compile tested as built-in making certain data unused:

  drivers/platform/x86/classmate-laptop.c:1137:36: error: ‘cmpc_device_ids’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/platform/x86/classmate-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hans de Goede March 16, 2023, 3:14 p.m. UTC | #1
Hi,

On 3/12/23 14:26, Krzysztof Kozlowski wrote:
> The driver can be compile tested as built-in making certain data unused:
> 
>   drivers/platform/x86/classmate-laptop.c:1137:36: error: ‘cmpc_device_ids’ defined but not used [-Werror=unused-const-variable=]
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Thank you for your patch, I've applied this patch and patch 3/3
to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans

> ---
>  drivers/platform/x86/classmate-laptop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c
> index 8b6a14611859..2edaea2492df 100644
> --- a/drivers/platform/x86/classmate-laptop.c
> +++ b/drivers/platform/x86/classmate-laptop.c
> @@ -1134,7 +1134,7 @@ static void cmpc_exit(void)
>  module_init(cmpc_init);
>  module_exit(cmpc_exit);
>  
> -static const struct acpi_device_id cmpc_device_ids[] = {
> +static const struct acpi_device_id cmpc_device_ids[] __maybe_unused = {
>  	{CMPC_ACCEL_HID, 0},
>  	{CMPC_ACCEL_HID_V4, 0},
>  	{CMPC_TABLET_HID, 0},
diff mbox series

Patch

diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c
index 8b6a14611859..2edaea2492df 100644
--- a/drivers/platform/x86/classmate-laptop.c
+++ b/drivers/platform/x86/classmate-laptop.c
@@ -1134,7 +1134,7 @@  static void cmpc_exit(void)
 module_init(cmpc_init);
 module_exit(cmpc_exit);
 
-static const struct acpi_device_id cmpc_device_ids[] = {
+static const struct acpi_device_id cmpc_device_ids[] __maybe_unused = {
 	{CMPC_ACCEL_HID, 0},
 	{CMPC_ACCEL_HID_V4, 0},
 	{CMPC_TABLET_HID, 0},