The patch titled Subject: checkpatch: add --strict preference for #defines using BIT(foo) has been removed from the -mm tree. Its filename was checkpatch-add-strict-preference-for-defines-using-bitfoo.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Joe Perches <joe@xxxxxxxxxxx> Subject: checkpatch: add --strict preference for #defines using BIT(foo) Using BIT(foo) and BIT_ULL(bar) is more common now. Suggest using these macros over #defines with 1<<value. Add a --fix option too. Signed-off-by: Joe Perches <joe@xxxxxxxxxxx> Cc: David Miller <davem@xxxxxxxxxxxxx> Cc: Jiri Pirko <jiri@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/checkpatch.pl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff -puN scripts/checkpatch.pl~checkpatch-add-strict-preference-for-defines-using-bitfoo scripts/checkpatch.pl --- a/scripts/checkpatch.pl~checkpatch-add-strict-preference-for-defines-using-bitfoo +++ a/scripts/checkpatch.pl @@ -4975,6 +4975,17 @@ sub process { } } +# check for #defines like: 1 << <digit> that could be BIT(digit) + if ($line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) { + my $ull = ""; + $ull = "_ULL" if (defined($1) && $1 =~ /ll/i); + if (CHK("BIT_MACRO", + "Prefer using the BIT$ull macro\n" . $herecurr) && + $fix) { + $fixed[$fixlinenr] =~ s/\(?\s*1\s*[ulUL]*\s*<<\s*(\d+|$Ident)\s*\)?/BIT${ull}($1)/; + } + } + # check for case / default statements not preceded by break/fallthrough/switch if ($line =~ /^.\s*(?:case\s+(?:$Ident|$Constant)\s*|default):/) { my $has_break = 0; _ 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