Skip to content

Commit

Permalink
mpi3mr: Fix compilation errors observed on i386 arch
Browse files Browse the repository at this point in the history
Fix below compilation errors observed on i386 ARCH,

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

Fixes: c196bc4 ("scsi: mpi3mr: Reduce VD queue depth on detecting throttling")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
  • Loading branch information
sreekanthbrcm authored and intel-lab-lkp committed Jul 16, 2022
1 parent f095c3c commit 1fe8369
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/scsi/mpi3mr/mpi3mr_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
memcpy(fwevt->event_data, (char *)&tg, sizeof(u64));
fwevt->mrioc = mrioc;
fwevt->event_id = MPI3MR_DRIVER_EVENT_TG_QD_REDUCTION;
fwevt->send_ack = 0;
Expand Down Expand Up @@ -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);
memcpy((char *)&tg, fwevt->event_data, sizeof(u64));
dprint_event_bh(mrioc,
"qd reduction event processed for tg_id(%d) reduction_needed(%d)\n",
tg->id, tg->need_qd_reduction);
Expand Down

0 comments on commit 1fe8369

Please sign in to comment.