On 06.12.2023 11:02, Juergen Gross wrote:
> On 06.12.23 09:46, Jan Beulich wrote:
>> On 06.12.2023 08:10, Juergen Gross wrote:
>>> @@ -15,67 +7,82 @@
>>> #include <asm/byteorder.h>
>>> #endif
>>>
>>> -#define get_unaligned(p) (*(p))
>>> -#define put_unaligned(val, p) (*(p) = (val))
>>> +/*
>>> + * This is the most generic implementation of unaligned accesses
>>> + * and should work almost anywhere.
>>> + */
>>> +
>>> +#define get_unaligned_t_(type, ptr) ({
>>> \
>>
>> ..., do we need the trailing underscores here in addition to the already
>> sufficiently clear _t suffixes? (Leaving aside that ..._t generally is to
>> denote types, not macros or functions.)
>
> Maybe we should just name it get_unaligned_type()?
I wouldn't mind, but Andrew mentioning min_t() / max_t() suggests the
present naming might be okay, too. (Still those two macros signal
something quite different with their _t suffixes.)
Jan