Skip to contentSkip to conversation

ARM: OMAP1: ams-delta: remove unused function ams_delta_camera_power

PATCH In review Maciej Falkowski 4 participants 4 messages Apr 1, 2021 – May 26, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: OMAP1: ams-delta: remove unused function ams_delta_camera_power

The ams_delta_camera_power() function is unused as reports Clang compilation with omap1_defconfig on linux-next:

arch/arm/mach-omap1/board-ams-delta.c:462:12: warning: unused function 'ams_delta_camera_power' [-Wunused-function] static int ams_delta_camera_power(struct device *dev, int power)

           ^

1 warning generated.

The soc_camera support was dropped without removing ams_delta_camera_power() function, making it unused.

Fixes ce548396a433 ("media: mach-omap1: board-ams-delta.c: remove soc_camera dependencies")
---
 arch/arm/mach-omap1/board-ams-delta.c | 14 --------------
 1 file changed, 14 deletions(-)
arch/arm/mach-omap1/board-ams-delta.c +0 -14
index 2ee527c00284..1026a816dcc0 100644
@@ -458,20 +458,6 @@ static struct gpiod_lookup_table leds_gpio_table = {
 
 #ifdef CONFIG_LEDS_TRIGGERS
 DEFINE_LED_TRIGGER(ams_delta_camera_led_trigger);
-
-static int ams_delta_camera_power(struct device *dev, int power)
-{
-	/*
-	 * turn on camera LED
-	 */
-	if (power)
-		led_trigger_event(ams_delta_camera_led_trigger, LED_FULL);
-	else
-		led_trigger_event(ams_delta_camera_led_trigger, LED_OFF);
-	return 0;
-}
-#else
-#define ams_delta_camera_power	NULL
 #endif
 
 static struct platform_device ams_delta_audio_device = {
Signature · 7 lines
2.26.3


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Maciej Falkowski

The ams_delta_camera_power() function is unused as reports Clang compilation with omap1_defconfig on linux-next:

arch/arm/mach-omap1/board-ams-delta.c:462:12: warning: unused function 'ams_delta_camera_power' [-Wunused-function] static int ams_delta_camera_power(struct device *dev, int power)

           ^
Quoted 8 lines

1 warning generated.

The soc_camera support was dropped without removing ams_delta_camera_power() function, making it unused.

Fixes ce548396a433 ("media: mach-omap1: board-ams-delta.c: remove soc_camera dependencies")

Thanks for the patch!

Quoted 32 lines
---
 arch/arm/mach-omap1/board-ams-delta.c | 14 --------------
 1 file changed, 14 deletions(-)
arch/arm/mach-omap1/board-ams-delta.c +0 -14
index 2ee527c00284..1026a816dcc0 100644
@@ -458,20 +458,6 @@ static struct gpiod_lookup_table leds_gpio_table = {
 
 #ifdef CONFIG_LEDS_TRIGGERS
 DEFINE_LED_TRIGGER(ams_delta_camera_led_trigger);
-
-static int ams_delta_camera_power(struct device *dev, int power)
-{
-	/*
-	 * turn on camera LED
-	 */
-	if (power)
-		led_trigger_event(ams_delta_camera_led_trigger, LED_FULL);
-	else
-		led_trigger_event(ams_delta_camera_led_trigger, LED_OFF);
-	return 0;
-}
-#else
-#define ams_delta_camera_power	NULL
 #endif
 
 static struct platform_device ams_delta_audio_device = {
Signature · 1 line
2.26.3

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Reviewed-by on v1 1/1
#2 lore raw
In reply to Maciej Falkowski
Quoted 6 lines · Maciej Falkowski

The ams_delta_camera_power() function is unused as reports Clang compilation with omap1_defconfig on linux-next:

arch/arm/mach-omap1/board-ams-delta.c:462:12: warning: unused function 'ams_delta_camera_power' [-Wunused-function] static int ams_delta_camera_power(struct device *dev, int power)

Quoted 7 lines
           ^

1 warning generated.

The soc_camera support was dropped without removing ams_delta_camera_power() function, making it unused.

Thanks for the patch!

Quoted 38 lines
Fixes ce548396a433 ("media: mach-omap1: board-ams-delta.c: remove soc_camera dependencies")
---
 arch/arm/mach-omap1/board-ams-delta.c | 14 --------------
 1 file changed, 14 deletions(-)
arch/arm/mach-omap1/board-ams-delta.c +0 -15
index 2ee527c00284..1026a816dcc0 100644
@@ -458,20 +458,6 @@ static struct gpiod_lookup_table leds_gpio_table = {
 
 #ifdef CONFIG_LEDS_TRIGGERS
 DEFINE_LED_TRIGGER(ams_delta_camera_led_trigger);
-
-static int ams_delta_camera_power(struct device *dev, int power)
-{
-       /*
-        * turn on camera LED
-        */
-       if (power)
-               led_trigger_event(ams_delta_camera_led_trigger, LED_FULL);
-       else
-               led_trigger_event(ams_delta_camera_led_trigger, LED_OFF);
-       return 0;
-}
-#else
-#define ams_delta_camera_power NULL
 #endif
 
 static struct platform_device ams_delta_audio_device = {
--

2.26.3

--
You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20210401160434.7655-1-maciej.falkowski9%40gmail.com.

Signature · 7 lines
Thanks,
~Nick Desaulniers

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
reviewer
#3 lore raw
In reply to Maciej Falkowski
Quoted 6 lines · Maciej Falkowski

The ams_delta_camera_power() function is unused as reports Clang compilation with omap1_defconfig on linux-next:

arch/arm/mach-omap1/board-ams-delta.c:462:12: warning: unused function 'ams_delta_camera_power' [-Wunused-function] static int ams_delta_camera_power(struct device *dev, int power)

           ^
Quoted 8 lines

1 warning generated.

The soc_camera support was dropped without removing ams_delta_camera_power() function, making it unused.

Fixes ce548396a433 ("media: mach-omap1: board-ams-delta.c: remove soc_camera dependencies")

Thanks applying into fixes.

Regards,

Tony