[PATCH v1 7/8] scsi: zorro7xx: Make use of struct zorro_device_id::driver_data_ptr

From: Uwe Kleine-König (The Capable Hub)

Date: Tue May 26 2026 - 10:28:52 EST


Usage of .driver_data_ptr allows to drop several casts. A nice upside of
that is that now the constness of the linked structures is kept and the
compiler warns about zdd missing a const. So add this missing const, too.

While touching the zorro_device_id array, drop an unneeded explicit zero
in the list terminator.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
---
drivers/scsi/zorro7xx.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/zorro7xx.c b/drivers/scsi/zorro7xx.c
index 1f74586f0428..21c769dc1ecb 100644
--- a/drivers/scsi/zorro7xx.c
+++ b/drivers/scsi/zorro7xx.c
@@ -50,23 +50,23 @@ static struct zorro_driver_data {
static struct zorro_device_id zorro7xx_zorro_tbl[] = {
{
.id = ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS,
- .driver_data = (unsigned long)&zorro7xx_driver_data[0],
+ .driver_data_ptr = &zorro7xx_driver_data[0],
},
{
.id = ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx,
- .driver_data = (unsigned long)&zorro7xx_driver_data[1],
+ .driver_data_ptr = &zorro7xx_driver_data[1],
},
{
.id = ZORRO_PROD_CBM_A4091_1,
- .driver_data = (unsigned long)&zorro7xx_driver_data[2],
+ .driver_data_ptr = &zorro7xx_driver_data[2],
},
{
.id = ZORRO_PROD_CBM_A4091_2,
- .driver_data = (unsigned long)&zorro7xx_driver_data[2],
+ .driver_data_ptr = &zorro7xx_driver_data[2],
},
{
.id = ZORRO_PROD_GVP_GFORCE_040_060,
- .driver_data = (unsigned long)&zorro7xx_driver_data[3],
+ .driver_data_ptr = &zorro7xx_driver_data[3],
},
{ }
};
@@ -77,11 +77,11 @@ static int zorro7xx_init_one(struct zorro_dev *z,
{
struct Scsi_Host *host;
struct NCR_700_Host_Parameters *hostdata;
- struct zorro_driver_data *zdd;
+ const struct zorro_driver_data *zdd;
unsigned long board, ioaddr;

board = zorro_resource_start(z);
- zdd = (struct zorro_driver_data *)ent->driver_data;
+ zdd = ent->driver_data_ptr;

if (zdd->absolute) {
ioaddr = zdd->offset;
--
2.47.3