Make qla27xx_write_remote_reg() easier to read by using register names instead of register offsets. The 'pahole' tool has been used to convert register offsets into register names. See also commit cbb01c2f2f63 ("scsi: qla2xxx: Fix MPI failure AEN (8200) handling"). Reviewed-by: Hannes Reinecke <hare@xxxxxxx> Cc: Arun Easi <aeasi@xxxxxxxxxxx> Cc: Nilesh Javali <njavali@xxxxxxxxxxx> Cc: Daniel Wagner <dwagner@xxxxxxx> Cc: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx> Cc: Martin Wilck <mwilck@xxxxxxxx> Cc: Roman Bolshakov <r.bolshakov@xxxxxxxxx> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> --- drivers/scsi/qla2xxx/qla_tmpl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_tmpl.c b/drivers/scsi/qla2xxx/qla_tmpl.c index 4a4d92046cbf..645496091186 100644 --- a/drivers/scsi/qla2xxx/qla_tmpl.c +++ b/drivers/scsi/qla2xxx/qla_tmpl.c @@ -17,14 +17,14 @@ static void qla27xx_write_remote_reg(struct scsi_qla_host *vha, u32 addr, u32 data) { - char *reg = (char *)ISPREG(vha); + struct device_reg_24xx __iomem *reg = &vha->hw->iobase->isp24; ql_dbg(ql_dbg_misc, vha, 0xd300, "%s: addr/data = %xh/%xh\n", __func__, addr, data); - WRT_REG_DWORD(reg + IOBASE(vha), 0x40); - WRT_REG_DWORD(reg + 0xc4, data); - WRT_REG_DWORD(reg + 0xc0, addr); + WRT_REG_DWORD(®->iobase_addr, 0x40); + WRT_REG_DWORD(®->iobase_c4, data); + WRT_REG_DWORD(®->iobase_window, addr); } void