[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wjZvroqVj0+R+Eg_OAjk1DkvP9AVzQn81E+BZeoWR5AFQ@mail.gmail.com>
Date: Sat, 8 May 2021 08:23:27 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: linux-arch <linux-arch@...r.kernel.org>,
Vineet Gupta <vgupta@...opsys.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC 12/12] asm-generic: simplify asm/unaligned.h
On Sat, May 8, 2021 at 2:29 AM Arnd Bergmann <arnd@...nel.org> wrote:
>
> On Sat, May 8, 2021 at 1:54 AM Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
> >
> > #define get_unaligned(ptr) \
> > __get_unaligned_t(typeof(*__ptr), __ptr)
That's missing a set of parentheses around that __ptr thing ('*__ptr'
should be '*(__ptr)'), btw, so don't use that as-is.
> Both versions are equally correct, I picked the __auto_type version
> because this tends to produce smaller preprocessor output when you have
> multiple layers of nested macros with 'ptr' expanding to something
> complicated,
Ahh.
Yeah, that's probably not a problem for get_unaligned(), but it might
happen in other situations.
Linus
Powered by blists - more mailing lists