- 05 9月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
Reviewed-by: NAlex Bennée <alex.bennee@linaro.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 16 7月, 2019 1 次提交
-
-
由 Paolo Bonzini 提交于
Copy and pasting from Thunderbird's "view source" window results in double encoding of multibyte UTF-8 sequences. The appearance of those sequences is very peculiar, so detect it and give an error despite the (low) possibility of false positives. As the major offender, I am also adding the same check to my applypatch-msg and commit-msg hooks, but this will also cause patchew to croak loudly when this mistake happens. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Message-Id: <1558099140-53240-1-git-send-email-pbonzini@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 06 7月, 2019 1 次提交
-
-
由 Paolo Bonzini 提交于
While indeed we do not want to have return (a); it is less clear that this applies to return (a && b); Some editors indent more nicely if you have parentheses, and some people's eyes may appreciate that as well. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <1561116534-21814-1-git-send-email-pbonzini@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 03 6月, 2019 1 次提交
-
-
由 Peter Xu 提交于
According to: https://spdx.org/ids-how, let's still allow QEMU to use the SPDX license identifier: // SPDX-License-Identifier: *** CC: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <20190426062705.4651-1-peterx@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 29 1月, 2019 1 次提交
-
-
由 Peter Maydell 提交于
In checkpatch we attempt to check for and warn about block comments which start with /* or /** followed by a non-blank. Unfortunately a bug in the regex meant that we would incorrectly warn about comments starting with "/**" with no following text: git show 9813dc6a|./scripts/checkpatch.pl - WARNING: Block comments use a leading /* on a separate line #34: FILE: tests/libqtest.h:233: +/** The sequence "/\*\*?" was intended to match either "/*" or "/**", but Perl's semantics for '?' allow it to backtrack and try the "matches 0 chars" option if the "matches 1 char" choice leads to a failure of the rest of the regex to match. Switch to "/\*\*?+" which uses what perlre(1) calls the "possessive" quantifier form: this means that if it matches the "/**" string it will not later backtrack to matching just the "/*" prefix. The other end of the regex is also wrong: it is attempting to check for "/* or /** followed by something that isn't just whitespace", but [ \t]*.+[ \t]* will match on pure whitespace. This is less significant but means that a line with just a comment-starter followed by trailing whitespace will generate an incorrect warning about block comment style as well as the correct error about trailing whitespace which a different checkpatch test emits. Fixes: 8c06fbdf ("scripts/checkpatch.pl: Enforce multiline comment syntax") Reported-by: NThomas Huth <thuth@redhat.com> Reported-by: NEric Blake <eblake@redhat.com> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 20190118165050.22270-1-peter.maydell@linaro.org
-
- 11 1月, 2019 5 次提交
-
-
由 Paolo Bonzini 提交于
These are just like any other struct or union, so they should have CamelCase typedefs. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Add optional colors to make seeing message types a bit easier. The default is to show them on a tty. Inspired by Linux commits 57230297116fa ("checkpatch: colorize output to terminal") and 737c0767758b ("checkpatch: change format of --color argument to --color[=WHEN]"). Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
-
由 Paolo Bonzini 提交于
Similar to how patchew output looks like for multiple patches, say what file or patch is being tested _before_ emitting errors. This is clearer to a human that scans the output from top to bottom. In addition, provide a truncated commit hash and subject instead of the full hash, and process the commits first-to-last rather than last-to-first. Inspired by Linux commit 0dea9f1eef86bedacad91b6f652ca1ab0d08854c ("checkpatch: reduce number of `git log` calls with --git", 2016-03-20). Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Pull the test before the anticipated exits from the process sub. Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
In some cases, checkpatch's process subroutine is exiting the whole process. This is wrong, just return from the subroutine instead. Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 14 12月, 2018 1 次提交
-
-
由 Peter Maydell 提交于
We now require Linux-kernel-style multiline comments: /* * line one * line two */ Enforce this in checkpatch.pl, by backporting the relevant parts of the Linux kernel's checkpatch.pl. (The only changes needed are that Linux's checkpatch.pl WARN() function takes an extra argument that ours does not, and the kernel has a special case for networking code we don't want.)" The kernel's checkpatch does not enforce "leading /* on a line of its own, so that part is unique to QEMU's checkpatch. Sample warning output: WARNING: Block comments use a leading /* on a separate line #34: FILE: hw/intc/arm_gicv3_common.c:39: + /* Older versions of QEMU had a bug in the handling of state save/restore Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Acked-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
-
- 12 12月, 2018 1 次提交
-
-
由 Thomas Huth 提交于
The code that used it has already been removed a while ago with commit dc41aa7d ("tcg: Remove GET_TCGV_* and MAKE_TCGV_*"). Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NThomas Huth <thuth@redhat.com>
-
- 27 11月, 2018 1 次提交
-
-
由 Paolo Bonzini 提交于
Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 31 10月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
In some cases the Author: email address in patches submitted to the list gets mangled such that it says John Doe via Qemu-devel <qemu-devel@nongnu.org> This change is a result of workarounds for DMARC policies. Subsystem maintainers accepting patches need to catch these and fix them before sending pull requests, so a checkpatch.pl test is highly desirable. Reviewed-by: NEric Blake <eblake@redhat.com> Acked-by: NCornelia Huck <cohuck@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 24 8月, 2018 1 次提交
-
-
由 Heinrich Schuchardt 提交于
Allow a space between a colon and subsequent opening bracket. This sequence may occur in inline assembler statements like asm( "ldr %[out], [%[in]]\n\t" : [out] "=r" (ret) : [in] "r" (addr) ); Allow a space between a comma and subsequent opening bracket. This sequence may occur in designated initializers. To ease backporting the patch, I am also changing the comma-bracket detection (added in QEMU by commit 409db6eb) to use the same regex as brackets and colons (as done independently by Linux commit daebc534ac15f991961a5bb433e515988220e9bf). Link: http://lkml.kernel.org/r/20180403191655.23700-1-xypron.glpk@gmx.deSigned-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: NJoe Perches <joe@perches.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 23 8月, 2018 1 次提交
-
-
由 Paolo Bonzini 提交于
Fix $realfile filename when using -f/--file to not remove first level directory as if the filename was used in a -P1 patch. Only strip the first level directory (typically a or b) for P1 patches. Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> (extracted from Linux commit 2b7ab45395dc4d91ef30985f76d90a8f28f58c27) Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 07 7月, 2018 1 次提交
-
-
由 Paolo Bonzini 提交于
The mechanism to find possible type tokens can sometimes be confused and go into an infinite loop. This happens for example in QEMU for a line that looks like uint## BITS ##_t S = _S, T = _T; \ uint## BITS ##_t as, at, xs, xt, xd; \ Because the token pasting operator does not have a space before _t, it does not match $notPermitted. However, (?x) is turned on in the regular expression for modifiers, and thus ##_t matches the empty string. As a result, annotate_values goes in an infinite loop. The solution is simply to remove token pasting operators from the string before looking for modifiers. In the example above, the string uintBITS_t will be evaluated as a candidate modifier. This is not optimal, but it works as long as people do not write things like a##s##m, and it fits nicely into sub possible. For a similar reason, \# should be rejected always, even if it is not at end of line or followed by whitespace. The same patch was sent to the Linux kernel mailing list. Reported-by: NAleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 02 7月, 2018 1 次提交
-
-
由 Philippe Mathieu-Daudé 提交于
Do not match the IEC binary prefix as camelcase typedefs. This fixes: ERROR: "foo * bar" should be "foo *bar" #310: FILE: hw/ppc/ppc440_uc.c:564: + size = 8 * MiB * sh; total: 1 errors, 0 warnings, 433 lines checked Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180625124238.25339-5-f4bug@amsat.org> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 23 5月, 2018 1 次提交
-
-
由 Paul Durrant 提交于
All the xen stable APIs define handle types of the form: xen<subject of API>_handle and some define additional handle types of the form: xen<subject of API>_<purpose of handle>_handle Examples of these are xenforeignmemory_handle and xenforeignmemory_resource_handle. Both of these types will be misparsed by checkpatch if they appear as the first token in a line since, as types defined by an external library, they do not conform to the QEMU CODING_STYLE, which suggests CamelCase. A previous patch (5ac067a2) added xendevicemodel_handle to the list of types. This patch changes that to xen\w+_handle such that it will match all Xen stable API handles of the forms detailed above. Signed-off-by: NPaul Durrant <paul.durrant@citrix.com> Reviewed-by: NEric Blake <eblake@redhat.com> Acked-by: NAnthony PERARD <anthony.perard@citrix.com> Signed-off-by: NStefano Stabellini <sstabellini@kernel.org>
-
- 10 5月, 2018 5 次提交
-
-
由 Joe Perches 提交于
When files are being added/moved/deleted and a patch contains an update to the MAINTAINERS file, assume it's to update the MAINTAINERS file correctly and do not emit the "does MAINTAINERS need updating?" message. Reported by many people. Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 20180430124651.10340-6-stefanha@redhat.com (cherry picked from e0d975b1b439c4fef58fbc306c542c94f48bb849) Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Joe Perches 提交于
Whenever files are added, moved, or deleted, the MAINTAINERS file patterns can be out of sync or outdated. To try to keep MAINTAINERS more up-to-date, add a one-time warning whenever a patch does any of those. Signed-off-by: NJoe Perches <joe@perches.com> Acked-by: NAndy Whitcroft <apw@canonical.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 20180430124651.10340-5-stefanha@redhat.com (cherry picked from commit 13f1937ef33950b1112049972249e6191b82e6c9) Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Conflicts: QEMU WARN() only takes one argument, drop the 'type' value in the first argument. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Joe Perches 提交于
There are some patches created by git format-patch that when scanned by checkpatch report errors on lines like To: address.tld This is a checkpatch false positive. Improve the logic a bit to ignore folded email headers to avoid emitting these messages. Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 20180430124651.10340-4-stefanha@redhat.com (cherry picked from commit 29ee1b0c67e0dd7dea8dd718e8326076bce5b6fe) Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Pasi Savanainen 提交于
Check that a commit log doesn't contain UTF-8 when a mail header explicitly defines a different charset, like 'Content-Type: text/plain; charset="us-ascii"' Signed-off-by: NPasi Savanainen <pasi.savanainen@nixu.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Message-id: 20180430124651.10340-3-stefanha@redhat.com Cc: Joe Perches <joe@perches.com> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit fa64205df9dfd7b7662cc64a7e82115c00e428e5) Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Joe Perches 提交于
Some find using utf-8 in commit logs inappropriate. Some patch commit logs contain unintended utf-8 characters when doing things like copy/pasting compilation output. Look for the start of any commit log by skipping initial lines that look like email headers and "From: " lines. Stop looking for utf-8 at the first signature line. Signed-off-by: NJoe Perches <joe@perches.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Message-id: 20180430124651.10340-2-stefanha@redhat.com Suggested-by: NAndrew Morton <akpm@linux-foundation.org> Cc: Andy Whitcroft <apw@shadowen.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 15662b3e8644905032c2e26808401a487d4e90c1) Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Conflicts: QEMU does not have CHK(), use WARN() instead. QEMU WARN() only takes one argument, drop the 'type' value in the first argument. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 09 5月, 2018 1 次提交
-
-
由 Peter Xu 提交于
Otherwise it can warn this: ERROR: space prohibited between function name and open parenthesis '(' When with things like this: typedef gboolean (*it_tree_iterator)(ITValue start, ITValue end); CC: Paolo Bonzini <pbonzini@redhat.com> CC: "Daniel P. Berrangé" <berrange@redhat.com> CC: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> CC: Fam Zheng <famz@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <20180425070103.23723-1-peterx@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 26 4月, 2018 1 次提交
-
-
由 Ian Jackson 提交于
This avoids checkpatch misparsing (as statements) long function definitions or declarations, which sometimes start with constructs like this: static inline int xendevicemodel_relocate_memory( xendevicemodel_handle *dmod, domid_t domid, ... The type xendevicemodel_handle does not conform to Qemu CODING_STYLE, which would suggest CamelCase. However, it is a type defined by the Xen Project in xen.git. It would be possible to introduce a typedef to allow the qemu code to refer to it by a differently-spelled name, but that would obfuscate more than it would clarify. CC: Eric Blake <eblake@redhat.com> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: NIan Jackson <Ian.Jackson@eu.citrix.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 05 4月, 2018 1 次提交
-
-
由 Su Hang 提交于
Commit 2b9aef6f introduced a regression: checkpatch.pl started complaining about the following valid pattern: do { /* something */ } while (condition); Fix the script to once again permit this pattern. Signed-off-by: NSu Hang <suhang16@mails.ucas.ac.cn> Message-Id: <1522029982-4650-1-git-send-email-suhang16@mails.ucas.ac.cn> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 12 3月, 2018 1 次提交
-
-
由 Eric Blake 提交于
Sometimes, we want to refer to really long URLs, but checkpatch balks, and we have to manually bypass the check. URL shorteners may be nice at reducing long links, but it's hard to guarantee the shortened link will live as long as the real target, and it is also nice to see the original target without having to load the shortened URL through a browser. So exempt a line containing only a URL from the long-line syntax check. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Suggested-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NEric Blake <eblake@redhat.com> Message-Id: <20180222215838.18223-1-eblake@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 06 3月, 2018 2 次提交
-
-
由 Su Hang 提交于
Adding check for `while` and `for` statements, which condition has more than one line. The former checkpatch.pl can check `if` statement, which condition has more than one line, whether block misses brace round, like this: ''' if (cond1 || cond2) statement; ''' But it doesn't do the same check for `for` and `while` statements. Using `(?:...)` instead of `(...)` in regex pattern catch. Because `(?:...)` is faster and avoids unwanted side-effect. Suggested-by: NStefan Hajnoczi <stefanha@redhat.com> Suggested-by: NEric Blake <eblake@redhat.com> Suggested-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NSu Hang <suhang16@mails.ucas.ac.cn> Message-Id: <1520319890-19761-1-git-send-email-suhang16@mails.ucas.ac.cn> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Julia Suvorova 提交于
g_path_get_* do the same as g_strdup(basename/dirname(...)) but without modifying the argument. Signed-off-by: NJulia Suvorova <jusual@mail.ru> Message-Id: <1519987399-19160-1-git-send-email-jusual@mail.ru> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 22 1月, 2018 1 次提交
-
-
由 Klim Kireev 提交于
This dependency is required for adequate Parallels images support. Typically the disk consists of several images which are glued by XML disk descriptor. Also XML hides inside several important parameters which are not available in the image header. The patch also adds clause to checkpatch.pl to understand libxml2 types. Signed-off-by: NDenis V. Lunev <den@openvz.org> Signed-off-by: NKlim Kireev <klim.kireev@virtuozzo.com> Signed-off-by: NEdgar Kaziakhmedov <edgar.kaziakhmedov@virtuozzo.com> Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20180112090122.1702-3-klim.kireev@virtuozzo.com CC: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 16 1月, 2018 1 次提交
-
-
由 Eric Blake 提交于
Use of a loop construct for code that is not intended to repeat does not make much idiomatic sense, except in one place: it is a common usage in macros in order to wrap arbitrary code with single-statement semantics. But when used in a macro, it is more typical for the caller to supply the trailing ';' when calling the macro. Although qemu coding style frowns on bare: if (cond) statement1; else statement2; where extra semicolons actually cause syntax errors, we still want our macro styles to be easily copied to other projects. Thus, declare it an error if we encounter any form of 'while (0)' with a semicolon in the same line. Signed-off-by: NEric Blake <eblake@redhat.com> Message-Id: <20171201232433.25193-8-eblake@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 21 12月, 2017 1 次提交
-
-
由 Marc-André Lureau 提交于
This assumes that the comment gives some justification; "volatile sig_atomic_t" is also self-explanatory and usually correct. Discussed in: '[Qemu-devel] [PATCH] dump-guest-memory.py: fix "You can't do that without a process to debug"' Suggested-by: NFam Zheng <famz@redhat.com> Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20171215181810.4122-1-marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 19 10月, 2017 1 次提交
-
-
由 Marc-André Lureau 提交于
Use TPMBackendClass to hold class methods/fields. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
- 12 10月, 2017 1 次提交
-
-
由 Paolo Bonzini 提交于
stgit produces patch files that lack the ".patch" extensions. Others might be using ".diff" too. But since we are already limiting source files to only a handful of extensions, we can reuse that in the mode selection code. While at it, do not match "../foo" as a branch name. Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 05 10月, 2017 1 次提交
-
-
Do not use '/r' modifier which was introduced in perl 5.14. Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Fixes: 3e5875afc0f ("checkpatch: check trace-events code style") Tested-by: NAlex Williamson <alex.williamson@redhat.com> Message-id: 20171004154420.34596-1-vsementsov@virtuozzo.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 19 9月, 2017 2 次提交
-
-
由 Greg Kurz 提交于
The script doesn't know about all possible types and learn them as it parses the code. If it reaches a line with a type cast but the type isn't known yet, it is misinterpreted as an identifier. For example the following line: foo = (hwaddr) -1; results in the following false-positive to be reported: ERROR: spaces required around that '-' (ctx:VxV) Let's add this standard QEMU type to the list of pre-known types. Signed-off-by: NGreg Kurz <groug@kaod.org> Message-Id: <150538015789.8149.10902725348939486674.stgit@bahia.lan> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently before submitting a series, devs should run checkpatch.pl across each patch to be submitted. This can be automated using a command such as: git rebase -i master -x 'git show | ./scripts/checkpatch.pl -' This is rather long winded to type, so this patch introduces a way to tell checkpatch.pl to validate a series of GIT revisions. There are now three modes it can operate in 1) check a patch 2) check a source file, or 3) check a git branch. If no flags are given, the mode is determined by checking the args passed to the command. If the args contain a literal ".." it is treated as a GIT revision list. If the args end in ".patch" or equal "-" it is treated as a patch file. Otherwise it is treated as a source file. This automatic guessing can be overridden using --[no-]patch --[no-]file or --[no-]branch For example to check a GIT revision list: $ ./scripts/checkpatch.pl master.. total: 0 errors, 0 warnings, 297 lines checked b886d352a2bf58f0996471fb3991a138373a2957 has no obvious style problems and is ready for submission. total: 0 errors, 0 warnings, 182 lines checked 2a731f9a9ce145e0e0df6d42dd2a3ce4dfc543fa has no obvious style problems and is ready for submission. total: 0 errors, 0 warnings, 102 lines checked 11844169bcc0c8ed4449eb3744a69877ed329dd7 has no obvious style problems and is ready for submission. If a genuine patch filename contains the characters '..' it is possible to force interpretation of the arg as a patch $ ./scripts/checkpatch.pl --patch master.. will force it to load a patch file called "master..", or equivalently $ ./scripts/checkpatch.pl --no-branch master.. will simply turn off guessing of GIT revision lists. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <20170913091000.9005-1-berrange@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 01 8月, 2017 1 次提交
-
-
According to CODING_STYLE, check that in trace-events: 1. hex numbers are prefixed with '0x' 2. '#' flag of printf is not used 3. The exclusion from 1. are period-separated groups of numbers Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 20170731160135.12101-4-vsementsov@virtuozzo.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 13 7月, 2017 1 次提交
-
-
由 Alistair Francis 提交于
Implement warn_report_err() and warn_reportf_err() functions which are the same as the error_report_err() and error_reportf_err() functions except report a warning instead of an error. Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <276ff93eadc0b01b8243cc61ffc331f77922c0d0.1499866456.git.alistair.francis@xilinx.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-