backlight: journada720: fix Wmisleading-indentation warning
Subsystems (2)
PATCH 1/1 backlight: journada720: fix Wmisleading-indentation warning
From: Arnd Bergmann <[email protected]>
With gcc-11, we get a warning about code that looks correct but badly indented:
drivers/video/backlight/jornada720_bl.c: In function ‘jornada_bl_update_status’:drivers/video/backlight/jornada720_bl.c:66:11: error: this ‘else’ clause does not guard... [-Werror=misleading-indentation]
66 | } else /* turn on backlight */
| ^~~~
Change the formatting according to our normal conventions.
--- drivers/video/backlight/jornada720_bl.c | 44 ++++++++++++------------- 1 file changed, 22 insertions(+), 22 deletions(-)
drivers/video/backlight/jornada720_bl.c +22 -22
@@ -66,30 +66,30 @@ static int jornada_bl_update_status(struct backlight_device *bd) }else /* turn on backlight */ PPSR |=PPC_LDD1 ; -/* send command to our mcu */ -if (jornada_ssp_byte (SETBRIGHTNESS ) !=TXDUMMY ) { -dev_info (&bd->dev,"failed to set brightness\n" ); - ret = -ETIMEDOUT ; - goto out; - } +/* send command to our mcu */ +if (jornada_ssp_byte (SETBRIGHTNESS ) !=TXDUMMY ) { +dev_info (&bd->dev,"failed to set brightness\n" ); + ret = -ETIMEDOUT ; + goto out; + } -/* -* at this point we expect that the mcu has accepted -* our command and is waiting for our new value -* please note that maximum brightness is 255, -* but due to physical layout it is equal to 0, so we simply -* invert the value (MAX VALUE - NEW VALUE). -*/ -if (jornada_ssp_byte (BL_MAX_BRIGHT - bd->props.brightness) - !=TXDUMMY ) { -dev_err (&bd->dev,"set brightness failed\n" ); - ret = -ETIMEDOUT ; - } +/* +* at this point we expect that the mcu has accepted +* our command and is waiting for our new value +* please note that maximum brightness is 255, +* but due to physical layout it is equal to 0, so we simply +* invert the value (MAX VALUE - NEW VALUE). +*/ +if (jornada_ssp_byte (BL_MAX_BRIGHT - bd->props.brightness) + !=TXDUMMY ) { +dev_err (&bd->dev,"set brightness failed\n" ); + ret = -ETIMEDOUT ; + } -/* -* If infact we get an TXDUMMY as output we are happy and dont -* make any further comments about it -*/ +/* +* If infact we get an TXDUMMY as output we are happy and dont +* make any further comments about it +*/ out:jornada_ssp_end ();
Signature · 6 lines
2.29.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
With gcc-11, we get a warning about code that looks correct but badly indented:
drivers/video/backlight/jornada720_bl.c: In function ‘jornada_bl_update_status’:drivers/video/backlight/jornada720_bl.c:66:11: error: this ‘else’ clause does not guard... [-Werror=misleading-indentation]
66 | } else /* turn on backlight */
Quoted 6 lines
| ^~~~Change the formatting according to our normal conventions.
Fixes 13a7b5dc0d17 ("backlight: Adds HP Jornada 700 series backlight driver")Signed-off-by Arnd Bergmann <[email protected]>
I'm dubious that the re-indent matches the original authors intent... but it certainly does match what was actually written and tested so on that basis:
Daniel.
---
Quoted 63 lines
drivers/video/backlight/jornada720_bl.c | 44 ++++++++++++------------- 1 file changed, 22 insertions(+), 22 deletions(-)drivers/video/backlight/jornada720_bl.c +22
-22@@ -66,30 +66,30 @@ static int jornada_bl_update_status(struct backlight_device *bd) }else /* turn on backlight */ PPSR |=PPC_LDD1 ; -/* send command to our mcu */ -if (jornada_ssp_byte (SETBRIGHTNESS ) !=TXDUMMY ) { -dev_info (&bd->dev,"failed to set brightness\n" ); - ret = -ETIMEDOUT ; - goto out; - } +/* send command to our mcu */ +if (jornada_ssp_byte (SETBRIGHTNESS ) !=TXDUMMY ) { +dev_info (&bd->dev,"failed to set brightness\n" ); + ret = -ETIMEDOUT ; + goto out; + } -/* -* at this point we expect that the mcu has accepted -* our command and is waiting for our new value -* please note that maximum brightness is 255, -* but due to physical layout it is equal to 0, so we simply -* invert the value (MAX VALUE - NEW VALUE). -*/ -if (jornada_ssp_byte (BL_MAX_BRIGHT - bd->props.brightness) - !=TXDUMMY ) { -dev_err (&bd->dev,"set brightness failed\n" ); - ret = -ETIMEDOUT ; - } +/* +* at this point we expect that the mcu has accepted +* our command and is waiting for our new value +* please note that maximum brightness is 255, +* but due to physical layout it is equal to 0, so we simply +* invert the value (MAX VALUE - NEW VALUE). +*/ +if (jornada_ssp_byte (BL_MAX_BRIGHT - bd->props.brightness) + !=TXDUMMY ) { +dev_err (&bd->dev,"set brightness failed\n" ); + ret = -ETIMEDOUT ; + } -/* -* If infact we get an TXDUMMY as output we are happy and dont -* make any further comments about it -*/ +/* +* If infact we get an TXDUMMY as output we are happy and dont +* make any further comments about it +*/ out:jornada_ssp_end ();Signature · 1 line
2.29.2
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Lee Jones
AppliedQuoted 10 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
With gcc-11, we get a warning about code that looks correct but badly indented:
drivers/video/backlight/jornada720_bl.c: In function ‘jornada_bl_update_status’:drivers/video/backlight/jornada720_bl.c:66:11: error: this ‘else’ clause does not guard... [-Werror=misleading-indentation]
66 | } else /* turn on backlight */| ^~~~
Quoted 7 lines
Change the formatting according to our normal conventions.
Fixes 13a7b5dc0d17 ("backlight: Adds HP Jornada 700 series backlight driver")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/video/backlight/jornada720_bl.c | 44 ++++++++++++------------- 1 file changed, 22 insertions(+), 22 deletions(-)
Applied, thanks.
Signature · 8 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel