Re: [PATCH v4 07/31] scsi: pm8001: Fix payload initialization in pm80xx_set_thermal_config()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 17, 2022 at 2:30 PM Damien Le Moal
<damien.lemoal@xxxxxxxxxxxxxxxxxx> wrote:
>
> The fields of the set_ctrl_cfg_req structure have the __le32 type, so
> use cpu_to_le32() to assign them. This removes the sparse warnings:
>
> warning: incorrect type in assignment (different base types)
>     expected restricted __le32
>     got unsigned int
>
> Fixes: 842784e0d15b ("pm80xx: Update For Thermal Page Code")
> Fixes: f5860992db55 ("[SCSI] pm80xx: Added SPCv/ve specific hardware functionalities and relevant changes in common files")
> Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>
> Reviewed-by: John Garry <john.garry@xxxxxxxxxx>
Reviewed-by: Jack Wang <jinpu.wang@xxxxxxxxx>
thx!
> ---
>  drivers/scsi/pm8001/pm80xx_hwi.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
> index 0b3386a3c508..b303bc347f3d 100644
> --- a/drivers/scsi/pm8001/pm80xx_hwi.c
> +++ b/drivers/scsi/pm8001/pm80xx_hwi.c
> @@ -1201,9 +1201,11 @@ pm80xx_set_thermal_config(struct pm8001_hba_info *pm8001_ha)
>         else
>                 page_code = THERMAL_PAGE_CODE_8H;
>
> -       payload.cfg_pg[0] = (THERMAL_LOG_ENABLE << 9) |
> -                               (THERMAL_ENABLE << 8) | page_code;
> -       payload.cfg_pg[1] = (LTEMPHIL << 24) | (RTEMPHIL << 8);
> +       payload.cfg_pg[0] =
> +               cpu_to_le32((THERMAL_LOG_ENABLE << 9) |
> +                           (THERMAL_ENABLE << 8) | page_code);
> +       payload.cfg_pg[1] =
> +               cpu_to_le32((LTEMPHIL << 24) | (RTEMPHIL << 8));
>
>         pm8001_dbg(pm8001_ha, DEV,
>                    "Setting up thermal config. cfg_pg 0 0x%x cfg_pg 1 0x%x\n",
> --
> 2.34.1
>



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux