[to-be-updated] include-uapi-linux-swabh-add-__u16-cast-to-__swab16-conditional.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The quilt patch titled
     Subject: include/uapi/linux/swab.h: add __u16 cast to __swab16 conditional
has been removed from the -mm tree.  Its filename was
     include-uapi-linux-swabh-add-__u16-cast-to-__swab16-conditional.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Justin Stitt <jstitt007@xxxxxxxxx>
Subject: include/uapi/linux/swab.h: add __u16 cast to __swab16 conditional
Date: Tue, 7 Jun 2022 15:20:06 -0700

if __HAVE_BUILTIN_BSWAP16__ is defined then __swab16 utilizes a __u16 cast.
This same cast should be used if __HAVE_BUILTIN_BSWAP16__ is not defined as
well. This should fix loads (at least a few) clang -Wformat warnings
specifically with `ntohs()`

Link: https://github.com/ClangBuiltLinux/linux/issues/378
Link: https://lkml.kernel.org/r/20220607222006.22719-1-jstitt007@xxxxxxxxx
Signed-off-by: Justin Stitt <jstitt007@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/uapi/linux/swab.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/uapi/linux/swab.h~include-uapi-linux-swabh-add-__u16-cast-to-__swab16-conditional
+++ a/include/uapi/linux/swab.h
@@ -102,7 +102,7 @@ static inline __attribute_const__ __u32
 #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
 #else
 #define __swab16(x)				\
-	(__builtin_constant_p((__u16)(x)) ?	\
+	(__u16)(__builtin_constant_p((__u16)(x)) ?	\
 	___constant_swab16(x) :			\
 	__fswab16(x))
 #endif
_

Patches currently in -mm which might be from jstitt007@xxxxxxxxx are

include-uapi-linux-swabh-move-explicit-cast-outside-ternary.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux