Skip to contentSkip to conversation

mpi3mr: Fix compilation errors on i386 arch

PATCH In review Sreekanth Reddy 2 participants 3 messages Jul 18, 2022 – Jul 19, 2022

Subsystems (2)
lore
Share & tools
lore

Sreekanth Reddy

author maintainer
#0 lore raw

v2 cover mpi3mr: Fix compilation errors on i386 arch

Fix below compilation errors observed on i386 arch with allyesconfig config

cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]
and
cast to pointer from integer of different size

Sreekanth Reddy (1):
mpi3mr: Fix compilation errors observed on i386 arch

 drivers/scsi/mpi3mr/mpi3mr_os.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Signature · 1 line
2.27.0
author maintainer
#1 lore raw

PATCH v2 1/1 mpi3mr: Fix compilation errors observed on i386 arch

Fix below compilation errors observed on i386 ARCH,

cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]

Fixes c196bc4dce ("scsi: mpi3mr: Reduce VD queue depth on detecting throttling")
---
 drivers/scsi/mpi3mr/mpi3mr_os.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/scsi/mpi3mr/mpi3mr_os.c +2 -3
index 0901bc932d5c..4102636df4fc 100644
@@ -386,7 +386,7 @@ static void mpi3mr_queue_qd_reduction_event(struct mpi3mr_ioc *mrioc,
 		ioc_warn(mrioc, "failed to queue TG QD reduction event\n");
 		return;
 	}
-	*(__le64 *)fwevt->event_data = (__le64)tg;
+	*(struct mpi3mr_throttle_group_info **)fwevt->event_data = tg;
 	fwevt->mrioc = mrioc;
 	fwevt->event_id = MPI3MR_DRIVER_EVENT_TG_QD_REDUCTION;
 	fwevt->send_ack = 0;
@@ -1660,8 +1660,7 @@ static void mpi3mr_fwevt_bh(struct mpi3mr_ioc *mrioc,
 	{
 		struct mpi3mr_throttle_group_info *tg;
 
-		tg = (struct mpi3mr_throttle_group_info *)
-		    (*(__le64 *)fwevt->event_data);
+		tg = *(struct mpi3mr_throttle_group_info **)fwevt->event_data;
 		dprint_event_bh(mrioc,
 		    "qd reduction event processed for tg_id(%d) reduction_needed(%d)\n",
 		    tg->id, tg->need_qd_reduction);
Signature · 1 line
2.27.0
#2 lore raw

Re: [PATCH v2 1/1] mpi3mr: Fix compilation errors observed on i386 arch

Sreekanth,

Quoted 1 line

Fix below compilation errors observed on i386 ARCH,

Amended 5.20/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering