lkml.org 
[lkml]   [2023]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 8250_men_mcb: Fix unsigned comparison with less than zero
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@linux.intel.com>

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-08-03 13:59    [W:0.026 / U:1.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site