scsi: qla4xxx: Convert uses of __constant_cpu_to_<foo> to cpu_to_<foo>
authorDwaipayan Ray <dwaipayanray1@gmail.com>
Fri, 16 Jul 2021 11:28:52 +0000 (16:58 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 1 Aug 2021 17:39:17 +0000 (13:39 -0400)
commit33529018294f1eabc6b5bb2672941165e658e96a
treef68caaefd73dd4f2c9fc3948cabe60eb2ee95e5c
parent2127cd21fb78c6e22d92944253afd967b0ff774d
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>
drivers/scsi/qla4xxx/ql4_init.c
drivers/scsi/qla4xxx/ql4_iocb.c
drivers/scsi/qla4xxx/ql4_mbx.c
drivers/scsi/qla4xxx/ql4_nx.c
drivers/scsi/qla4xxx/ql4_os.c