[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wiqLPZbiWFZ3rDNCY0fm=dFR3SSDONvrVNVbkOQmQS1vw@mail.gmail.com>
Date: Fri, 7 May 2021 16:54:53 -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>,
Arnd Bergmann <arnd@...db.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC 12/12] asm-generic: simplify asm/unaligned.h
On Fri, May 7, 2021 at 3:12 PM Arnd Bergmann <arnd@...nel.org> wrote:
>
> From: Arnd Bergmann <arnd@...db.de>
>
> The get_unaligned()/put_unaligned() implementations are much more complex
> than necessary, now that all architectures use the same code.
Thanks for doing this, it looks good to me.
I suspect it's still slightly unnecessarily complicated - why is that
get_unaligned() not just
#define get_unaligned(ptr) \
__get_unaligned_t(typeof(*__ptr), __ptr)
Because I'm not seeing the reason for doing that "__auto_type __ptr"
thing - the argument to a "typeof()" isn't actually evaluated.
Maybe I'm just nit-picking, this certainly is a huge improvement regardless.
Linus
Powered by blists - more mailing lists