mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
scsi: pm8001: Fix payload initialization in pm80xx_set_thermal_config()
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 Link: https://lore.kernel.org/r/20220220031810.738362-8-damien.lemoal@opensource.wdc.com Fixes:842784e0d1
("pm80xx: Update For Thermal Page Code") Fixes:f5860992db
("[SCSI] pm80xx: Added SPCv/ve specific hardware functionalities and relevant changes in common files") Reviewed-by: John Garry <john.garry@huawei.com> Reviewed-by: Jack Wang <jinpu.wang@ionos.com> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
cd2268a180
commit
bb225b12db
1 changed files with 5 additions and 3 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue