diff options
| author | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-02-20 12:17:47 +0900 |
|---|---|---|
| committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-02-22 21:31:17 -0500 |
| commit | ca374f5d92b8ae778f6a37dd3e7ed809bbf7a953 (patch) | |
| tree | 3a4c7c4cd4e3e420d14f2ff10374316ad92ab70e /lib/mpi/mpi-bit.c | |
| parent | bb225b12dbcc82d53d637d10b8d70b64494f8c16 (diff) | |
scsi: pm8001: Fix le32 values handling in pm80xx_set_sas_protocol_timer_config()
All fields of the SASProtocolTimerConfig structure have the __le32 type.
As such, use cpu_to_le32() to initialize them. This change suppresses many
sparse warnings:
warning: incorrect type in assignment (different base types)
expected restricted __le32 [addressable] [usertype] pageCode
got int
Note that the check to limit the value of the STP_IDLE_TMO field is removed
as this field is initialized using the fixed (and small) value defined by
the STP_IDLE_TIME macro.
The pm8001_dbg() calls printing the values of the SASProtocolTimerConfig
structure fileds are changed to use le32_to_cpu() to present the values in
human readable form.
Link: https://lore.kernel.org/r/20220220031810.738362-9-damien.lemoal@opensource.wdc.com
Fixes: a6cb3d012b98 ("[SCSI] pm80xx: thermal, sas controller config and error handling update")
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>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions
