mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
miscellaneous patches:
* checkpatch.pl: Enforce multiline comment syntax * Rename cpu_physical_memory_write_rom() to address_space_write_rom() * disas, monitor, elf_ops: Use address_space_read() to read memory * Remove load_image() in favour of load_image_size() * Fix some minor memory leaks in arm boards/devices * virt: fix broken indentation -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCAAGBQJcE8EQAAoJEDwlJe0UNgze1iAP/3HAQI4Z5A3pX3I2YnVBDrS3 hOsPXNUNs2asDqoijkq4cxaqhTv1bio7CPLTg8uvkyWiCOS6pbKjtlE+A/VKGjKZ 7rH9GBNxlH7h/ZIRJTPfX38YiAWI//eIRY4JqUgKpmprE6Y7cGf5/uzmE0OwBwur HlKKkox6oH4WEk6rTIqP92xMhJNuTC2j1s7qQ2dCQKZdNAAYh++cHuiR1JtEjeQ8 O1/O4u6lumnqQMFtqhlt5++QxWvBU5IbdyJblBV+hCQekNSkj5fUIequBsjGrJru aZGxO828EEM7dS9/fFnT+YU25/rJ43RSs8aSBLqI/WWRALGQKU88POS5T7zfpzq/ 3qzSPWrOhgMFxl/APrGi13DdXTZ5J9UA0qypL8RiwdWj6WWJOo1OcRqzMGQhv1HS Fe22cWDDuXimQhUuyXM/XY234iPxFJkkq89ANHHfeCNFurzNV9WVN1mV2pfqwdX0 khh3DZyXRDa/UazLY0QyJHStyop76Ox8P8tCAvQbhZWr33Ns+uTr1YBHibimx3iG 6FOpH0FcpAE9oab9xUIdtMJCtx0YEWQ0ap/xMLlnmS8/bL7PX8HY0SIT2WwAiybg ibwen23Aah5LPpvd5BjGi1MAQEQwZvX8Ab7G+h1F4yzSfOchQt3eZN4fhwOkgjQA Bbb3bFUkIcXZ8BqabHA8 =ehNF -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/pmaydell/tags/pull-misc-20181214' into staging miscellaneous patches: * checkpatch.pl: Enforce multiline comment syntax * Rename cpu_physical_memory_write_rom() to address_space_write_rom() * disas, monitor, elf_ops: Use address_space_read() to read memory * Remove load_image() in favour of load_image_size() * Fix some minor memory leaks in arm boards/devices * virt: fix broken indentation # gpg: Signature made Fri 14 Dec 2018 14:41:20 GMT # gpg: using RSA key 3C2525ED14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" # gpg: aka "Peter Maydell <pmaydell@gmail.com>" # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * remotes/pmaydell/tags/pull-misc-20181214: (22 commits) virt: Fix broken indentation target/arm: Create timers in realize, not init tests/test-arm-mptimer: Don't leak string memory hw/sd/sdhci: Don't leak memory region in sdhci_sysbus_realize() hw/arm/mps2-tz.c: Free mscname string in make_dma() target/arm: Free name string in ARMCPRegInfo hashtable entries include/hw/loader.h: Document load_image_size() hw/core/loader.c: Remove load_image() device_tree.c: Don't use load_image() hw/block/tc58128.c: Don't use load_image() hw/i386/multiboot.c: Don't use load_image() hw/i386/pc.c: Don't use load_image() hw/pci/pci.c: Don't use load_image() hw/smbios/smbios.c: Don't use load_image() hw/ppc/ppc405_boards: Don't use load_image() hw/ppc/mac_newworld, mac_oldworld: Don't use load_image() elf_ops.h: Use address_space_write() to write memory monitor: Use address_space_read() to read memory disas.c: Use address_space_read() to read memory Rename cpu_physical_memory_write_rom() to address_space_write_rom() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
b019f5e537
27 changed files with 287 additions and 198 deletions
|
@ -1569,6 +1569,54 @@ sub process {
|
|||
# check we are in a valid C source file if not then ignore this hunk
|
||||
next if ($realfile !~ /\.(h|c|cpp)$/);
|
||||
|
||||
# Block comment styles
|
||||
|
||||
# Block comments use /* on a line of its own
|
||||
if ($rawline !~ m@^\+.*/\*.*\*/[ \t]*$@ && #inline /*...*/
|
||||
$rawline =~ m@^\+.*/\*\*?[ \t]*.+[ \t]*$@) { # /* or /** non-blank
|
||||
WARN("Block comments use a leading /* on a separate line\n" . $herecurr);
|
||||
}
|
||||
|
||||
# Block comments use * on subsequent lines
|
||||
if ($prevline =~ /$;[ \t]*$/ && #ends in comment
|
||||
$prevrawline =~ /^\+.*?\/\*/ && #starting /*
|
||||
$prevrawline !~ /\*\/[ \t]*$/ && #no trailing */
|
||||
$rawline =~ /^\+/ && #line is new
|
||||
$rawline !~ /^\+[ \t]*\*/) { #no leading *
|
||||
WARN("Block comments use * on subsequent lines\n" . $hereprev);
|
||||
}
|
||||
|
||||
# Block comments use */ on trailing lines
|
||||
if ($rawline !~ m@^\+[ \t]*\*/[ \t]*$@ && #trailing */
|
||||
$rawline !~ m@^\+.*/\*.*\*/[ \t]*$@ && #inline /*...*/
|
||||
$rawline !~ m@^\+.*\*{2,}/[ \t]*$@ && #trailing **/
|
||||
$rawline =~ m@^\+[ \t]*.+\*\/[ \t]*$@) { #non blank */
|
||||
WARN("Block comments use a trailing */ on a separate line\n" . $herecurr);
|
||||
}
|
||||
|
||||
# Block comment * alignment
|
||||
if ($prevline =~ /$;[ \t]*$/ && #ends in comment
|
||||
$line =~ /^\+[ \t]*$;/ && #leading comment
|
||||
$rawline =~ /^\+[ \t]*\*/ && #leading *
|
||||
(($prevrawline =~ /^\+.*?\/\*/ && #leading /*
|
||||
$prevrawline !~ /\*\/[ \t]*$/) || #no trailing */
|
||||
$prevrawline =~ /^\+[ \t]*\*/)) { #leading *
|
||||
my $oldindent;
|
||||
$prevrawline =~ m@^\+([ \t]*/?)\*@;
|
||||
if (defined($1)) {
|
||||
$oldindent = expand_tabs($1);
|
||||
} else {
|
||||
$prevrawline =~ m@^\+(.*/?)\*@;
|
||||
$oldindent = expand_tabs($1);
|
||||
}
|
||||
$rawline =~ m@^\+([ \t]*)\*@;
|
||||
my $newindent = $1;
|
||||
$newindent = expand_tabs($newindent);
|
||||
if (length($oldindent) ne length($newindent)) {
|
||||
WARN("Block comments should align the * on each line\n" . $hereprev);
|
||||
}
|
||||
}
|
||||
|
||||
# Check for potential 'bare' types
|
||||
my ($stat, $cond, $line_nr_next, $remain_next, $off_next,
|
||||
$realline_next);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue