[PATCH 2/6] nvme-ioctl: use common type for user data addresses

Keith Busch kbusch at kernel.org
Mon Feb 24 14:47:49 PST 2025


On Mon, Feb 24, 2025 at 11:30:53PM +0100, Christoph Hellwig wrote:
> On Mon, Feb 24, 2025 at 10:21:24AM -0800, Keith Busch wrote:
> > From: Keith Busch <kbusch at kernel.org>
> > 
> > The data type is represented as a u64, but the metadata type as a __user
> > void *. These two fields represent the same thing, so treating them so
> > differently looks a bit odd. Just pick one consistent type of
> > representation.
> 
> Yes, being consistent is good.  I would normally propagate the
> proper pointer type as far as possible, but I can live with this
> version if you add a little blurb why it's preferable.

I have a reason, but it's not very good :)

I settled on u64 simply because that's how 'struct nvme_uring_data'
represents both, so it makes for a tiny bit less churn in later patches. 



More information about the Linux-nvme mailing list