lib/crc: Move __maybe_unused after function return type
Subsystems (2)
Eric Biggers
maintainerPATCH 1/1 lib/crc: Move __maybe_unused after function return type
While both locations work, having the attribute go after the return type is the more common convention.
Signed-off-by Eric Biggers <[email protected]>
--- lib/crc/crc-t10dif-main.c | 2 +- lib/crc/crc32-main.c | 6 +++--- lib/crc/crc64-main.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
lib/crc/crc-t10dif-main.c +1 -1
@@ -49,11 +49,11 @@ static const u16 t10_dif_crc_table[256] = {0xA415 ,0x2FA2 ,0x38CC ,0xB37B ,0x1610 ,0x9DA7 ,0x8AC9 ,0x017E ,0x1F65 ,0x94D2 ,0x83BC ,0x080B ,0xAD60 ,0x26D7 ,0x31B9 ,0xBA0E ,0xF0D8 ,0x7B6F ,0x6C01 ,0xE7B6 ,0x42DD ,0xC96A ,0xDE04 ,0x55B3 }; -static inline __maybe_unused u16 +static inline u16 __maybe_unused crc_t10dif_generic (u16 crc,const u8 *p,size_t len) {while (len--) crc = (crc <<8 ) ^ t10_dif_crc_table[(crc >>8 ) ^ *p++];return crc;
lib/crc/crc32-main.c +3 -3
@@ -29,27 +29,27 @@#include <linux/module.h> #include <linux/types.h> #include "crc32table.h" -static inline __maybe_unused u32 +static inline u32 __maybe_unused crc32_le_base (u32 crc,const u8 *p,size_t len) {while (len--) crc = (crc >>8 ) ^ crc32table_le[(crc &255 ) ^ *p++];return crc; } -static inline __maybe_unused u32 +static inline u32 __maybe_unused crc32_be_base (u32 crc,const u8 *p,size_t len) {while (len--) crc = (crc <<8 ) ^ crc32table_be[(crc >>24 ) ^ *p++];return crc; } -static inline __maybe_unused u32 +static inline u32 __maybe_unused crc32c_base (u32 crc,const u8 *p,size_t len) {while (len--) crc = (crc >>8 ) ^ crc32ctable_le[(crc &255 ) ^ *p++];return crc;
lib/crc/crc64-main.c +2 -2
@@ -38,19 +38,19 @@#include <linux/module.h> #include <linux/types.h> #include "crc64table.h" -static inline __maybe_unused u64 +static inline u64 __maybe_unused crc64_be_generic (u64 crc,const u8 *p,size_t len) {while (len--) crc = (crc <<8 ) ^ crc64table[(crc >>56 ) ^ *p++];return crc; } -static inline __maybe_unused u64 +static inline u64 __maybe_unused crc64_nvme_generic (u64 crc,const u8 *p,size_t len) {while (len--) crc = (crc >>8 ) ^ crc64nvmetable[(crc &0xff ) ^ *p++];return crc;
base-commit: 5453f75923b1e2ea471aa67aec64f98164faa352
Signature · 1 line
2.50.0