linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Philippe Mazenauer <philippe.mazenauer@outlook.de>
Cc: Theodore Ts'o <tytso@mit.edu>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ext4: Variable to signed to check return code
Date: Fri, 17 May 2019 11:25:06 +0100	[thread overview]
Message-ID: <20190517102506.GU4319@dell> (raw)
In-Reply-To: <AM0PR07MB4417C1C3A4E55EFE47027CA2FD0B0@AM0PR07MB4417.eurprd07.prod.outlook.com>

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@outlook.de>
> ---
>  fs/ext4/block_validity.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Acked-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2019-05-17 10:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-17  9:01 [PATCH] ext4: Variable to signed to check return code Philippe Mazenauer
2019-05-17 10:25 ` Lee Jones [this message]
2019-05-17 20:28   ` Theodore Ts'o
2019-05-18  6:38     ` Lee Jones
2019-05-18 19:54       ` Theodore Ts'o
2019-05-20  8:24         ` Lee Jones
2019-05-20 15:36           ` Theodore Ts'o
2019-05-21  7:25             ` Lee Jones
2019-05-21 17:16               ` Theodore Ts'o
2019-05-22  6:59                 ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190517102506.GU4319@dell \
    --to=lee.jones@linaro.org \
    --cc=adilger.kernel@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philippe.mazenauer@outlook.de \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).