Re: [PATCH] 8250_men_mcb: Fix unsigned comparison with less than zero

From: Andy Shevchenko
Date: Thu Aug 03 2023 - 07:58:38 EST


On Thu, Aug 03, 2023 at 04:47:53PM +0800, Jiapeng Chong wrote:
> The data->line[i] is defined as unsigned int type, if(data->line[i] < 0)
> is invalid, so replace data->line[i] with res.
>
> ./drivers/tty/serial/8250/8250_men_mcb.c:223:6-19: WARNING: Unsigned expression compared with zero: data->line[i] < 0.

Having

WARNING: Unsigned expression compared with zero: data->line[i] < 0.

is enough.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

--
With Best Regards,
Andy Shevchenko