diff options
author | Bart Van Assche <bvanassche@acm.org> | 2023-07-07 00:50:24 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-07-11 21:59:53 +0300 |
commit | aa2db9d44a8b9b3cb12df7c253b3d6f46618d37e (patch) | |
tree | 4ed4c8bb8df226edca8ec93d04717304db70cb1c /include | |
parent | 30a5b62e1c83d7660c6c471915ad968b6c6b7d98 (diff) | |
download | linux-aa2db9d44a8b9b3cb12df7c253b3d6f46618d37e.tar.xz |
scsi: ufs: core: Convert UPIU_HEADER_DWORD() into a function
This change reduces the number of parentheses that are required in the
definition of this function and also when using this function.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230706215054.4113469-1-bvanassche@acm.org
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/ufs/ufs.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/ufs/ufs.h b/include/ufs/ufs.h index 4e8d6240e589..a2bc025a748e 100644 --- a/include/ufs/ufs.h +++ b/include/ufs/ufs.h @@ -23,9 +23,11 @@ (sizeof(struct utp_upiu_header))) #define UFS_SENSE_SIZE 18 -#define UPIU_HEADER_DWORD(byte3, byte2, byte1, byte0)\ - cpu_to_be32((byte3 << 24) | (byte2 << 16) |\ - (byte1 << 8) | (byte0)) +static inline __be32 upiu_header_dword(u8 byte3, u8 byte2, u8 byte1, u8 byte0) +{ + return cpu_to_be32(byte3 << 24 | byte2 << 16 | byte1 << 8 | byte0); +} + /* * UFS device may have standard LUs and LUN id could be from 0x00 to * 0x7F. Standard LUs use "Peripheral Device Addressing Format". |