From: Greg Kroah-Hartman Date: Tue, 3 Mar 2020 10:52:12 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: v4.19.108~40 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d6b131f496536a214306d25c9ecbcefb7d82329f;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: include-linux-bitops.h-introduce-bits_per_type.patch --- diff --git a/queue-4.14/include-linux-bitops.h-introduce-bits_per_type.patch b/queue-4.14/include-linux-bitops.h-introduce-bits_per_type.patch new file mode 100644 index 00000000000..442040197a7 --- /dev/null +++ b/queue-4.14/include-linux-bitops.h-introduce-bits_per_type.patch @@ -0,0 +1,42 @@ +From 9144d75e22cad3c89e6b2ccab551db9ee28d250a Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Tue, 21 Aug 2018 21:57:03 -0700 +Subject: include/linux/bitops.h: introduce BITS_PER_TYPE + +From: Chris Wilson + +commit 9144d75e22cad3c89e6b2ccab551db9ee28d250a upstream. + +net_dim.h has a rather useful extension to BITS_PER_BYTE to compute the +number of bits in a type (BITS_PER_BYTE * sizeof(T)), so promote the macro +to bitops.h, alongside BITS_PER_BYTE, for wider usage. + +Link: http://lkml.kernel.org/r/20180706094458.14116-1-chris@chris-wilson.co.uk +Signed-off-by: Chris Wilson +Reviewed-by: Jani Nikula +Cc: Randy Dunlap +Cc: Andy Gospodarek +Cc: David S. Miller +Cc: Thomas Gleixner +Cc: Ingo Molnar +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +[only take the bitops.h portion for stable kernels - gregkh] +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/bitops.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/include/linux/bitops.h ++++ b/include/linux/bitops.h +@@ -4,7 +4,8 @@ + #include + #include + +-#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) ++#define BITS_PER_TYPE(type) (sizeof(type) * BITS_PER_BYTE) ++#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_TYPE(long)) + + extern unsigned int __sw_hweight8(unsigned int w); + extern unsigned int __sw_hweight16(unsigned int w); diff --git a/queue-4.14/series b/queue-4.14/series index 7500b90dd41..1caa43ad742 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -50,5 +50,6 @@ i2c-jz4780-silence-log-flood-on-txabrt.patch drm-i915-gvt-separate-display-reset-from-all_engines-reset.patch usb-charger-assign-specific-number-for-enum-value.patch ecryptfs-fix-up-bad-backport-of-fe2e082f5da5b4a0a92ae32978f81507ef37ec66.patch +include-linux-bitops.h-introduce-bits_per_type.patch net-netlink-cap-max-groups-which-will-be-considered-in-netlink_bind.patch net-atlantic-fix-potential-error-handling.patch