lkml.org 
[lkml]   [2019]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] block: Fix implicit unsigned to signed conversion
Date
Since this is a conceptual error and will not cause any bug
not sure if this needed as things are not leading to any bugs.

However cleanup is helpful in avoiding any confusion.

Looks good to me.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>

On 09/18/2019 03:39 AM, Alessio Balsini wrote:
> An unsigned integer variable may be assigned negative values, and is
> returned by the function with an implicit conversion to signed. Besides
> the implicit conversion at return time for which the variable
> representation is fine and there is no variable manipulation that may
> lead to bugs in the current code base, this is a conceptual error.
>
> Fix by changing the variable type from unsigned to signed.
>
> Signed-off-by: Alessio Balsini<balsini@android.com>
> Cc: Jens Axboe<axboe@kernel.dk>


\
 
 \ /
  Last update: 2019-09-18 21:39    [W:0.044 / U:1.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site