Re: [PATCH 07/10] mfd: ab8500-debugfs: Fix incompatible types in comparison expression issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 24, 2020 at 5:07 PM Lee Jones <lee.jones@xxxxxxxxxx> wrote:

> Smatch reports:
>
>  drivers/mfd/ab8500-debugfs.c:1804:20: error: incompatible types in comparison expression (different type sizes):
>  drivers/mfd/ab8500-debugfs.c:1804:20:    unsigned int *
>  drivers/mfd/ab8500-debugfs.c:1804:20:    unsigned long *
>
> This is due to mixed types being compared in a min() comparison.  Fix
> this by treating values as signed and casting them to the same type
> as the receiving variable.
>
> Cc: <stable@xxxxxxxxxxxxxxx>
> Cc: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>

Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux