diff options
author | James Smart <[email protected]> | 2021-08-30 16:12:43 -0700 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2021-09-13 22:15:40 -0400 |
commit | 59936430e6a6acb0ef943e9306506b2e9c2e45a8 (patch) | |
tree | 7340fcbc2b7cfabafed3f46ad9d03d4e311eeaaf /scripts/gdb/linux/utils.py | |
parent | 96fafe7c6523886308605d30ec92c7936abe7c2c (diff) |
scsi: lpfc: Fix CPU to/from endian warnings introduced by ELS processing
The kernel test robot reported the following sparse warning:
".../lpfc_els.c:3984:25: sparse: sparse: cast from restricted __be16"
For the error being flagged, using be32_to_cpu() on a be16 data type, it
was simple enough. But a review of other elements and warnings were also
evaluated.
This patch corrected several items in the original patch:
- Using be32_to_cpu() on a be16 data type
- cpu_to_le32() used on a std uint32_t (CPU) data type.
Note: This is a byte array, but stored in LE layout by hardware at
32-bit boundaries. So it possibly needed conversion.
- Using cpu_to_le32() on a std uint16_t and assigned to a char typeA
- Using le32_to_cpu() on a le16 type
- Missing cpu_to_le16() on an assignment
Link: https://lore.kernel.org/r/[email protected]
Fixes: 9064aeb2df8e ("scsi: lpfc: Add EDC ELS support")
Reported-by: kernel test robot <[email protected]>
Co-developed-by: Justin Tee <[email protected]>
Signed-off-by: Justin Tee <[email protected]>
Signed-off-by: James Smart <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions