From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, sam@ravnborg.org,
ruben.ayrapetyan@arm.com, pvorel@suse.cz, masahiroy@kernel.org,
kevin.brodsky@arm.com, akpm@linux-foundation.org
Subject: + uapi-linux-consth-prefer-iso-friendly-__typeof__.patch added to mm-nonmm-unstable branch
Date: Tue, 11 Apr 2023 17:24:16 -0700 [thread overview]
Message-ID: <20230412002416.ED32CC433EF@smtp.kernel.org> (raw)
The patch titled
Subject: uapi/linux/const.h: prefer ISO-friendly __typeof__
has been added to the -mm mm-nonmm-unstable branch. Its filename is
uapi-linux-consth-prefer-iso-friendly-__typeof__.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/uapi-linux-consth-prefer-iso-friendly-__typeof__.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Kevin Brodsky <kevin.brodsky@arm.com>
Subject: uapi/linux/const.h: prefer ISO-friendly __typeof__
Date: Tue, 11 Apr 2023 10:27:47 +0100
typeof is (still) a GNU extension, which means that it cannot be used when
building ISO C (e.g. -std=c99). It should therefore be avoided in uapi
headers in favour of the ISO-friendly __typeof__.
Unfortunately this issue could not be detected by
CONFIG_UAPI_HEADER_TEST=y as the __ALIGN_KERNEL() macro is not expanded in
any uapi header.
Link: https://lkml.kernel.org/r/20230411092747.3759032-1-kevin.brodsky@arm.com
Fixes: d6fc9fcbaa65 ("kbuild: compile-test exported headers to ensure they are self-contained")
Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Reported-by: Ruben Ayrapetyan <ruben.ayrapetyan@arm.com>
Tested-by: Ruben Ayrapetyan <ruben.ayrapetyan@arm.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Tested-by: Petr Vorel <pvorel@suse.cz>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/uapi/linux/const.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/uapi/linux/const.h~uapi-linux-consth-prefer-iso-friendly-__typeof__
+++ a/include/uapi/linux/const.h
@@ -28,7 +28,7 @@
#define _BITUL(x) (_UL(1) << (x))
#define _BITULL(x) (_ULL(1) << (x))
-#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
+#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
_
Patches currently in -mm which might be from kevin.brodsky@arm.com are
uapi-linux-consth-prefer-iso-friendly-__typeof__.patch
next reply other threads:[~2023-04-12 0:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 0:24 Andrew Morton [this message]
2023-04-12 1:33 ` + uapi-linux-consth-prefer-iso-friendly-__typeof__.patch added to mm-nonmm-unstable branch Masahiro Yamada
2023-04-12 1:45 ` Andrew Morton
2023-04-12 5:34 ` Petr Vorel
2023-04-16 13:19 ` Masahiro Yamada
2023-04-16 20:54 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230412002416.ED32CC433EF@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=kevin.brodsky@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=pvorel@suse.cz \
--cc=ruben.ayrapetyan@arm.com \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.