Re: [PATCH v8 01/13] exfat: add in-memory and on-disk structures and headers

From: Namjae Jeon
Date: Tue Dec 31 2019 - 08:46:54 EST


>> +
>> +#define ATTR_READONLY_LE cpu_to_le16(0x0001)
>> +#define ATTR_HIDDEN_LE cpu_to_le16(0x0002)
>> +#define ATTR_SYSTEM_LE cpu_to_le16(0x0004)
>> +#define ATTR_VOLUME_LE cpu_to_le16(0x0008)
>> +#define ATTR_SUBDIR_LE cpu_to_le16(0x0010)
>> +#define ATTR_ARCHIVE_LE cpu_to_le16(0x0020)
>
> Hello!
>
> This looks like copy-paste code from /* file attributes */ section
> above. What about at least making these macro definitions as?
Yes, will remove unused file attribute macros.
>
> #define ATTR_READONLY_LE cpu_to_le16(ATTR_READONLY)
> #define ATTR_HIDDEN_LE cpu_to_le16(ATTR_HIDDEN)
> ...
>
> But main question is, are these _LE definitions needed at all?

>
> Looking at the whole patch series and only ATTR_SUBDIR_LE and
> ATTR_ARCHIVE_LE are used.
>
> Is not it better to use cpu_to_le16(ATTR_READONLY) directly in code and
> do not define duplicate ATTR_READONLY_LE macro at all?
I can change them as you pointed out.

Thanks!
>