Commit 2f372a5d authored by Pei Xiao's avatar Pei Xiao Committed by Lee Jones
Browse files

leds: st1202: Refactor st1202_led_set() to use !! operator for boolean conversion



st1202_led_set function now uses the !! operator to convert the
enum led_brightness() value to a boolean active state, which is then
passed to the st1202_channel_set() function. This change maintains the
existing functionality.

cocci warnings:
    drivers/leds/leds-st1202.c:194:66-71: WARNING: conversion to bool not needed here.

Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202502181845.xESVrC61-lkp@intel.com/


Signed-off-by: default avatarPei Xiao <xiaopei01@kylinos.cn>
Link: https://lore.kernel.org/r/tencent_3DF7518D407679C99C4CCCB1B8E64638700A@qq.com


Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent 9ec336ba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment