summaryrefslogtreecommitdiff
path: root/lib/mpi
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-02-20 12:17:50 +0900
committerMartin K. Petersen <martin.petersen@oracle.com>2022-02-22 21:31:18 -0500
commitfd6d0e376211d7ed759db96b0fbd9a1cee67d462 (patch)
tree016c48c462cecf936151f0cba0306a003bf1b3e0 /lib/mpi
parent970404cc5744b1033b6ee601be4ef0e2d1fbcf72 (diff)
scsi: pm8001: Fix le32 values handling in pm80xx_chip_sata_req()
Make sure that the __le32 fields of struct sata_cmd are manipulated after applying the correct endian conversion. That is, use cpu_to_le32() for assigning values and le32_to_cpu() for consulting a field value. In particular, make sure that the calculations for the 4G boundary check are done using CPU endianness and *not* little endian values. With these fixes, many sparse warnings are removed. While at it, fix some code identation and add blank lines after variable declarations and in some other places to make this code more readable. Link: https://lore.kernel.org/r/20220220031810.738362-12-damien.lemoal@opensource.wdc.com Fixes: 0ecdf00ba6e5 ("[SCSI] pm80xx: 4G boundary fix.") 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')
0 files changed, 0 insertions, 0 deletions