From: Max Staudt <max@enpas.org>
To: "Uwe Kleine-König (The Capable Hub)"
<u.kleine-koenig@baylibre.com>,
"Geert Uytterhoeven" <geert@linux-m68k.org>,
"Damien Le Moal" <dlemoal@kernel.org>,
"Niklas Cassel" <cassel@kernel.org>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Thomas Gleixner" <tglx@kernel.org>,
"Ingo Molnar" <mingo@kernel.org>,
"Andi Shyti" <andi.shyti@kernel.org>,
"Helge Deller" <deller@gmx.de>
Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org,
"Christian A. Ehrhardt" <christian.ehrhardt@codasip.com>,
"Christian A. Ehrhardt" <lk@c--e.de>,
linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
netdev@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v1 6/8] zorro: Simplify storing pointers in device id struct
Date: Thu, 28 May 2026 16:50:11 +0900 [thread overview]
Message-ID: <0efedf54-9afb-483e-b830-4f69a3220108@enpas.org> (raw)
In-Reply-To: <49576a7501128c93ef318566ed7faefce163f1fd.1779803053.git.u.kleine-koenig@baylibre.com>
On 5/26/26 11:17 PM, Uwe Kleine-König (The Capable Hub) wrote:
> Technically it is fine (on all current Linux architectures) to store a
> pointer in an unsigned long variable. However this needs explicit
> casting which is an easy source for type mismatches.
>
> By replacing the plain unsigned long .driver_data in struct
> zorro_device_id by an anonymous union, most of the casting can be
> dropped. There is still some implicit casting involved (between a void *
> and a driver specific pointer type), but that's better than the approach
> to store a pointer in an unsigned long variable as this doesn't lose the
> information that the data being pointed to is const.
>
> All users of struct zorro_device_id are initialized in a way that is
> compatible with the new definition, so no adaptions are needed there.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Thanks Uwe!
Reviewed-by: Max Staudt <max@enpas.org>
next prev parent reply other threads:[~2026-05-28 7:50 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 14:17 [PATCH v1 0/8] zorro: Improve handling of pointers in zorro_device_id::driver_data Uwe Kleine-König (The Capable Hub)
2026-05-26 14:17 ` [PATCH v1 1/8] ata: pata_budda: Use named initializer for zorro_device_id Uwe Kleine-König (The Capable Hub)
2026-05-27 7:42 ` Niklas Cassel
2026-05-27 8:11 ` Damien Le Moal
2026-05-27 13:15 ` Geert Uytterhoeven
2026-05-26 14:17 ` [PATCH v1 2/8] scsi: " Uwe Kleine-König (The Capable Hub)
2026-05-27 13:15 ` Geert Uytterhoeven
2026-05-26 14:17 ` [PATCH v1 net-next 3/8] net: Use named initializer for zorro_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-05-27 13:16 ` Geert Uytterhoeven
2026-05-26 14:17 ` [PATCH v1 4/8] i2c: icy:pick " Uwe Kleine-König (The Capable Hub)
2026-05-27 13:16 ` Geert Uytterhoeven
2026-05-28 7:48 ` Max Staudt
2026-05-28 22:35 ` Andi Shyti
2026-05-26 14:17 ` [PATCH v1 5/8] video: fm2fb: Use named initializer for zorro_device_id array Uwe Kleine-König (The Capable Hub)
2026-05-27 13:17 ` Geert Uytterhoeven
2026-05-26 14:17 ` [PATCH v1 6/8] zorro: Simplify storing pointers in device id struct Uwe Kleine-König (The Capable Hub)
2026-05-27 13:18 ` Geert Uytterhoeven
2026-05-28 7:50 ` Max Staudt [this message]
2026-05-26 14:17 ` [PATCH v1 7/8] scsi: zorro7xx: Make use of struct zorro_device_id::driver_data_ptr Uwe Kleine-König (The Capable Hub)
2026-05-27 13:18 ` Geert Uytterhoeven
2026-05-26 14:17 ` [PATCH v1 8/8] video: cirrusfb: " Uwe Kleine-König (The Capable Hub)
2026-05-27 13:19 ` Geert Uytterhoeven
2026-05-26 15:01 ` [PATCH v1 0/8] zorro: Improve handling of pointers in zorro_device_id::driver_data Geert Uytterhoeven
2026-05-26 16:38 ` Uwe Kleine-König (The Capable Hub)
2026-05-29 1:20 ` patchwork-bot+netdevbpf
2026-06-04 22:44 ` Helge Deller
2026-06-05 11:56 ` Uwe Kleine-König (The Capable Hub)
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=0efedf54-9afb-483e-b830-4f69a3220108@enpas.org \
--to=max@enpas.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=andi.shyti@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=cassel@kernel.org \
--cc=christian.ehrhardt@codasip.com \
--cc=davem@davemloft.net \
--cc=deller@gmx.de \
--cc=dlemoal@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=edumazet@google.com \
--cc=geert@linux-m68k.org \
--cc=kuba@kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-scsi@vger.kernel.org \
--cc=lk@c--e.de \
--cc=martin.petersen@oracle.com \
--cc=mingo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tglx@kernel.org \
--cc=u.kleine-koenig@baylibre.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®