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@xxxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx> Cc: "Jason A. Donenfeld" <Jason@xxxxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- 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@xxxxxxxxxxxxxxxxxxxx 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