All of lore.kernel.org
 help / color / mirror / Atom feed
From: Uday Shankar <ushankar@purestorage.com>
To: Caleb Sander Mateos <csander@purestorage.com>
Cc: Ming Lei <ming.lei@redhat.com>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ublk: fix narrowing warnings in UAPI header
Date: Mon, 23 Jun 2025 12:52:22 -0600	[thread overview]
Message-ID: <aFmiZpTDrJ5GSGty@dev-ushankar.dev.purestorage.com> (raw)
In-Reply-To: <20250621162842.337452-1-csander@purestorage.com>

On Sat, Jun 21, 2025 at 10:28:41AM -0600, Caleb Sander Mateos wrote:
> When a C++ file compiled with -Wc++11-narrowing includes the UAPI header
> linux/ublk_cmd.h, ublk_sqe_addr_to_auto_buf_reg()'s assignments of u64
> values to u8, u16, and u32 fields result in compiler warnings. Add
> explicit casts to the intended types to avoid these warnings. Drop the
> unnecessary bitmasks.
> 
> Reported-by: Uday Shankar <ushankar@purestorage.com>
> Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
> Fixes: 99c1e4eb6a3f ("ublk: register buffer to local io_uring with provided buf index via UBLK_F_AUTO_BUF_REG")

Looks good: https://godbolt.org/z/qovrerdhd

Reviewed-by: Uday Shankar <ushankar@purestorage.com>


  parent reply	other threads:[~2025-06-23 18:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-21 16:28 [PATCH] ublk: fix narrowing warnings in UAPI header Caleb Sander Mateos
2025-06-23  1:40 ` Ming Lei
2025-06-23 18:52 ` Uday Shankar [this message]
2025-06-24 14:51 ` Jens Axboe

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=aFmiZpTDrJ5GSGty@dev-ushankar.dev.purestorage.com \
    --to=ushankar@purestorage.com \
    --cc=csander@purestorage.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.