On Thu, Feb 17, 2022 at 2:30 PM Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx> wrote: > > The ds_ads_m field of struct ssp_ini_tm_start_req has the type __le32. > Assigning a value to it should thus use cpu_to_le32(). This fixes the > sparse warning: > > warning: incorrect type in assignment (different base types) > expected restricted __le32 [addressable] [assigned] [usertype] ds_ads_m > got int > > Fixes: dbf9bfe61571 ("[SCSI] pm8001: add SAS/SATA HBA driver") > Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx> Reviewed-by: Jack Wang <jinpu.wang@xxxxxxxxx> thx! > --- > drivers/scsi/pm8001/pm8001_hwi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c > index 817bba65feb3..e20a1d4db026 100644 > --- a/drivers/scsi/pm8001/pm8001_hwi.c > +++ b/drivers/scsi/pm8001/pm8001_hwi.c > @@ -4619,7 +4619,7 @@ int pm8001_chip_ssp_tm_req(struct pm8001_hba_info *pm8001_ha, > memcpy(sspTMCmd.lun, task->ssp_task.LUN, 8); > sspTMCmd.tag = cpu_to_le32(ccb->ccb_tag); > if (pm8001_ha->chip_id != chip_8001) > - sspTMCmd.ds_ads_m = 0x08; > + sspTMCmd.ds_ads_m = cpu_to_le32(0x08); > circularQ = &pm8001_ha->inbnd_q_tbl[0]; > ret = pm8001_mpi_build_cmd(pm8001_ha, circularQ, opc, &sspTMCmd, > sizeof(sspTMCmd), 0); > -- > 2.34.1 >