OpenCloudOS-Kernel/drivers/scsi/qla4xxx
Dwaipayan Ray 3352901829 scsi: qla4xxx: Convert uses of __constant_cpu_to_<foo> to cpu_to_<foo>
The macros cpu_to_le16() and cpu_to_le32() have special cases for
constants.  Their __constant_<foo> versions are not required.

On little endian systems, both cpu_to_le16() and __constant_cpu_to_le16()
expand to the same expression. Same is the case with cpu_to_le32().

On big endian systems, cpu_to_le16() expands to __swab16() which has a
__builtin_constant_p check. Similarly, cpu_to_le32() expands to __swab32().

Consequently these macros can be safely used with constants, and hence all
those uses are converted. This was discovered as a part of a checkpatch
evaluation, looking at all reports of WARNING:CONSTANT_CONVERSION error
type.

Link: https://lore.kernel.org/r/20210716112852.24598-1-dwaipayanray1@gmail.com
Signed-off-by: Dwaipayan Ray <dwaipayanray1@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-08-01 13:39:17 -04:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ql4_83xx.c scsi: qla4xxx: Simplify conditional 2021-05-10 13:25:12 -04:00
ql4_83xx.h scsi/qla4xxx: Convert to SPDX license identifiers 2020-09-16 14:31:36 +02:00
ql4_attr.c scsi/qla4xxx: Convert to SPDX license identifiers 2020-09-16 14:31:36 +02:00
ql4_bsg.c scsi/qla4xxx: Convert to SPDX license identifiers 2020-09-16 14:31:36 +02:00
ql4_bsg.h scsi/qla4xxx: Convert to SPDX license identifiers 2020-09-16 14:31:36 +02:00
ql4_dbg.c scsi/qla4xxx: Convert to SPDX license identifiers 2020-09-16 14:31:36 +02:00
ql4_dbg.h scsi/qla4xxx: Convert to SPDX license identifiers 2020-09-16 14:31:36 +02:00
ql4_def.h scsi: qla4xxx: Remove in_interrupt() from qla4_82xx_rom_lock() 2020-12-01 00:03:53 -05:00
ql4_fw.h scsi: qla4xxx: Use standard SAM status definitions 2021-01-22 21:14:09 -05:00
ql4_glbl.h scsi: qla4xxx: Remove in_interrupt() 2020-12-01 00:03:52 -05:00
ql4_init.c scsi: qla4xxx: Convert uses of __constant_cpu_to_<foo> to cpu_to_<foo> 2021-08-01 13:39:17 -04:00
ql4_inline.h scsi/qla4xxx: Convert to SPDX license identifiers 2020-09-16 14:31:36 +02:00
ql4_iocb.c scsi: qla4xxx: Convert uses of __constant_cpu_to_<foo> to cpu_to_<foo> 2021-08-01 13:39:17 -04:00
ql4_isr.c scsi: qla4xxx: Use standard SAM status definitions 2021-01-22 21:14:09 -05:00
ql4_mbx.c scsi: qla4xxx: Convert uses of __constant_cpu_to_<foo> to cpu_to_<foo> 2021-08-01 13:39:17 -04:00
ql4_nvram.c scsi/qla4xxx: Convert to SPDX license identifiers 2020-09-16 14:31:36 +02:00
ql4_nvram.h scsi/qla4xxx: Convert to SPDX license identifiers 2020-09-16 14:31:36 +02:00
ql4_nx.c scsi: qla4xxx: Convert uses of __constant_cpu_to_<foo> to cpu_to_<foo> 2021-08-01 13:39:17 -04:00
ql4_nx.h scsi/qla4xxx: Convert to SPDX license identifiers 2020-09-16 14:31:36 +02:00
ql4_os.c scsi: qla4xxx: Convert uses of __constant_cpu_to_<foo> to cpu_to_<foo> 2021-08-01 13:39:17 -04:00
ql4_version.h scsi/qla4xxx: Convert to SPDX license identifiers 2020-09-16 14:31:36 +02:00