From d2ed92cb07bf0fbd0fc94076745477c60b0e2cd5 Mon Sep 17 00:00:00 2001 From: Vincent de Phily Date: Sat, 15 Apr 2023 21:13:48 +0100 Subject: [PATCH 1/3] Fix function prototypes Clang is stricter than gcc and refuses to build without this fix. --- src/clevo_leds.h | 2 +- src/uniwill_leds.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clevo_leds.h b/src/clevo_leds.h index ebd29af..5714756 100644 --- a/src/clevo_leds.h +++ b/src/clevo_leds.h @@ -376,7 +376,7 @@ int clevo_leds_remove(struct platform_device *dev) { } EXPORT_SYMBOL(clevo_leds_remove); -enum clevo_kb_backlight_types clevo_leds_get_backlight_type() { +enum clevo_kb_backlight_types clevo_leds_get_backlight_type(void) { return clevo_kb_backlight_type; } EXPORT_SYMBOL(clevo_leds_get_backlight_type); diff --git a/src/uniwill_leds.h b/src/uniwill_leds.h index 63639fa..2145252 100644 --- a/src/uniwill_leds.h +++ b/src/uniwill_leds.h @@ -275,7 +275,7 @@ int uniwill_leds_remove(struct platform_device *dev) } EXPORT_SYMBOL(uniwill_leds_remove); -enum uniwill_kb_backlight_types uniwill_leds_get_backlight_type() { +enum uniwill_kb_backlight_types uniwill_leds_get_backlight_type(void) { return uniwill_kb_backlight_type; } EXPORT_SYMBOL(uniwill_leds_get_backlight_type); From 619d4e22fde73444d1fd6d186082b334296b72e6 Mon Sep 17 00:00:00 2001 From: Vincent de Phily Date: Sat, 15 Apr 2023 21:14:22 +0100 Subject: [PATCH 2/3] Fix uninitialized var --- src/uniwill_leds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uniwill_leds.h b/src/uniwill_leds.h index 2145252..af72863 100644 --- a/src/uniwill_leds.h +++ b/src/uniwill_leds.h @@ -252,7 +252,7 @@ EXPORT_SYMBOL(uniwill_leds_init_late); int uniwill_leds_remove(struct platform_device *dev) { // FIXME Use mutexes - int ret; + int ret = 0; if (uw_leds_initialized) { uw_leds_initialized = false; From 684f00b5526e4e37a535bb92cd1fe46216d92ab3 Mon Sep 17 00:00:00 2001 From: Vincent de Phily Date: Sat, 15 Apr 2023 21:15:58 +0100 Subject: [PATCH 3/3] Document clang as a valid compiler --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f4beb0..9db36bc 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Modules included in this package ## Dependencies: - make -- gcc +- gcc or clang - linux-headers - dkms (Only when using this module with DKMS functionality)