lkml.org 
[lkml]   [2021]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] hwmon: (applesmc) Assign boolean values to a bool variable
    Date
    Fix the following coccicheck warnings:

    ./drivers/hwmon/applesmc.c:568:6-23: WARNING: Assignment of
    0/1 to bool variable.

    Reported-by: Abaci Robot <abaci@linux.alibaba.com>
    Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
    ---
    drivers/hwmon/applesmc.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
    index 89207af..28b137e 100644
    --- a/drivers/hwmon/applesmc.c
    +++ b/drivers/hwmon/applesmc.c
    @@ -565,7 +565,7 @@ static int applesmc_init_index(struct applesmc_registers *s)
    static int applesmc_init_smcreg_try(void)
    {
    struct applesmc_registers *s = &smcreg;
    - bool left_light_sensor = 0, right_light_sensor = 0;
    + bool left_light_sensor = false, right_light_sensor = false;
    unsigned int count;
    u8 tmp[1];
    int ret;
    --
    1.8.3.1
    \
     
     \ /
      Last update: 2021-01-20 07:45    [W:2.260 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site