-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] kernel: Fix build with Clang-12 for tokens introducing statement expression #1145
Comments
Are you planning on splitting these up into individual patches and sending them off upstream (since I doubt that a monolithic patch like this would not be accepted)? Or were you just reporting it so that others can take care of it? |
You can send on your own behalf, the procedure for accepting patches to upstream is very annoying for me. ) |
Sure, thanks for the heads up and pointing out these instances! I will send patches for these with some reported-by credits (if you are okay with that) either tomorrow or Monday. |
It's okay, do it. |
Another header: From 78f7c915ec3befa6565a02d16fd9986e9914407d Mon, 31 Aug 2020 15:34:08 +0300
From: Andy Lavr <andy.lavr@gmail.com>
Date: Mon, 31 Aug 2020 15:14:01 +0300
Subject: [PATCH] uapi: Fix build all warning for tokens introducing statement expression
Signed-off-by: Andy Lavr <andy.lavr@gmail.com>
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 93096e52..bf7b412 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -572,26 +572,22 @@
#define DM_MAPIO_DELAY_REQUEUE DM_ENDIO_DELAY_REQUEUE
#define DM_MAPIO_KILL 4
-#define dm_sector_div64(x, y)( \
-{ \
+#define dm_sector_div64(x, y) ({ \
u64 _res; \
(x) = div64_u64_rem(x, y, &_res); \
_res; \
-} \
-)
+})
/*
* Ceiling(n / sz)
*/
#define dm_div_up(n, sz) (((n) + (sz) - 1) / (sz))
-#define dm_sector_div_up(n, sz) ( \
-{ \
+#define dm_sector_div_up(n, sz) ({ \
sector_t _r = ((n) + (sz) - 1); \
sector_div(_r, (sz)); \
_r; \
-} \
-)
+})
/*
* ceiling(n / size) * size
diff --git a/include/uapi/linux/byteorder/big_endian.h b/include/uapi/linux/byteorder/big_endian.h
index 2199adc..a9ed15f 100644
--- a/include/uapi/linux/byteorder/big_endian.h
+++ b/include/uapi/linux/byteorder/big_endian.h
@@ -12,34 +12,34 @@
#include <linux/types.h>
#include <linux/swab.h>
-#define __constant_htonl(x) ((__force __be32)(__u32)(x))
-#define __constant_ntohl(x) ((__force __u32)(__be32)(x))
-#define __constant_htons(x) ((__force __be16)(__u16)(x))
-#define __constant_ntohs(x) ((__force __u16)(__be16)(x))
-#define __constant_cpu_to_le64(x) ((__force __le64)___constant_swab64((x)))
-#define __constant_le64_to_cpu(x) ___constant_swab64((__force __u64)(__le64)(x))
-#define __constant_cpu_to_le32(x) ((__force __le32)___constant_swab32((x)))
-#define __constant_le32_to_cpu(x) ___constant_swab32((__force __u32)(__le32)(x))
-#define __constant_cpu_to_le16(x) ((__force __le16)___constant_swab16((x)))
-#define __constant_le16_to_cpu(x) ___constant_swab16((__force __u16)(__le16)(x))
-#define __constant_cpu_to_be64(x) ((__force __be64)(__u64)(x))
-#define __constant_be64_to_cpu(x) ((__force __u64)(__be64)(x))
-#define __constant_cpu_to_be32(x) ((__force __be32)(__u32)(x))
-#define __constant_be32_to_cpu(x) ((__force __u32)(__be32)(x))
-#define __constant_cpu_to_be16(x) ((__force __be16)(__u16)(x))
-#define __constant_be16_to_cpu(x) ((__force __u16)(__be16)(x))
-#define __cpu_to_le64(x) ((__force __le64)__swab64((x)))
-#define __le64_to_cpu(x) __swab64((__force __u64)(__le64)(x))
-#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
-#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
-#define __cpu_to_le16(x) ((__force __le16)__swab16((x)))
-#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
-#define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
-#define __be64_to_cpu(x) ((__force __u64)(__be64)(x))
-#define __cpu_to_be32(x) ((__force __be32)(__u32)(x))
-#define __be32_to_cpu(x) ((__force __u32)(__be32)(x))
-#define __cpu_to_be16(x) ((__force __be16)(__u16)(x))
-#define __be16_to_cpu(x) ((__force __u16)(__be16)(x))
+#define __constant_htonl(x) ((__force __be32) (__u32) (x))
+#define __constant_ntohl(x) ((__force __u32) (__be32) (x))
+#define __constant_htons(x) ((__force __be16) (__u16) (x))
+#define __constant_ntohs(x) ((__force __u16) (__be16) (x))
+#define __constant_cpu_to_le64(x) ((__force __le64) ___constant_swab64((x)))
+#define __constant_le64_to_cpu(x) ___constant_swab64((__force __u64) (__le64) (x))
+#define __constant_cpu_to_le32(x) ((__force __le32) ___constant_swab32((x)))
+#define __constant_le32_to_cpu(x) ___constant_swab32((__force __u32) (__le32) (x))
+#define __constant_cpu_to_le16(x) ((__force __le16) ___constant_swab16((x)))
+#define __constant_le16_to_cpu(x) ___constant_swab16((__force __u16) (__le16) (x))
+#define __constant_cpu_to_be64(x) ((__force __be64) (__u64) (x))
+#define __constant_be64_to_cpu(x) ((__force __u64) (__be64) (x))
+#define __constant_cpu_to_be32(x) ((__force __be32) (__u32) (x))
+#define __constant_be32_to_cpu(x) ((__force __u32) (__be32) (x))
+#define __constant_cpu_to_be16(x) ((__force __be16) (__u16) (x))
+#define __constant_be16_to_cpu(x) ((__force __u16) (__be16) (x))
+#define __cpu_to_le64(x) ((__force __le64) __swab64((x)))
+#define __le64_to_cpu(x) __swab64((__force __u64) (__le64) (x))
+#define __cpu_to_le32(x) ((__force __le32) __swab32((x)))
+#define __le32_to_cpu(x) __swab32((__force __u32) (__le32) (x))
+#define __cpu_to_le16(x) ((__force __le16) __swab16((x)))
+#define __le16_to_cpu(x) __swab16((__force __u16) (__le16) (x))
+#define __cpu_to_be64(x) ((__force __be64) (__u64) (x))
+#define __be64_to_cpu(x) ((__force __u64) (__be64) (x))
+#define __cpu_to_be32(x) ((__force __be32) (__u32) (x))
+#define __be32_to_cpu(x) ((__force __u32) (__be32) (x))
+#define __cpu_to_be16(x) ((__force __be16) (__u16) (x))
+#define __be16_to_cpu(x) ((__force __u16) (__be16) (x))
static __always_inline __le64 __cpu_to_le64p(const __u64 *p)
{
@@ -95,12 +95,12 @@
#define __le32_to_cpus(x) __swab32s((x))
#define __cpu_to_le16s(x) __swab16s((x))
#define __le16_to_cpus(x) __swab16s((x))
-#define __cpu_to_be64s(x) do { (void)(x); } while (0)
-#define __be64_to_cpus(x) do { (void)(x); } while (0)
-#define __cpu_to_be32s(x) do { (void)(x); } while (0)
-#define __be32_to_cpus(x) do { (void)(x); } while (0)
-#define __cpu_to_be16s(x) do { (void)(x); } while (0)
-#define __be16_to_cpus(x) do { (void)(x); } while (0)
+#define __cpu_to_be64s(x) do { (void) (x); } while (0)
+#define __be64_to_cpus(x) do { (void) (x); } while (0)
+#define __cpu_to_be32s(x) do { (void) (x); } while (0)
+#define __be32_to_cpus(x) do { (void) (x); } while (0)
+#define __cpu_to_be16s(x) do { (void) (x); } while (0)
+#define __be16_to_cpus(x) do { (void) (x); } while (0)
#endif /* _UAPI_LINUX_BYTEORDER_BIG_ENDIAN_H */
diff --git a/include/uapi/linux/byteorder/little_endian.h b/include/uapi/linux/byteorder/little_endian.h
index 601c904..375a4cf 100644
--- a/include/uapi/linux/byteorder/little_endian.h
+++ b/include/uapi/linux/byteorder/little_endian.h
@@ -12,34 +12,34 @@
#include <linux/types.h>
#include <linux/swab.h>
-#define __constant_htonl(x) ((__force __be32)___constant_swab32((x)))
-#define __constant_ntohl(x) ___constant_swab32((__force __be32)(x))
-#define __constant_htons(x) ((__force __be16)___constant_swab16((x)))
-#define __constant_ntohs(x) ___constant_swab16((__force __be16)(x))
-#define __constant_cpu_to_le64(x) ((__force __le64)(__u64)(x))
-#define __constant_le64_to_cpu(x) ((__force __u64)(__le64)(x))
-#define __constant_cpu_to_le32(x) ((__force __le32)(__u32)(x))
-#define __constant_le32_to_cpu(x) ((__force __u32)(__le32)(x))
-#define __constant_cpu_to_le16(x) ((__force __le16)(__u16)(x))
-#define __constant_le16_to_cpu(x) ((__force __u16)(__le16)(x))
-#define __constant_cpu_to_be64(x) ((__force __be64)___constant_swab64((x)))
-#define __constant_be64_to_cpu(x) ___constant_swab64((__force __u64)(__be64)(x))
-#define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x)))
-#define __constant_be32_to_cpu(x) ___constant_swab32((__force __u32)(__be32)(x))
-#define __constant_cpu_to_be16(x) ((__force __be16)___constant_swab16((x)))
-#define __constant_be16_to_cpu(x) ___constant_swab16((__force __u16)(__be16)(x))
-#define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
-#define __le64_to_cpu(x) ((__force __u64)(__le64)(x))
-#define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
-#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
-#define __cpu_to_le16(x) ((__force __le16)(__u16)(x))
-#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
-#define __cpu_to_be64(x) ((__force __be64)__swab64((x)))
-#define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x))
-#define __cpu_to_be32(x) ((__force __be32)__swab32((x)))
-#define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
-#define __cpu_to_be16(x) ((__force __be16)__swab16((x)))
-#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
+#define __constant_htonl(x) ((__force __be32) ___constant_swab32((x)))
+#define __constant_ntohl(x) ___constant_swab32((__force __be32) (x))
+#define __constant_htons(x) ((__force __be16) ___constant_swab16((x)))
+#define __constant_ntohs(x) ___constant_swab16((__force __be16) (x))
+#define __constant_cpu_to_le64(x) ((__force __le64) (__u64) (x))
+#define __constant_le64_to_cpu(x) ((__force __u64) (__le64) (x))
+#define __constant_cpu_to_le32(x) ((__force __le32) (__u32) (x))
+#define __constant_le32_to_cpu(x) ((__force __u32) (__le32) (x))
+#define __constant_cpu_to_le16(x) ((__force __le16) (__u16) (x))
+#define __constant_le16_to_cpu(x) ((__force __u16) (__le16) (x))
+#define __constant_cpu_to_be64(x) ((__force __be64) ___constant_swab64((x)))
+#define __constant_be64_to_cpu(x) ___constant_swab64((__force __u64) (__be64) (x))
+#define __constant_cpu_to_be32(x) ((__force __be32) ___constant_swab32((x)))
+#define __constant_be32_to_cpu(x) ___constant_swab32((__force __u32) (__be32) (x))
+#define __constant_cpu_to_be16(x) ((__force __be16) ___constant_swab16((x)))
+#define __constant_be16_to_cpu(x) ___constant_swab16((__force __u16) (__be16) (x))
+#define __cpu_to_le64(x) ((__force __le64) (__u64) (x))
+#define __le64_to_cpu(x) ((__force __u64) (__le64) (x))
+#define __cpu_to_le32(x) ((__force __le32) (__u32) (x))
+#define __le32_to_cpu(x) ((__force __u32) (__le32) (x))
+#define __cpu_to_le16(x) ((__force __le16) (__u16) (x))
+#define __le16_to_cpu(x) ((__force __u16) (__le16) (x))
+#define __cpu_to_be64(x) ((__force __be64) __swab64((x)))
+#define __be64_to_cpu(x) __swab64((__force __u64) (__be64) (x))
+#define __cpu_to_be32(x) ((__force __be32) __swab32((x)))
+#define __be32_to_cpu(x) __swab32((__force __u32) (__be32) (x))
+#define __cpu_to_be16(x) ((__force __be16) __swab16((x)))
+#define __be16_to_cpu(x) __swab16((__force __u16) (__be16) (x))
static __always_inline __le64 __cpu_to_le64p(const __u64 *p)
{
@@ -89,12 +89,12 @@
{
return __swab16p((__u16 *)p);
}
-#define __cpu_to_le64s(x) do { (void)(x); } while (0)
-#define __le64_to_cpus(x) do { (void)(x); } while (0)
-#define __cpu_to_le32s(x) do { (void)(x); } while (0)
-#define __le32_to_cpus(x) do { (void)(x); } while (0)
-#define __cpu_to_le16s(x) do { (void)(x); } while (0)
-#define __le16_to_cpus(x) do { (void)(x); } while (0)
+#define __cpu_to_le64s(x) do { (void) (x); } while (0)
+#define __le64_to_cpus(x) do { (void) (x); } while (0)
+#define __cpu_to_le32s(x) do { (void) (x); } while (0)
+#define __le32_to_cpus(x) do { (void) (x); } while (0)
+#define __cpu_to_le16s(x) do { (void) (x); } while (0)
+#define __le16_to_cpus(x) do { (void) (x); } while (0)
#define __cpu_to_be64s(x) __swab64s((x))
#define __be64_to_cpus(x) __swab64s((x))
#define __cpu_to_be32s(x) __swab32s((x))
|
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
I do not believe this is going to be much of an issue anymore but I am going to do a set of builds tonight to see: llvm/llvm-project@0da8453 Might still be worth fixing these eventually but I do not think I have seen any actual bugs from these warnings so far so it just seems like noise and if the warnings are no longer present in a default kernel build, I am not going to bother sending the patches since white space changes seem to be received rather poorly. |
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
Another header: From 5c0d44a905fe079ab843e7fe08f1517ae78ccb79 Tue, 1 Sep 2020 08:49:44 +0300
From: Andy Lavr <andy.lavr@gmail.com>
Date: Tue, 1 Sep 2020 08:49:23 +0300
marvell: Fix build all warning for tokens introducing statement expression
Signed-off-by: Andy Lavr <andy.lavr@gmail.com>
diff --git a/drivers/net/wireless/marvell/mwifiex/fw.h b/drivers/net/wireless/marvell/mwifiex/fw.h
index d9f8bdb..ee073a0 100644
--- a/drivers/net/wireless/marvell/mwifiex/fw.h
+++ b/drivers/net/wireless/marvell/mwifiex/fw.h
@@ -513,10 +513,11 @@
#define RF_ANTENNA_AUTO 0xFFFF
-#define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) { \
- (((seq) & 0x00ff) | \
- (((num) & 0x000f) << 8)) | \
- (((type) & 0x000f) << 12); }
+#define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) ({ \
+ (((seq) & 0x00ff) | \
+ (((num) & 0x000f) << 8)) | \
+ (((type) & 0x000f) << 12); \
+})
#define HostCmd_GET_SEQ_NO(seq) \
((seq) & HostCmd_SEQ_NUM_MASK)
|
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
I indifferently who wants to fix it self. |
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
include/uapi/linux/byteorder (big_endian/little_endian) Fix Fuck off. ClangBuiltLinux/linux#1145
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
include/uapi/linux/byteorder (big_endian/little_endian) Fix Fuck off. ClangBuiltLinux/linux#1145
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com>
include/uapi/linux/byteorder (big_endian/little_endian) Fix Fuck off. ClangBuiltLinux/linux#1145
include/uapi/linux/byteorder (big_endian/little_endian) Fix Fuck off. ClangBuiltLinux/linux#1145
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
Fuck off. ClangBuiltLinux/linux#1145 Signed-off-by: atndko <z1281552865@gmail.com> Signed-off-by: MASTERGUY <murtipipo@gmail.com>
The text was updated successfully, but these errors were encountered: