The patch titled Subject: checkpatch: try to avoid mask and shift errors has been removed from the -mm tree. Its filename was checkpatch-try-to-avoid-mask-and-shift-errors.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Joe Perches <joe@xxxxxxxxxxx> Subject: checkpatch: try to avoid mask and shift errors Shift has a higher precedence that mask so warn when a mask then shift operation is done without parentheses around the mask. This test works well for a right shift, but the left shift is pretty commonly done correctly so only warn on the right shift. Signed-off-by: Joe Perches <joe@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/checkpatch.pl | 8 ++++++++ 1 file changed, 8 insertions(+) diff -puN scripts/checkpatch.pl~checkpatch-try-to-avoid-mask-and-shift-errors scripts/checkpatch.pl --- a/scripts/checkpatch.pl~checkpatch-try-to-avoid-mask-and-shift-errors +++ a/scripts/checkpatch.pl @@ -4482,6 +4482,14 @@ sub process { } } +# check for mask then right shift without a parentheses + if ($^V && $^V ge 5.10.0 && + $line =~ /$LvalOrFunc\s*\&\s*($LvalOrFunc)\s*>>/ && + $4 !~ /^\&/) { # $LvalOrFunc may be &foo, ignore if so + WARN("MASK_THEN_SHIFT", + "Possible precedence defect with mask then right shift - may need parentheses\n" . $herecurr); + } + # check for bad placement of section $InitAttribute (e.g.: __initdata) if ($line =~ /(\b$InitAttribute\b)/) { my $attr = $1; _ Patches currently in -mm which might be from joe@xxxxxxxxxxx are origin.patch mm-utilc-add-kstrimdup.patch fs-affs-amigaffsc-use-va_format-instead-of-buffer-vnsprintf.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html