All of lore.kernel.org
 help / color / mirror / Atom feed
* [folded-merged] minmax-sanity-check-constant-bounds-when-clamping-checkpatch-fixes.patch removed from -mm tree
@ 2022-11-15 22:12 Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2022-11-15 22:12 UTC (permalink / raw)
  To: mm-commits, keescook, Jason, andriy.shevchenko, akpm, akpm


The quilt patch titled
     Subject: minmax-sanity-check-constant-bounds-when-clamping-checkpatch-fixes
has been removed from the -mm tree.  Its filename was
     minmax-sanity-check-constant-bounds-when-clamping-checkpatch-fixes.patch

This patch was dropped because it was folded into minmax-sanity-check-constant-bounds-when-clamping.patch

------------------------------------------------------
From: Andrew Morton <akpm@linux-foundation.org>
Subject: minmax-sanity-check-constant-bounds-when-clamping-checkpatch-fixes
Date: Mon Oct 17 06:14:56 PM PDT 2022

ERROR: code indent should use tabs where possible
#36: FILE: include/linux/minmax.h:50:
+        (BUILD_BUG_ON_ZERO(__builtin_choose_expr(^I^I^I^I\$

WARNING: please, no spaces at the start of a line
#36: FILE: include/linux/minmax.h:50:
+        (BUILD_BUG_ON_ZERO(__builtin_choose_expr(^I^I^I^I\$

ERROR: code indent should use tabs where possible
#37: FILE: include/linux/minmax.h:51:
+                __is_constexpr((lo) > (hi)), (lo) > (hi), false)))$

WARNING: please, no spaces at the start of a line
#37: FILE: include/linux/minmax.h:51:
+                __is_constexpr((lo) > (hi)), (lo) > (hi), false)))$

WARNING: please, no space before tabs
#40: FILE: include/linux/minmax.h:54:
+^I__clamp_input_check(lo, hi) + ^I^I^I^I^I^I\$

WARNING: please, no space before tabs
#42: FILE: include/linux/minmax.h:56:
+^I^I^I      __typecheck(hi, lo) && __is_constexpr(val) && ^I\$

total: 2 errors, 4 warnings, 44 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/minmax-sanity-check-constant-bounds-when-clamping.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/minmax.h |   28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

--- a/include/linux/minmax.h~minmax-sanity-check-constant-bounds-when-clamping-checkpatch-fixes
+++ a/include/linux/minmax.h
@@ -37,26 +37,26 @@
 		__cmp(x, y, op), \
 		__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
 
-#define __clamp(val, lo, hi)							\
+#define __clamp(val, lo, hi)	\
 	__cmp(__cmp(val, lo, >), hi, <)
 
-#define __clamp_once(val, lo, hi, unique_val, unique_lo, unique_hi) ({		\
-		typeof(val) unique_val = (val);					\
-		typeof(lo) unique_lo = (lo);					\
-		typeof(hi) unique_hi = (hi);					\
+#define __clamp_once(val, lo, hi, unique_val, unique_lo, unique_hi) ({	\
+		typeof(val) unique_val = (val);				\
+		typeof(lo) unique_lo = (lo);				\
+		typeof(hi) unique_hi = (hi);				\
 		__clamp(unique_val, unique_lo, unique_hi); })
 
-#define __clamp_input_check(lo, hi)						\
-        (BUILD_BUG_ON_ZERO(__builtin_choose_expr(				\
+#define __clamp_input_check(lo, hi)					\
+        (BUILD_BUG_ON_ZERO(__builtin_choose_expr(			\
                 __is_constexpr((lo) > (hi)), (lo) > (hi), false)))
 
-#define __careful_clamp(val, lo, hi) ({						\
-	__clamp_input_check(lo, hi) + 						\
-	__builtin_choose_expr(__typecheck(val, lo) && __typecheck(val, hi) &&	\
-			      __typecheck(hi, lo) && __is_constexpr(val) && 	\
-			      __is_constexpr(lo) && __is_constexpr(hi),		\
-		__clamp(val, lo, hi),						\
-		__clamp_once(val, lo, hi, __UNIQUE_ID(__val),			\
+#define __careful_clamp(val, lo, hi) ({					\
+	__clamp_input_check(lo, hi) +					\
+	__builtin_choose_expr(__typecheck(val, lo) && __typecheck(val, hi) &&\
+			      __typecheck(hi, lo) && __is_constexpr(val) &&\
+			      __is_constexpr(lo) && __is_constexpr(hi),	\
+		__clamp(val, lo, hi),					\
+		__clamp_once(val, lo, hi, __UNIQUE_ID(__val),		\
 			     __UNIQUE_ID(__lo), __UNIQUE_ID(__hi))); })
 
 /**
_

Patches currently in -mm which might be from akpm@linux-foundation.org are

mm-memremap_pages-replace-zone_device_page_init-with-pgmap_request_folios-fix.patch
mm-gup-remove-foll_migration-fix.patch
mm-memremap-introduce-pgmap_request_folio-using-pgmap-offsets-fix.patch
mm-memremap-introduce-pgmap_request_folio-using-pgmap-offsets-fix-2.patch
mm-use-stack_depot-for-recording-kmemleaks-backtrace-checkpatch-fixes.patch
mm-use-stack_depot-for-recording-kmemleaks-backtrace-fix.patch
mm-use-stack_depot-for-recording-kmemleaks-backtrace-v3-fix.patch
kasan-allow-sampling-page_alloc-allocations-for-hw_tags-fix.patch
mm-hugetlb-convert-move_hugetlb_state-to-folios-fix.patch
minmax-sanity-check-constant-bounds-when-clamping.patch
minmax-sanity-check-constant-bounds-when-clamping-checkpatch-fixes-fix.patch
proc-report-open-files-as-size-in-stat-for-proc-pid-fd-v3-fix.patch


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [folded-merged] minmax-sanity-check-constant-bounds-when-clamping-checkpatch-fixes.patch removed from -mm tree
@ 2022-11-15 22:25 Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2022-11-15 22:25 UTC (permalink / raw)
  To: mm-commits, keescook, Jason, andriy.shevchenko, akpm, akpm


The quilt patch titled
     Subject: minmax-sanity-check-constant-bounds-when-clamping-checkpatch-fixes
has been removed from the -mm tree.  Its filename was
     minmax-sanity-check-constant-bounds-when-clamping-checkpatch-fixes.patch

This patch was dropped because it was folded into minmax-sanity-check-constant-bounds-when-clamping.patch

------------------------------------------------------
From: Andrew Morton <akpm@linux-foundation.org>
Subject: minmax-sanity-check-constant-bounds-when-clamping-checkpatch-fixes
Date: Mon Oct 17 06:14:56 PM PDT 2022

ERROR: code indent should use tabs where possible
#36: FILE: include/linux/minmax.h:50:
+        (BUILD_BUG_ON_ZERO(__builtin_choose_expr(^I^I^I^I\$

WARNING: please, no spaces at the start of a line
#36: FILE: include/linux/minmax.h:50:
+        (BUILD_BUG_ON_ZERO(__builtin_choose_expr(^I^I^I^I\$

ERROR: code indent should use tabs where possible
#37: FILE: include/linux/minmax.h:51:
+                __is_constexpr((lo) > (hi)), (lo) > (hi), false)))$

WARNING: please, no spaces at the start of a line
#37: FILE: include/linux/minmax.h:51:
+                __is_constexpr((lo) > (hi)), (lo) > (hi), false)))$

WARNING: please, no space before tabs
#40: FILE: include/linux/minmax.h:54:
+^I__clamp_input_check(lo, hi) + ^I^I^I^I^I^I\$

WARNING: please, no space before tabs
#42: FILE: include/linux/minmax.h:56:
+^I^I^I      __typecheck(hi, lo) && __is_constexpr(val) && ^I\$

total: 2 errors, 4 warnings, 44 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/minmax-sanity-check-constant-bounds-when-clamping.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/minmax.h |   28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

--- a/include/linux/minmax.h~minmax-sanity-check-constant-bounds-when-clamping-checkpatch-fixes
+++ a/include/linux/minmax.h
@@ -37,26 +37,26 @@
 		__cmp(x, y, op), \
 		__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
 
-#define __clamp(val, lo, hi)							\
+#define __clamp(val, lo, hi)	\
 	__cmp(__cmp(val, lo, >), hi, <)
 
-#define __clamp_once(val, lo, hi, unique_val, unique_lo, unique_hi) ({		\
-		typeof(val) unique_val = (val);					\
-		typeof(lo) unique_lo = (lo);					\
-		typeof(hi) unique_hi = (hi);					\
+#define __clamp_once(val, lo, hi, unique_val, unique_lo, unique_hi) ({	\
+		typeof(val) unique_val = (val);				\
+		typeof(lo) unique_lo = (lo);				\
+		typeof(hi) unique_hi = (hi);				\
 		__clamp(unique_val, unique_lo, unique_hi); })
 
-#define __clamp_input_check(lo, hi)						\
-        (BUILD_BUG_ON_ZERO(__builtin_choose_expr(				\
+#define __clamp_input_check(lo, hi)					\
+        (BUILD_BUG_ON_ZERO(__builtin_choose_expr(			\
                 __is_constexpr((lo) > (hi)), (lo) > (hi), false)))
 
-#define __careful_clamp(val, lo, hi) ({						\
-	__clamp_input_check(lo, hi) + 						\
-	__builtin_choose_expr(__typecheck(val, lo) && __typecheck(val, hi) &&	\
-			      __typecheck(hi, lo) && __is_constexpr(val) && 	\
-			      __is_constexpr(lo) && __is_constexpr(hi),		\
-		__clamp(val, lo, hi),						\
-		__clamp_once(val, lo, hi, __UNIQUE_ID(__val),			\
+#define __careful_clamp(val, lo, hi) ({					\
+	__clamp_input_check(lo, hi) +					\
+	__builtin_choose_expr(__typecheck(val, lo) && __typecheck(val, hi) &&\
+			      __typecheck(hi, lo) && __is_constexpr(val) &&\
+			      __is_constexpr(lo) && __is_constexpr(hi),	\
+		__clamp(val, lo, hi),					\
+		__clamp_once(val, lo, hi, __UNIQUE_ID(__val),		\
 			     __UNIQUE_ID(__lo), __UNIQUE_ID(__hi))); })
 
 /**
_

Patches currently in -mm which might be from akpm@linux-foundation.org are

mm-memremap_pages-replace-zone_device_page_init-with-pgmap_request_folios-fix.patch
mm-gup-remove-foll_migration-fix.patch
mm-memremap-introduce-pgmap_request_folio-using-pgmap-offsets-fix.patch
mm-memremap-introduce-pgmap_request_folio-using-pgmap-offsets-fix-2.patch
mm-use-stack_depot-for-recording-kmemleaks-backtrace-checkpatch-fixes.patch
mm-use-stack_depot-for-recording-kmemleaks-backtrace-fix.patch
mm-use-stack_depot-for-recording-kmemleaks-backtrace-v3-fix.patch
kasan-allow-sampling-page_alloc-allocations-for-hw_tags-fix.patch
mm-hugetlb-convert-move_hugetlb_state-to-folios-fix.patch
mm-delay-page_remove_rmap-until-after-the-tlb-has-been-flushed-fix.patch
minmax-sanity-check-constant-bounds-when-clamping.patch
minmax-sanity-check-constant-bounds-when-clamping-checkpatch-fixes-fix.patch
proc-report-open-files-as-size-in-stat-for-proc-pid-fd-v3-fix.patch


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-15 22:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-15 22:12 [folded-merged] minmax-sanity-check-constant-bounds-when-clamping-checkpatch-fixes.patch removed from -mm tree Andrew Morton
2022-11-15 22:25 Andrew Morton

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.