linux-stable/drivers/video
Nathan Chancellor 0f07c78437 backlight: lm3639: Unconditionally call led_classdev_unregister
[ Upstream commit 7cea645ae9 ]

Clang warns that the address of a pointer will always evaluated as true
in a boolean context.

drivers/video/backlight/lm3639_bl.c:403:14: warning: address of
'pchip->cdev_torch' will always evaluate to 'true'
[-Wpointer-bool-conversion]
        if (&pchip->cdev_torch)
        ~~   ~~~~~~~^~~~~~~~~~
drivers/video/backlight/lm3639_bl.c:405:14: warning: address of
'pchip->cdev_flash' will always evaluate to 'true'
[-Wpointer-bool-conversion]
        if (&pchip->cdev_flash)
        ~~   ~~~~~~~^~~~~~~~~~
2 warnings generated.

These statements have been present since 2012, introduced by
commit 0f59858d51 ("backlight: add new lm3639 backlight
driver"). Given that they have been called unconditionally since
then presumably without any issues, removing the always true if
statements to fix the warnings without any real world changes.

Link: https://github.com/ClangBuiltLinux/linux/issues/119
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-24 08:23:24 +01:00
..
backlight backlight: lm3639: Unconditionally call led_classdev_unregister 2019-11-24 08:23:24 +01:00
console vgacon: Set VGA struct resource types 2018-03-24 11:01:25 +01:00
fbdev fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper() 2019-11-24 08:23:21 +01:00
logo License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
display_timing.c
hdmi.c video/hdmi: Allow "empty" HDMI infoframes 2018-03-19 08:42:47 +01:00
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
of_display_timing.c video: fbdev: Convert to using %pOF instead of full_name 2017-08-07 17:22:13 +02:00
of_videomode.c video: fbdev: Convert to using %pOF instead of full_name 2017-08-07 17:22:13 +02:00
vgastate.c
videomode.c