[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251222052818-mutt-send-email-mst@kernel.org>
Date: Mon, 22 Dec 2025 05:28:30 -0500
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Cc: Jason Wang <jasowang@...hat.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Eugenio Pérez <eperezma@...hat.com>,
virtualization@...ts.linux.dev, linux-kernel@...r.kernel.org,
Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] virtio: uapi: avoid usage of libc types
On Mon, Dec 22, 2025 at 11:22:16AM +0100, Thomas Weißschuh wrote:
> On Mon, Dec 22, 2025 at 03:39:12AM -0500, Michael S. Tsirkin wrote:
> > On Mon, Dec 22, 2025 at 09:00:33AM +0100, Thomas Weißschuh wrote:
> > > Using libc types and headers from the UAPI headers is problematic as it
> > > introduces a dependency on a full C toolchain.
> > >
> > > On Linux 'unsigned long' works as a replacement for 'uintptr_t' and does
> > > not depend on libc.
> > >
> > > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> >
> >
> > are you fixing other uses of uintptr_t ?
>
> I am focussing on UAPI headers which include libc headers.
> virtio_ring.h seems to be the only such header which uses uintptr_t.
> There are a few other UAPI headers which reference uintptr_t, but only
> in comments or macros.
>
> uintptr_t in regular kernel code is out of scope for me.
> While it is iffy, it doesn't actually hurt.
>
>
> Thomas
And other uses of stdint.h?
Powered by blists - more mailing lists