History | View | Annotate | Download (79.2 kB)
checkpatch.pl: Check .cpp files
Enable checkpatch.pl to apply the same checks as C source files forC++ files with .cpp extensions. It also adds some exceptions for C++sources to suppress errors for: - <> used in C++ template arguments (e.g. template <class T>)...
CHECKPATCH: Add --debug adv_dcs
Add debug options to find this issue. They were not listedin the help because the are not simple to understand the output of.
Signed-off-by: Don Slutz <Don@CloudSwitch.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
CHECKPATCH: Add --debug adv_checking
CHECKPATCH: Add --debug adv_apw
CHECKPATCH: Add warning for single else statement.
For an example:
WARNING: braces {} are necessary even for single statement blocks+ } else+ return env->regs[R_EAX];
total: 0 errors, 1 warnings, 41 lines checkedSigned-off-by: Don Slutz <Don@CloudSwitch.com>...
checkpatch: Add QEMU specific rule
The new rule detects two wrong variants of QEMU.It was tested with commit b5a8fe5e.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fix spelling in comments, documentation and messages
accidently->accidentallyannother->anotherchoosen->chosenconsideres->considersdecriptor->descriptordevelopement->developmentparamter->parameterpreceed->precedepreceeding->precedingpriviledge->privilege...
fix spelling in scripts sub directory
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
checkpatch.pl: fix CAST detection
We should only claim that something is a cast if we did not encouter atoken before, that did set av_pending.
This fixes the operator * in the line below to be detected as binary (vsunary).
kmalloc(sizeof(struct alphatrack_ocmd) * true_size, GFP_KERNEL);...
checkpatch: remove rule on non-indented labels
There are 508 non-indented (non-default) labels, and 511 that areindented. So the rule is debatable at least. Actually, in thecommon case of labels at the outermost scope, there is really justone place where to put the label, so the rule is just wrong IMHO....
checkpatch: fix braces {} handling
checkpatch.pl doesn't report warning for if/else statements with missing'else' braces:
if (something) { foo;} else bar;
The patch has been tested using the last 100 commits.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>...
checkpatch: Fix bracing false positives on #if
789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7 only fixed #else,fix also #if.
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
checkpatch: don't error out on },{ lines
When having code like this:
static PCIDeviceInfo piix_ide_info[] = { { .qdev.name = "piix3-ide", .qdev.size = sizeof(PCIIDEState), .qdev.no_user = 1, .no_hotplug = 1,...
checkpatch.pl: don't complain about old lines with tabs
Don't complain when the patch includes lines with tabsonly in the hunk's untouched context.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
checkpatch: Fix bracing false positives on #else
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
checkpatch: adjust to QEMUisms
Change checkpatch.pl for QEMU use: - Root directory detection - Forbid tabs - Indent at 4 spaces - Allow typedefs - Enforce brace use even for single statement blocks - Don't suggest nonexistent cleanup tools
Mention the script in CODING_STYLE....
Add checkpatch.pl from Linux kernel
Unchanged import fromhttp://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-0.31