- 14 9月, 2016 1 次提交
-
-
由 Lluís Vilanova 提交于
Prevent blank lines in documentation code blocks to be signalled as incorrect trailing whitespace. Code blocks in documentation are 4-column aligned, and blank lines in them should have exactly 4 columns of trailing whitespace to prevent QEMU's wiki to render them as separate code blocks. Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Message-Id: <147325254382.22644.5531276787733455773.stgit@fimbulvetr.bsc.es> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu>
-
- 10 8月, 2016 6 次提交
-
-
由 Paolo Bonzini 提交于
CHK-level checks have been removed from checkpatch or bumped to errors, so there is no effect anymore for --strict/--subjective. Furthermore, even most WARNs have been bumped to errors, with WARN only reserved to things that patchew probably ought not to complain about (and that maintainers probably will notice anyway during review if they are extreme). Default to exiting with success even if there are WARN-level failures, and cause --strict to fail for warnings. Maintainers that want to have a strict 80-character limit for their subsystem can add it to a commit hook for example. The --subjective synonym is removed. Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This only leaves a warning-level message for the extra-long lines soft limit. Everything else is bumped up. In the future warnings can be added for checks that can have false positives. Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Line lengths above 80 characters do exist. They are rare, but they happen from time to time. An ignored rule is worse than an exception to the rule, so do the latter. Some on the list expressed their preference for a soft limit that is slightly lower than 80 characters, to account for extra characters in unified diffs (including three-way diffs) and for email quoting. However, there was no consensus on this so keep the 80-character soft limit and add a hard limit at 90. Acked-by: NCornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
These should apply to all files, not just C/C++. Tweak the regular expression to check for whole words, to avoid false positives on Perl variables starting with "Id". Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Include Python and shell scripts, and make an exception for Perl scripts we imported from Linux or elsewhere. Acked-by: NCornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Radim Krčmář 提交于
Linux uses tabs for indentation and checkpatch always complained about automatically imported headers. update-linux-headers.sh could be modified to expand tabs, but there is no real reason to complain about any ugly code in Linux headers, so skip all hunk-related checks. Signed-off-by: NRadim Krčmář <rkrcmar@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 08 8月, 2016 1 次提交
-
-
由 Markus Armbruster 提交于
Commit 5d596c24's regexp assumes the error message string is the first argument. Correct for error_report(), wrong for all the others. Relax the regexp to match newline in anywhere. This might cause additional false positives. While there, update the list of error_reporting functions. Cc: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <1470224274-31522-3-git-send-email-armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 02 8月, 2016 1 次提交
-
-
由 Paolo Bonzini 提交于
Tested-By: NPeter Xu <peterx@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 18 7月, 2016 1 次提交
-
-
由 Stefan Hajnoczi 提交于
Renames look like this with git-diff(1) when diff.renames = true is set: diff --git a/a b/b similarity index 100% rename from a rename to b This raises the "Does not appear to be a unified-diff format patch" error because checkpatch.pl only considers a diff valid if it contains at least one "@@" hunk. This patch accepts renames and copies too so that checkpatch.pl exits successfully when a diff only renames/copies files. The git diff extended header format is described on the git-diff(1) man page. Reported-by: NColin Lord <clord@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 1468576014-28788-1-git-send-email-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 17 7月, 2016 1 次提交
-
-
由 Stefan Hajnoczi 提交于
Renames look like this with git-diff(1) when diff.renames = true is set: diff --git a/a b/b similarity index 100% rename from a rename to b This raises the "Does not appear to be a unified-diff format patch" error because checkpatch.pl only considers a diff valid if it contains at least one "@@" hunk. This patch accepts renames and copies too so that checkpatch.pl exits successfully when a diff only renames/copies files. The git diff extended header format is described on the git-diff(1) man page. Reported-by: NColin Lord <clord@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Message-Id: <1468576014-28788-1-git-send-email-stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 30 6月, 2016 1 次提交
-
-
由 Eric Blake 提交于
Maybe there should be; but until there is, we should not flag strtod() calls as something to replaced with qemu_strtod(). We also lack qemu_strtof() and qemu_strtold(), but as no one has been using strtof() or strtold(), it's not worth complicating the regex for them. (Ironically, I had to use 'git commit -n' since checkpatch uses TAB indents, in violation of its own recommendations.) Signed-off-by: NEric Blake <eblake@redhat.com> Message-Id: <1465526889-8339-3-git-send-email-eblake@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
- 18 5月, 2016 1 次提交
-
-
由 Stefan Weil 提交于
Signed-off-by: NStefan Weil <sw@weilnetz.de> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 05 4月, 2016 1 次提交
-
-
由 Cédric Le Goater 提交于
In some occasions, a patch [1] can start with a hunk containing a simple type cast. At the time annotate_values() is run, the type is unknown and the cast type is misinterpreted as a identifier, resulting in an error if it is followed with a negative value: ERROR: spaces required around that '-' (ctx:WxV) It seems complex to catch all possible types in a cast expression. So, as a fallback solution, let's add some common qemu types to the typeList array. [1] http://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg06741.htmlSigned-off-by: NCédric Le Goater <clg@fr.ibm.com> Message-Id: <1459503606-31603-1-git-send-email-clg@fr.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 16 2月, 2016 2 次提交
-
-
由 Leonid Bloch 提交于
Now, macro definition such as "#define abc(x) [x] = y" should pass without an error. Signed-off-by: NLeonid Bloch <leonid@daynix.com> Message-Id: <1446112118-12376-3-git-send-email-leonid@daynix.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Leonid Bloch 提交于
Previously, an error was printed in cases such as: { [1] = 5, [2] = 6 } The space passed OK after a curly brace, but not after a comma. Now, a space before a square bracket is allowed, if a comma comes before it. Signed-off-by: NLeonid Bloch <leonid@daynix.com> Message-Id: <1446112118-12376-2-git-send-email-leonid@daynix.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 13 1月, 2016 1 次提交
-
-
由 Jason J. Herne 提交于
We don't want newlines embedded in error messages. This seems to be a common problem with new code so let's try to catch it with checkpatch. This will not catch cases where newlines are inserted into the middle of an existing multi-line statement. But those cases should be rare. Signed-off-by: NJason J. Herne <jjherne@linux.vnet.ibm.com> Message-Id: <1449858642-24267-1-git-send-email-jjherne@linux.vnet.ibm.com> [Rephrased "Error function text" to "Error messages", dropped error_vprintf, error_printf, error_printf from $qemu_error_funcs, because they may legitimately print newlines] Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
- 11 1月, 2016 1 次提交
-
-
由 Peter Maydell 提交于
The checkpatch.pl script has a special case to permit the following operators to have no spaces around them: << >> & ^ | + - * / % QEMU style prefers all operators to consistently have spacing around them, so remove this special case handling. This avoids reviewers having to manually note it during code review. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NStefan Weil <sw@weilnetz.de> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 13 10月, 2015 2 次提交
-
-
由 Andy Whitcroft 提交于
checkpatch currently loops on fpu/softfloat.c Turns out this is fixed in the Linux version of checkpatch. So this is a port of Andy Whitcrofts fix from Linux, Original commit was commit 89a883530fe7 ("checkpatch: ## is not a valid modifier") As suggested by Peter Maydell for the QEMU version we drop the last "|" as there seems to be no need for that. (FWIW, the kernel discusion about that dried out: http://www.spinics.net/lists/kernel/msg1944421.html ) Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com> Message-Id: <1444291524-66569-1-git-send-email-borntraeger@de.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
The style here seems to be split according to the maintainer, but traditionally open braces were placed on typedef lines. Suggested-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 25 9月, 2015 1 次提交
-
-
由 Paolo Bonzini 提交于
If anything it should recommend strtok_r! Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 16 9月, 2015 1 次提交
-
-
由 Fam Zheng 提交于
Latest perl now deprecates "{" literal in regex and print warnings like "unescaped left brace in regex is deprecated". Add escape to keep it happy. Signed-off-by: NFam Zheng <famz@redhat.com> Message-Id: <1441969656-2640-1-git-send-email-famz@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 09 9月, 2015 2 次提交
-
-
由 Paolo Bonzini 提交于
Fully removing Sparse support requires more invasive changes. Only remove the really kernel-specific parts such as address space names. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Mostly change severity levels, but some tests can also be adjusted to refer to QEMU APIs or data structures. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 28 4月, 2015 1 次提交
-
-
由 Stefan Hajnoczi 提交于
The ffs(3) family of functions is not portable. MinGW doesn't always provide the function. Use ctz32() or ctz64() instead. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 1427124571-28598-10-git-send-email-stefanha@redhat.com Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 13 1月, 2015 1 次提交
-
-
由 Max Reitz 提交于
CODING_STYLE states the following about braces around blocks: > The opening brace is on the line that contains the control flow > statement that introduces the new block; [...] This is obviously impossible with multi-line conditions. Therefore, CODING_STYLE does not make any clear statement about where to put the opening brace after a multi-line condition. There is a reason to prefer to place the opening brace on an own line after such a condition while still placing it on the same line as the "control flow statement" if possible; that reason is that the last line of a multi-line condition is indented, in the case of "if", it is often indented by four spaces, just as much as the first statement in the block will be indented. This is hard to read as there is no clearly visible distinction between condition and block. Placing the opening brace on a separate line solves this issue. Also, there are cases where placing the opening brace on a separate line is the only viable option; if the previous line had nearly 80 characters and splitting it is not desirable, the opening brace is naturally placed on an own line. This patch fixes checkpatch.pl to not complain about braces on own lines if the condition introducing the block spanned more than one line, or if the previous line had 79 or 80 characters. Furthermore, the warning about not having braces around a block is fixed to mind braces not being on the last line of the condition. Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 26 8月, 2014 1 次提交
-
-
由 Paolo Bonzini 提交于
Most QEMU typedefs are camelcase, starting with one uppercase letter and containing at least one lowercase letter. There are a few all-uppercase types, add the most common too. This fixes recognition of types in lines such as static __attribute__((unused)) inline void tcg_out8(TCGContext *s, uint8_t v) (Example provided by Peter Maydell). Reported-by: NAlexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Stefan Weil <sw@weilnetz.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 10 9月, 2013 1 次提交
-
-
由 Tomoki Sekiyama 提交于
Enable checkpatch.pl to apply the same checks as C source files for C++ 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>) - :: used to represent namespaces (e.g. SomeClass::method()) - : used in class declaration (e.g. class T : public Super) - ~ used in destructor method name (e.g. T::~T()) - spacing around 'catch' (e.g. catch (...)) Signed-off-by: NTomoki Sekiyama <tomoki.sekiyama@hds.com> Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
-
- 06 9月, 2012 4 次提交
-
-
由 Don Slutz 提交于
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 checked Signed-off-by: NDon Slutz <Don@CloudSwitch.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Don Slutz 提交于
Add debug options to find this issue. They were not listed in the help because the are not simple to understand the output of. Signed-off-by: NDon Slutz <Don@CloudSwitch.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Don Slutz 提交于
Add debug options to find this issue. They were not listed in the help because the are not simple to understand the output of. Signed-off-by: NDon Slutz <Don@CloudSwitch.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Don Slutz 提交于
Add debug options to find this issue. They were not listed in the help because the are not simple to understand the output of. Signed-off-by: NDon Slutz <Don@CloudSwitch.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 22 6月, 2012 1 次提交
-
-
由 Stefan Weil 提交于
The new rule detects two wrong variants of QEMU. It was tested with commit b5a8fe5e. Signed-off-by: NStefan Weil <sw@weilnetz.de> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 14 12月, 2011 1 次提交
-
-
由 Stefan Weil 提交于
accidently->accidentally annother->another choosen->chosen consideres->considers decriptor->descriptor developement->development paramter->parameter preceed->precede preceeding->preceding priviledge->privilege propogation->propagation substraction->subtraction throught->through upto->up to usefull->useful Fix also grammar in posix-aio-compat.c Signed-off-by: NStefan Weil <sw@weilnetz.de> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 02 12月, 2011 1 次提交
-
-
由 Dong Xu Wang 提交于
Signed-off-by: NDong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 26 11月, 2011 1 次提交
-
-
由 Florian Mickler 提交于
We should only claim that something is a cast if we did not encouter a token before, that did set av_pending. This fixes the operator * in the line below to be detected as binary (vs unary). kmalloc(sizeof(struct alphatrack_ocmd) * true_size, GFP_KERNEL); Reported-by: Peter Chubb <nicta.com.au> Signed-off-by: NFlorian Mickler <florian@mickler.org> (cherry-picked from Linux kernel commit c023e4734c3e8801e0ecb5e81b831d42a374d861) Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 02 11月, 2011 1 次提交
-
-
由 Paolo Bonzini 提交于
There are 508 non-indented (non-default) labels, and 511 that are indented. So the rule is debatable at least. Actually, in the common case of labels at the outermost scope, there is really just one place where to put the label, so the rule is just wrong IMHO. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 27 8月, 2011 1 次提交
-
-
由 Pavel Borzenkov 提交于
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: NPavel Borzenkov <pavel.borzenkov@gmail.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 21 7月, 2011 1 次提交
-
-
由 Blue Swirl 提交于
789f88d0 only fixed #else, fix also #if. Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 17 7月, 2011 1 次提交
-
-
由 Alexander Graf 提交于
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, .init = pci_piix_ide_initfn, .vendor_id = PCI_VENDOR_ID_INTEL, .device_id = PCI_DEVICE_ID_INTEL_82371SB_1, .class_id = PCI_CLASS_STORAGE_IDE, },{ .qdev.name = "piix4-ide", .qdev.size = sizeof(PCIIDEState), .qdev.no_user = 1, .no_hotplug = 1, .init = pci_piix_ide_initfn, .vendor_id = PCI_VENDOR_ID_INTEL, .device_id = PCI_DEVICE_ID_INTEL_82371AB, .class_id = PCI_CLASS_STORAGE_IDE, },{ /* end of list */ } }; checkpatch currently errors out, claiming that spaces need to follow commas. However, this particular style of defining structs is pretty common in qemu code and very readable. So let's declare it as supported for the above case. Reported-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NAlexander Graf <agraf@suse.de>
-