[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190517102506.GU4319@dell>
Date: Fri, 17 May 2019 11:25:06 +0100
From: Lee Jones <lee.jones@...aro.org>
To: Philippe Mazenauer <philippe.mazenauer@...look.de>
Cc: Theodore Ts'o <tytso@....edu>,
Andreas Dilger <adilger.kernel@...ger.ca>,
"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ext4: Variable to signed to check return code
On Fri, 17 May 2019, Philippe Mazenauer wrote:
> Variables 'n' and 'err' are both used for less-than-zero error checking,
> however both are declared as unsigned. Ensure ext4_map_blocks() and
> add_system_zone() are able to have their return values propagated
> correctly by redefining them both as signed integers.
>
> ../fs/ext4/block_validity.c:158:9: warning: comparison of unsigned
> expression < 0 is always false [-Wtype-limits]
> if (n < 0) {
> ^
>
> ../fs/ext4/block_validity.c:173:12: warning: comparison of unsigned
> expression < 0 is always false [-Wtype-limits]
> if (err < 0)
> ^
>
> Signed-off-by: Philippe Mazenauer <philippe.mazenauer@...look.de>
> ---
> fs/ext4/block_validity.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Acked-by: Lee Jones <lee.jones@...aro.org>
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Powered by blists - more mailing lists