mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Qianfeng Rong <rongqianfeng@vivo.com>
Subject: Re: [PATCH] block: use int type to store negative value
Date: Tue, 02 Sep 2025 19:21:40 -0600	[thread overview]
Message-ID: <175686250047.108754.9991172148469474347.b4-ty@kernel.dk> (raw)
In-Reply-To: <20250902130930.68317-1-rongqianfeng@vivo.com>


On Tue, 02 Sep 2025 21:09:30 +0800, Qianfeng Rong wrote:
> Change the 'ret' variable in blk_stack_limits() from unsigned int to int,
> as it needs to store negative value -1.
> 
> Storing the negative error codes in unsigned type, or performing equality
> comparisons (e.g., ret == -1), doesn't cause an issue at runtime [1] but
> can be confusing.  Additionally, assigning negative error codes to unsigned
> type may trigger a GCC warning when the -Wsign-conversion flag is enabled.
> 
> [...]

Applied, thanks!

[1/1] block: use int type to store negative value
      commit: b0b4518c992eb5f316c6e40ff186cbb7a5009518

Best regards,
-- 
Jens Axboe




      parent reply	other threads:[~2025-09-03  1:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02 13:09 Qianfeng Rong
2025-09-02 16:03 ` Bart Van Assche
2025-09-02 16:11 ` John Garry
2025-09-03  1:21 ` Jens Axboe [this message]

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=175686250047.108754.9991172148469474347.b4-ty@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rongqianfeng@vivo.com \
    /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

all inboxes | Powered by JetHome®