qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: no-reply@patchew.org
To: ehabkost@redhat.com
Cc: pbonzini@redhat.com, berrange@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH v2 00/58] qom: Automated conversion of type checking boilerplate
Date: Wed, 19 Aug 2020 17:55:58 -0700 (PDT)	[thread overview]
Message-ID: <159788495729.1726.15010283605311630003@66eaa9a8a123> (raw)
In-Reply-To: <20200820001236.1284548-1-ehabkost@redhat.com>

Patchew URL: https://patchew.org/QEMU/20200820001236.1284548-1-ehabkost@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20200820001236.1284548-1-ehabkost@redhat.com
Subject: [PATCH v2 00/58] qom: Automated conversion of type checking boilerplate

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20200820001236.1284548-1-ehabkost@redhat.com -> patchew/20200820001236.1284548-1-ehabkost@redhat.com
Switched to a new branch 'test'
2c07647 crypto: use QOM macros for declaration/definition of TLS creds types
3e7aa6f crypto: use QOM macros for declaration/definition of secret types
5165b3c Use OBJECT_DECLARE_SIMPLE_TYPE when possible
d5cb09a Use OBJECT_DECLARE_TYPE where possible
e384d74 Use DECLARE_*CHECKER* when possible (--force mode)
e5fd745ed Use DECLARE_*CHECKER* macros
e72847b Move QOM typedefs and add missing includes
8633876 Use TYPE_INFO macro
ac2b53e Delete duplicate QOM typedefs
c514337 codeconverter: script for automating QOM code cleanups
98bc659 qom: TYPE_INFO macro
9fd130d qom: Make type checker functions accept const pointers
300bf50 qom: DECLARE_*_CHECKERS macros
996101e qom: Allow class type name to be specified in OBJECT_DECLARE*
4b52466 qom: provide convenient macros for declaring and defining types
7d4c50b qom: make object_ref/unref use a void * instead of Object *.
015012b vfio/pci: Move QOM macros to header
45826c3 kvm: Move QOM macros to kvm.h
09eddbf mptsas: Move QOM macros to header
a13d791 pxa2xx: Move QOM macros to header
12586d7 rocker: Move QOM macros to header
9d33500 auxbus: Move QOM macros to header
de4f45f piix: Move QOM macros to header
41a38b2 virtio-serial-bus: Move QOM macros to header
bfd8f57 vmbus: Move QOM macros to vmbus.h
98c8e55 pckbd: Move QOM macro to header
819bc97 ahci: Move QOM macro to header
d16f97d i8257: Move QOM macro to header
2d99e4e ahci: Move QOM macros to header
f01b1f4 vhost-user-gpu: Move QOM macro to header
d7f96b1 s390x: Move typedef SCLPEventFacility to event-facility.h
84e90b9 spapr: Move typedef SpaprMachineState to spapr.h
fbf8890 xen-legacy-backend: Add missing typedef XenLegacyDevice
1ecaa93 armsse: Rename QOM macros to avoid conflicts
201e419 platform-bus: Delete macros for non-existing typedef
db1c2f3 nubus: Delete unused NUBUS_BRIDGE macro
a25c30b can_emu: Delete macros for non-existing typedef
68aacc3 s390_flic: Move KVMS390FLICState typedef to header
53e7b5e mcf_fec: Move mcf_fec_state typedef to header
9984567 hvf: Move HVFState typedef to hvf.h
5fae80e i8254: Move PITCommonState/PITCommonClass typedefs to i8254.h
f77900a pci: Move PCIBusClass typedef to pci.h
60d3bdb throttle-groups: Move ThrottleGroup typedef to header
5c015d1 tulip: Move TulipState typedef to header
aa5fa56 hcd-dwc2: Rename USB_*CLASS macros for consistency
8963a12 hvf: Add missing include
acbd352 virtio-ccw: Fix definition of VIRTIO_CCW_BUS_GET_CLASS
5b73cbf versatile: Fix typo in PCI_VPB_HOST definition
deb8bfb aspeed_timer: Fix ASPEED_TIMER macro definition
e408ed4 sifive_u: Rename memmap enum constants
9faf429 sifive_e: Rename memmap enum constants
cf281bb opentitan: Rename memmap enum constants
9f27b92 aspeed_soc: Rename memmap/irqmap enum constants
1f3ef9c allwinner-h3: Rename memmap enum constants
76717ce pl110: Rename pl110_version enum values
8699bb0 vmw_pvscsi: Rename QOM class cast macros
e9add89 megasas: Rename QOM class cast macros
b1de232 e1000: Rename QOM class cast macros

=== OUTPUT BEGIN ===
1/58 Checking commit b1de2322cd1a (e1000: Rename QOM class cast macros)
2/58 Checking commit e9add89a2ce7 (megasas: Rename QOM class cast macros)
3/58 Checking commit 8699bb0e7a65 (vmw_pvscsi: Rename QOM class cast macros)
4/58 Checking commit 76717ce2750b (pl110: Rename pl110_version enum values)
5/58 Checking commit 1f3ef9ce5d89 (allwinner-h3: Rename memmap enum constants)
WARNING: line over 80 characters
#129: FILE: hw/arm/allwinner-h3.c:328:
+    memory_region_add_subregion(get_system_memory(), s->memmap[AW_H3_DEV_SRAM_A1],

WARNING: line over 80 characters
#132: FILE: hw/arm/allwinner-h3.c:330:
+    memory_region_add_subregion(get_system_memory(), s->memmap[AW_H3_DEV_SRAM_A2],

WARNING: line over 80 characters
#135: FILE: hw/arm/allwinner-h3.c:332:
+    memory_region_add_subregion(get_system_memory(), s->memmap[AW_H3_DEV_SRAM_C],

WARNING: line over 80 characters
#146: FILE: hw/arm/allwinner-h3.c:341:
+    sysbus_mmio_map(SYS_BUS_DEVICE(&s->sysctrl), 0, s->memmap[AW_H3_DEV_SYSCTRL]);

WARNING: line over 80 characters
#255: FILE: hw/arm/orangepi.c:82:
+    object_property_set_uint(OBJECT(h3), "ram-addr", h3->memmap[AW_H3_DEV_SDRAM],

WARNING: line over 80 characters
#264: FILE: hw/arm/orangepi.c:101:
+    memory_region_add_subregion(get_system_memory(), h3->memmap[AW_H3_DEV_SDRAM],

total: 0 errors, 6 warnings, 310 lines checked

Patch 5/58 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
6/58 Checking commit 9f27b92c2164 (aspeed_soc: Rename memmap/irqmap enum constants)
7/58 Checking commit cf281bb84815 (opentitan: Rename memmap enum constants)
WARNING: line over 80 characters
#153: FILE: hw/riscv/opentitan.c:174:
+        memmap[IBEX_DEV_ALERT_HANDLER].base, memmap[IBEX_DEV_ALERT_HANDLER].size);

total: 0 errors, 1 warnings, 184 lines checked

Patch 7/58 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/58 Checking commit 9faf4298b028 (sifive_e: Rename memmap enum constants)
WARNING: line over 80 characters
#84: FILE: hw/riscv/sifive_e.c:114:
+                          memmap[SIFIVE_E_DEV_MROM].base, &address_space_memory);

WARNING: line over 80 characters
#128: FILE: hw/riscv/sifive_e.c:227:
+    sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_E_DEV_GPIO0].base);

total: 0 errors, 2 warnings, 185 lines checked

Patch 8/58 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/58 Checking commit e408ed48993a (sifive_u: Rename memmap enum constants)
WARNING: line over 80 characters
#264: FILE: hw/riscv/sifive_u.c:494:
+                          memmap[SIFIVE_U_DEV_MROM].base, &address_space_memory);

WARNING: line over 80 characters
#327: FILE: hw/riscv/sifive_u.c:693:
+    sysbus_mmio_map(SYS_BUS_DEVICE(&s->prci), 0, memmap[SIFIVE_U_DEV_PRCI].base);

WARNING: line over 80 characters
#334: FILE: hw/riscv/sifive_u.c:699:
+    sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_U_DEV_GPIO].base);

total: 0 errors, 3 warnings, 360 lines checked

Patch 9/58 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
10/58 Checking commit deb8bfb7db85 (aspeed_timer: Fix ASPEED_TIMER macro definition)
11/58 Checking commit 5b73cbfd0fb1 (versatile: Fix typo in PCI_VPB_HOST definition)
12/58 Checking commit acbd35279499 (virtio-ccw: Fix definition of VIRTIO_CCW_BUS_GET_CLASS)
13/58 Checking commit 8963a12fbe7f (hvf: Add missing include)
14/58 Checking commit aa5fa56ffab7 (hcd-dwc2: Rename USB_*CLASS macros for consistency)
15/58 Checking commit 5c015d1dfbeb (tulip: Move TulipState typedef to header)
16/58 Checking commit 60d3bdb5e346 (throttle-groups: Move ThrottleGroup typedef to header)
17/58 Checking commit f77900a57adf (pci: Move PCIBusClass typedef to pci.h)
18/58 Checking commit 5fae80e51512 (i8254: Move PITCommonState/PITCommonClass typedefs to i8254.h)
19/58 Checking commit 99845678bd3e (hvf: Move HVFState typedef to hvf.h)
20/58 Checking commit 53e7b5e74b5e (mcf_fec: Move mcf_fec_state typedef to header)
21/58 Checking commit 68aacc315a0c (s390_flic: Move KVMS390FLICState typedef to header)
ERROR: missing space after struct definition
#24: FILE: hw/intc/s390_flic_kvm.c:32:
+struct KVMS390FLICState{

total: 1 errors, 0 warnings, 21 lines checked

Patch 21/58 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

22/58 Checking commit a25c30b2dfcb (can_emu: Delete macros for non-existing typedef)
23/58 Checking commit db1c2f3c0ebb (nubus: Delete unused NUBUS_BRIDGE macro)
24/58 Checking commit 201e41966645 (platform-bus: Delete macros for non-existing typedef)
25/58 Checking commit 1ecaa9333d10 (armsse: Rename QOM macros to avoid conflicts)
26/58 Checking commit fbf8890524f7 (xen-legacy-backend: Add missing typedef XenLegacyDevice)
27/58 Checking commit 84e90b9f700b (spapr: Move typedef SpaprMachineState to spapr.h)
WARNING: line over 80 characters
#56: FILE: include/hw/ppc/spapr_irq.h:75:
+void spapr_irq_cpu_intc_destroy(struct SpaprMachineState *spapr, PowerPCCPU *cpu);

WARNING: line over 80 characters
#64: FILE: include/hw/ppc/spapr_irq.h:81:
+int spapr_irq_msi_alloc(struct SpaprMachineState *spapr, uint32_t num, bool align,

WARNING: line over 80 characters
#83: FILE: include/hw/ppc/spapr_irq.h:96:
+int spapr_irq_claim(struct SpaprMachineState *spapr, int irq, bool lsi, Error **errp);

WARNING: line over 80 characters
#88: FILE: include/hw/ppc/spapr_irq.h:101:
+int spapr_irq_get_phandle(struct SpaprMachineState *spapr, void *fdt, Error **errp);

WARNING: line over 80 characters
#97: FILE: include/hw/ppc/spapr_irq.h:114:
+int spapr_irq_find(struct SpaprMachineState *spapr, int num, bool align, Error **errp);

total: 0 errors, 5 warnings, 81 lines checked

Patch 27/58 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
28/58 Checking commit d7f96b164446 (s390x: Move typedef SCLPEventFacility to event-facility.h)
29/58 Checking commit f01b1f4277c4 (vhost-user-gpu: Move QOM macro to header)
30/58 Checking commit 2d99e4e884b0 (ahci: Move QOM macros to header)
31/58 Checking commit d16f97d2373f (i8257: Move QOM macro to header)
32/58 Checking commit 819bc978d1d8 (ahci: Move QOM macro to header)
33/58 Checking commit 98c8e55d70aa (pckbd: Move QOM macro to header)
34/58 Checking commit bfd8f572b85c (vmbus: Move QOM macros to vmbus.h)
35/58 Checking commit 41a38b20573e (virtio-serial-bus: Move QOM macros to header)
36/58 Checking commit de4f45fed353 (piix: Move QOM macros to header)
37/58 Checking commit 9d3350066dda (auxbus: Move QOM macros to header)
38/58 Checking commit 12586d7b3ecb (rocker: Move QOM macros to header)
39/58 Checking commit a13d7913b137 (pxa2xx: Move QOM macros to header)
40/58 Checking commit 09eddbf3f57c (mptsas: Move QOM macros to header)
41/58 Checking commit 45826c3d3c84 (kvm: Move QOM macros to kvm.h)
42/58 Checking commit 015012b91abd (vfio/pci: Move QOM macros to header)
43/58 Checking commit 7d4c50b946aa (qom: make object_ref/unref use a void * instead of Object *.)
44/58 Checking commit 4b5246617293 (qom: provide convenient macros for declaring and defining types)
WARNING: line over 80 characters
#294: FILE: include/qom/object.h:619:
+ * @...: list of initializers for "InterfaceInfo" to declare implemented interfaces

WARNING: line over 80 characters
#362: FILE: include/qom/object.h:687:
+ * @...: list of initializers for "InterfaceInfo" to declare implemented interfaces

total: 0 errors, 2 warnings, 289 lines checked

Patch 44/58 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
45/58 Checking commit 996101e48f06 (qom: Allow class type name to be specified in OBJECT_DECLARE*)
WARNING: line over 80 characters
#36: FILE: include/qom/object.h:571:
+#define OBJECT_DECLARE_TYPE(InstanceType, ClassType, module_obj_name, MODULE_OBJ_NAME) \

ERROR: line over 90 characters
#85: FILE: include/qom/object.h:608:
+    OBJECT_DECLARE_TYPE(InstanceType, InstanceType##Class, module_obj_name, MODULE_OBJ_NAME) \

total: 1 errors, 1 warnings, 68 lines checked

Patch 45/58 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

46/58 Checking commit 300bf5058c37 (qom: DECLARE_*_CHECKERS macros)
47/58 Checking commit 9fd130dce632 (qom: Make type checker functions accept const pointers)
48/58 Checking commit 98bc6592ffaa (qom: TYPE_INFO macro)
49/58 Checking commit c514337834f2 (codeconverter: script for automating QOM code cleanups)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#21: 
new file mode 100644

ERROR: line over 90 characters
#29: FILE: scripts/codeconverter/codeconverter/patching.py:1:
+from typing import IO, Match, NamedTuple, Optional, Literal, Iterable, Type, Dict, List, Any, TypeVar, NewType, Tuple

WARNING: line over 80 characters
#97: FILE: scripts/codeconverter/codeconverter/patching.py:69:
+        logger.log(level, '%s:%d:%d: '+fmt, self.file.filename, pos.line, pos.col, *args)

ERROR: line over 90 characters
#162: FILE: scripts/codeconverter/codeconverter/patching.py:134:
+                                                    end.line, end.col, self.group(0)[:100])

WARNING: line over 80 characters
#165: FILE: scripts/codeconverter/codeconverter/patching.py:137:
+        """Can be implemented by subclasses to keep track of identifier references

WARNING: line over 80 characters
#167: FILE: scripts/codeconverter/codeconverter/patching.py:139:
+        This method will be used by the code that moves declarations around the file,

WARNING: line over 80 characters
#173: FILE: scripts/codeconverter/codeconverter/patching.py:145:
+        """Can be implemented by subclasses to keep track of identifier references

WARNING: line over 80 characters
#175: FILE: scripts/codeconverter/codeconverter/patching.py:147:
+        This method will be used by the code that moves declarations around the file,

ERROR: line over 90 characters
#220: FILE: scripts/codeconverter/codeconverter/patching.py:192:
+        DBG("Applying patch at position %d (%s) - %d (%s): %r", p.start, line_col(s, p.start), p.end, line_col(s, p.end), p.replacement)

ERROR: line over 90 characters
#222: FILE: scripts/codeconverter/codeconverter/patching.py:194:
+            raise OverLappingPatchesError("Overlapping patch at position %d (%s), last patch at %d (%s)" % \

WARNING: line over 80 characters
#233: FILE: scripts/codeconverter/codeconverter/patching.py:205:
+        self.match_name_index: Dict[Tuple[Type[Any], str, str], Optional[FileMatch]] = {}

WARNING: line over 80 characters
#243: FILE: scripts/codeconverter/codeconverter/patching.py:215:
+    def find_match(self, t: Type[T], name: str, group: str='name') -> Optional[T]:

ERROR: line over 90 characters
#263: FILE: scripts/codeconverter/codeconverter/patching.py:235:
+    def __init__(self, files: 'FileList', filename: os.PathLike, force:bool=False) -> None:

WARNING: line over 80 characters
#284: FILE: scripts/codeconverter/codeconverter/patching.py:256:
+        matches = [klass(self, m) for m in klass.find_matches(self.original_content)]

WARNING: line over 80 characters
#289: FILE: scripts/codeconverter/codeconverter/patching.py:261:
+    def find_match(self, t: Type[T], name: str, group: str='name') -> Optional[T]:

WARNING: line over 80 characters
#336: FILE: scripts/codeconverter/codeconverter/patching.py:308:
+    def patch_content(self, max_passes=0, class_names: Optional[List[str]]=None) -> None:

WARNING: line over 80 characters
#349: FILE: scripts/codeconverter/codeconverter/patching.py:321:
+            DBG("patch content: pass %d: %d patches generated", passes, len(self.patches))

ERROR: line over 90 characters
#357: FILE: scripts/codeconverter/codeconverter/patching.py:329:
+        INFO("%s: %d patches applied total in %d passes", self.filename, total_patches, passes)

WARNING: line over 80 characters
#360: FILE: scripts/codeconverter/codeconverter/patching.py:332:
+        """Replace self.original_content after applying patches from self.patches"""

ERROR: adding a line without newline at end of file
#409: FILE: scripts/codeconverter/codeconverter/patching.py:381:
+            return None

WARNING: line over 80 characters
#462: FILE: scripts/codeconverter/codeconverter/qom_macros.py:46:
+        """Check if identifiers match, return new identifier with complete list"""

WARNING: line over 80 characters
#578: FILE: scripts/codeconverter/codeconverter/qom_macros.py:162:
+        other_td = [td for td in chain(self.file.matches_of_type(SimpleTypedefMatch),

WARNING: line over 80 characters
#579: FILE: scripts/codeconverter/codeconverter/qom_macros.py:163:
+                                       self.file.matches_of_type(FullStructTypedefMatch))

WARNING: line over 80 characters
#592: FILE: scripts/codeconverter/codeconverter/qom_macros.py:176:
+                if self.group('typedef_type') == 'struct '+td.group('structname'):

ERROR: line over 90 characters
#598: FILE: scripts/codeconverter/codeconverter/qom_macros.py:182:
+        qom_macros = [TypeCheckMacro, DeclareInstanceChecker, DeclareClassCheckers, DeclareObjCheckers]

WARNING: line over 80 characters
#600: FILE: scripts/codeconverter/codeconverter/qom_macros.py:184:
+        in_use = any(RequiredIdentifier('type', self.name) in m.required_identifiers()

ERROR: line over 90 characters
#608: FILE: scripts/codeconverter/codeconverter/qom_macros.py:192:
+        qom_macros = [TypeCheckMacro, DeclareInstanceChecker, DeclareClassCheckers, DeclareObjCheckers]

WARNING: line over 80 characters
#610: FILE: scripts/codeconverter/codeconverter/qom_macros.py:194:
+        in_use = any(RequiredIdentifier('type', self.name) in m.required_identifiers()

WARNING: line over 80 characters
#629: FILE: scripts/codeconverter/codeconverter/qom_macros.py:213:
+CheckerMacroName = Literal['OBJECT_CHECK', 'OBJECT_CLASS_CHECK', 'OBJECT_GET_CLASS']

ERROR: line over 90 characters
#634: FILE: scripts/codeconverter/codeconverter/qom_macros.py:218:
+      M(r'\s*\(\s*', OR(NAMED('typedefname', RE_IDENTIFIER), RE_TYPE, name='c_type'), r'\s*,', CPP_SPACE,

WARNING: line over 80 characters
#685: FILE: scripts/codeconverter/codeconverter/qom_macros.py:269:
+    def merge_ids(self, matches: List['TypeCheckMacro']) -> Optional[TypeIdentifiers]:

WARNING: line over 80 characters
#686: FILE: scripts/codeconverter/codeconverter/qom_macros.py:270:
+        """Try to merge info about type identifiers from all matches in a list"""

WARNING: line over 80 characters
#743: FILE: scripts/codeconverter/codeconverter/qom_macros.py:327:
+            self.warn("couldn't extract type information from macro %s", self.name)

ERROR: line over 90 characters
#753: FILE: scripts/codeconverter/codeconverter/qom_macros.py:337:
+                    self.warn("macro %s is using macro %s instead of %s", self.name, self.checker, checker)

ERROR: line over 90 characters
#758: FILE: scripts/codeconverter/codeconverter/qom_macros.py:342:
+        DBG("found %d matching macros: %s", len(matches), ' '.join(m.name for m in matches))

WARNING: line over 80 characters
#761: FILE: scripts/codeconverter/codeconverter/qom_macros.py:345:
+            DBG("skipping %s (will patch when handling %s)", self.name, matches[0].name)

WARNING: line over 80 characters
#771: FILE: scripts/codeconverter/codeconverter/qom_macros.py:355:
+            self.warn("macro %s doesn't follow the expected name pattern", self.name)

WARNING: line over 80 characters
#782: FILE: scripts/codeconverter/codeconverter/qom_macros.py:366:
+        names = [n for n in (ids.instancetype, ids.classtype, ids.uppercase, ids.typename)

WARNING: line over 80 characters
#792: FILE: scripts/codeconverter/codeconverter/qom_macros.py:376:
+            new_decl = (f'DECLARE_OBJ_CHECKERS({ids.instancetype}, {ids.classtype},\n'

WARNING: line over 80 characters
#793: FILE: scripts/codeconverter/codeconverter/qom_macros.py:377:
+                        f'                     {ids.uppercase}, {ids.typename})\n')

WARNING: line over 80 characters
#795: FILE: scripts/codeconverter/codeconverter/qom_macros.py:379:
+            new_decl = (f'DECLARE_CLASS_CHECKERS({ids.classtype}, {ids.uppercase},\n'

WARNING: line over 80 characters
#798: FILE: scripts/codeconverter/codeconverter/qom_macros.py:382:
+            new_decl = (f'DECLARE_INSTANCE_CHECKER({ids.instancetype}, {ids.uppercase},\n'

ERROR: line over 90 characters
#823: FILE: scripts/codeconverter/codeconverter/qom_macros.py:407:
+                issues.append("typedef %s need to be moved earlier in the file" % (td.name))

ERROR: line over 90 characters
#900: FILE: scripts/codeconverter/codeconverter/qom_macros.py:484:
+            self.warn("type %s mismatch with uppercase name %s", ids.typename, ids.uppercase)

WARNING: line over 80 characters
#913: FILE: scripts/codeconverter/codeconverter/qom_macros.py:497:
+            #TODO: check if the only match is inside the "struct { ... }" declaration

ERROR: line over 90 characters
#914: FILE: scripts/codeconverter/codeconverter/qom_macros.py:498:
+            if re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):

WARNING: line over 80 characters
#915: FILE: scripts/codeconverter/codeconverter/qom_macros.py:499:
+                self.warn("typedef %s can't be moved, it is used before the macro", t)

ERROR: line over 90 characters
#930: FILE: scripts/codeconverter/codeconverter/qom_macros.py:514:
+               r'\s*{\s*', NAMED('parent_struct', RE_IDENTIFIER), r'\s*parent(_class)?\s*;\s*};\n')

WARNING: line over 80 characters
#945: FILE: scripts/codeconverter/codeconverter/qom_macros.py:529:
+        trivial_struct = self.file.find_match(TrivialClassStruct, self.group('classtype'))

WARNING: line over 80 characters
#951: FILE: scripts/codeconverter/codeconverter/qom_macros.py:535:
+                 "                           %(uppercase)s, %(parent_struct)s)\n" % d)

ERROR: line over 90 characters
#983: FILE: scripts/codeconverter/codeconverter/qom_macros.py:567:
+        definition_classes = [SimpleTypedefMatch, FullStructTypedefMatch, ConstantDefine, Include]

ERROR: line over 90 characters
#984: FILE: scripts/codeconverter/codeconverter/qom_macros.py:568:
+        user_classes = [TypeCheckMacro, DeclareObjCheckers, DeclareInstanceChecker, DeclareClassCheckers]

WARNING: line over 80 characters
#992: FILE: scripts/codeconverter/codeconverter/qom_macros.py:576:
+                    index.setdefault(i, SymbolUserList([], [])).definitions.append(d)

WARNING: line over 80 characters
#1012: FILE: scripts/codeconverter/codeconverter/qom_macros.py:596:
+                    u.warn("definition of %s %s not found in file", i.type, i.name)

ERROR: line over 90 characters
#1042: FILE: scripts/codeconverter/codeconverter/qom_macros.py:626:
+                definition.warn("definition of %s %s needs to be moved earlier in the file", i.type, i.name)

WARNING: line over 80 characters
#1043: FILE: scripts/codeconverter/codeconverter/qom_macros.py:627:
+                earliest.warn("definition of %s %s is used here", i.type, i.name)

WARNING: line over 80 characters
#1063: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:13:
+RE_ARRAY_ITEM = S(r'{\s*', NAMED('arrayitem', M(RE_SIMPLE_VALUE, n='?')), r'\s*}\s*,?')

ERROR: line over 90 characters
#1088: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:38:
+RE_TYPEINFO_START = S(r'^[ \t]*', M(r'(static|const)\s+', name='modifiers'), r'TypeInfo\s+',

ERROR: line over 90 characters
#1105: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:55:
+    return [m.group('arrayitem') for m in re.finditer(RE_ARRAY_ITEM, m.group('arrayitems'))]

ERROR: line over 90 characters
#1160: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:110:
+        if typename and re.fullmatch(RE_IDENTIFIER, typename) and typename.startswith("TYPE_"):

WARNING: line over 80 characters
#1242: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:192:
+                yield self.append_field('instance_finalize', ids.lowercase+'_finalize')

ERROR: line over 90 characters
#1246: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:196:
+                yield self.prepend(('static void %s_class_init(ObjectClass *oc, void *data)\n'

WARNING: line over 80 characters
#1249: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:199:
+                yield self.append_field('class_init', ids.lowercase+'_class_init')

WARNING: line over 80 characters
#1255: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:205:
+    regexp = S(r'^[ \t]*type_init\(\s*', NAMED('name', RE_IDENTIFIER), r'\s*\);?[ \t]*\n')

WARNING: line over 80 characters
#1268: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:218:
+    #      of the function.  Tt will just look for "}" in the beginning of a line

WARNING: line over 80 characters
#1269: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:219:
+    regexp = S(r'static\s+void\s+', NAMED('name', RE_IDENTIFIER), r'\s*\(\s*void\s*\)\n',

ERROR: line over 90 characters
#1287: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:237:
+    regexp = S(r'^[ \t]*type_register_static\(&\s*', NAMED('name', RE_IDENTIFIER), r'\s*\);[ \t]*\n')

ERROR: line over 90 characters
#1299: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:249:
+            self.warn("can't find function where type_register_static(&%s) is called", self.name)

ERROR: line over 90 characters
#1327: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:277:
+    regexp = S(r'^[ \t]*TYPE_INFO\s*\(\s*', NAMED('name', RE_IDENTIFIER), r'\s*\)[ \t]*;?[ \t]*\n')

WARNING: line over 80 characters
#1385: FILE: scripts/codeconverter/codeconverter/regexps.py:15:
+    """Just add parenthesis around regexp(s), with optional name or repeat suffix"""

ERROR: line over 90 characters
#1455: FILE: scripts/codeconverter/codeconverter/regexps.py:85:
+RE_INCLUDE = S(r'^[ \t]*#[ \t]*include[ \t]+', NAMED('includepath', RE_INCLUDEPATH), r'[ \t]*\n')

WARNING: line over 80 characters
#1654: FILE: scripts/codeconverter/codeconverter/test_regexps.py:85:
+    assert fullmatch(RE_TI_FIELDS, r'''/* could be TYPE_SYS_BUS_DEVICE (or LPC etc) */

ERROR: line over 90 characters
#1794: FILE: scripts/codeconverter/codeconverter/test_regexps.py:225:
+    print(repr(list(m.groupdict() for m in re.finditer(InitialIncludes.regexp, c, re.MULTILINE))))

ERROR: line over 90 characters
#1809: FILE: scripts/codeconverter/codeconverter/test_regexps.py:240:
+    print(repr(list(m.groupdict() for m in re.finditer(InitialIncludes.regexp, c, re.MULTILINE))))

ERROR: line over 90 characters
#1836: FILE: scripts/codeconverter/codeconverter/test_regexps.py:267:
+    print(repr(list(m.groupdict() for m in re.finditer(InitialIncludes.regexp, c, re.MULTILINE))))

ERROR: adding a line without newline at end of file
#1912: FILE: scripts/codeconverter/codeconverter/utils.py:65:
+__all__ = ['not_optional', 'opt_compare', 'merge', 'line_col', 'LineAndColumn']

WARNING: line over 80 characters
#1938: FILE: scripts/codeconverter/converter.py:19:
+def process_all_files(parser: argparse.ArgumentParser, args: argparse.Namespace) -> None:

WARNING: line over 80 characters
#1999: FILE: scripts/codeconverter/converter.py:80:
+    p = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter)

ERROR: adding a line without newline at end of file
#2032: FILE: scripts/codeconverter/converter.py:113:
+    main()

total: 32 errors, 47 warnings, 1960 lines checked

Patch 49/58 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

50/58 Checking commit ac2b53ebd0e7 (Delete duplicate QOM typedefs)
51/58 Checking commit 8633876e45a9 (Use TYPE_INFO macro)
52/58 Checking commit e72847b49ba0 (Move QOM typedefs and add missing includes)
53/58 Checking commit e5fd745edabc (Use DECLARE_*CHECKER* macros)
WARNING: line over 80 characters
#55: FILE: backends/cryptodev-vhost-user.c:43:
+DECLARE_INSTANCE_CHECKER(CryptoDevBackendVhostUser, CRYPTODEV_BACKEND_VHOST_USER,

WARNING: line over 80 characters
#4087: FILE: hw/net/xilinx_axienet.c:54:
+DECLARE_INSTANCE_CHECKER(XilinxAXIEnetStreamSlave, XILINX_AXI_ENET_CONTROL_STREAM,

total: 0 errors, 2 warnings, 10350 lines checked

Patch 53/58 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
54/58 Checking commit e384d741ef66 (Use DECLARE_*CHECKER* when possible (--force mode))
55/58 Checking commit d5cb09a0a490 (Use OBJECT_DECLARE_TYPE where possible)
56/58 Checking commit 5165b3c3e93e (Use OBJECT_DECLARE_SIMPLE_TYPE when possible)
57/58 Checking commit 3e7aa6f9a978 (crypto: use QOM macros for declaration/definition of secret types)
WARNING: line over 80 characters
#128: FILE: crypto/secret_keyring.c:30:
+                                   QCRYPTO_SECRET_KEYRING, QCRYPTO_SECRET_COMMON,

total: 0 errors, 1 warnings, 138 lines checked

Patch 57/58 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
58/58 Checking commit 2c0764742a0b (crypto: use QOM macros for declaration/definition of TLS creds types)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200820001236.1284548-1-ehabkost@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

  parent reply	other threads:[~2020-08-20  0:57 UTC|newest]

Thread overview: 112+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20  0:11 [PATCH v2 00/58] qom: Automated conversion of type checking boilerplate Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 01/58] e1000: Rename QOM class cast macros Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 02/58] megasas: " Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 03/58] vmw_pvscsi: " Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 04/58] pl110: Rename pl110_version enum values Eduardo Habkost
2020-08-20 13:11   ` Philippe Mathieu-Daudé
2020-08-25 11:05   ` Daniel P. Berrangé
2020-08-20  0:11 ` [PATCH v2 05/58] allwinner-h3: Rename memmap enum constants Eduardo Habkost
2020-08-21 19:42   ` Niek Linnenbank
2020-08-25 11:07   ` Daniel P. Berrangé
2020-08-20  0:11 ` [PATCH v2 06/58] aspeed_soc: Rename memmap/irqmap " Eduardo Habkost
2020-08-20  6:41   ` Cédric Le Goater
2020-08-25 11:08   ` Daniel P. Berrangé
2020-08-20  0:11 ` [PATCH v2 07/58] opentitan: Rename memmap " Eduardo Habkost
2020-08-25 11:09   ` Daniel P. Berrangé
2020-08-20  0:11 ` [PATCH v2 08/58] sifive_e: " Eduardo Habkost
2020-08-25 11:10   ` Daniel P. Berrangé
2020-08-20  0:11 ` [PATCH v2 09/58] sifive_u: " Eduardo Habkost
2020-08-25 11:10   ` Daniel P. Berrangé
2020-08-20  0:11 ` [PATCH v2 10/58] aspeed_timer: Fix ASPEED_TIMER macro definition Eduardo Habkost
2020-08-20  6:42   ` Cédric Le Goater
2020-08-20  0:11 ` [PATCH v2 11/58] versatile: Fix typo in PCI_VPB_HOST definition Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 12/58] virtio-ccw: Fix definition of VIRTIO_CCW_BUS_GET_CLASS Eduardo Habkost
2020-08-21 18:19   ` David Hildenbrand
2020-08-20  0:11 ` [PATCH v2 13/58] hvf: Add missing include Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 14/58] hcd-dwc2: Rename USB_*CLASS macros for consistency Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 15/58] tulip: Move TulipState typedef to header Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 16/58] throttle-groups: Move ThrottleGroup " Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 17/58] pci: Move PCIBusClass typedef to pci.h Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 18/58] i8254: Move PITCommonState/PITCommonClass typedefs to i8254.h Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 19/58] hvf: Move HVFState typedef to hvf.h Eduardo Habkost
2020-08-21 11:17   ` Roman Bolshakov
2020-08-21 11:23   ` Roman Bolshakov
2020-08-25 11:35     ` Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 20/58] mcf_fec: Move mcf_fec_state typedef to header Eduardo Habkost
2020-08-27  8:09   ` Thomas Huth
2020-08-20  0:11 ` [PATCH v2 21/58] s390_flic: Move KVMS390FLICState " Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 22/58] can_emu: Delete macros for non-existing typedef Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 23/58] nubus: Delete unused NUBUS_BRIDGE macro Eduardo Habkost
2020-08-20 15:05   ` Laurent Vivier
2020-08-20  0:12 ` [PATCH v2 24/58] platform-bus: Delete macros for non-existing typedef Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 25/58] armsse: Rename QOM macros to avoid conflicts Eduardo Habkost
2020-08-25 11:12   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 26/58] xen-legacy-backend: Add missing typedef XenLegacyDevice Eduardo Habkost
2020-08-20 15:34   ` Anthony PERARD via
2020-08-25 11:12   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 27/58] spapr: Move typedef SpaprMachineState to spapr.h Eduardo Habkost
2020-08-25 11:13   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 28/58] s390x: Move typedef SCLPEventFacility to event-facility.h Eduardo Habkost
2020-08-20  7:03   ` Cornelia Huck
2020-08-25 11:13   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 29/58] vhost-user-gpu: Move QOM macro to header Eduardo Habkost
2020-08-20  5:39   ` Gerd Hoffmann
2020-08-25 11:15   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 30/58] ahci: Move QOM macros " Eduardo Habkost
2020-08-25 11:15   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 31/58] i8257: Move QOM macro " Eduardo Habkost
2020-08-25 11:16   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 32/58] ahci: " Eduardo Habkost
2020-08-25 11:16   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 33/58] pckbd: " Eduardo Habkost
2020-08-25 11:16   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 34/58] vmbus: Move QOM macros to vmbus.h Eduardo Habkost
2020-08-25 11:17   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 35/58] virtio-serial-bus: Move QOM macros to header Eduardo Habkost
2020-08-25 11:17   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 36/58] piix: " Eduardo Habkost
2020-08-20 13:13   ` Philippe Mathieu-Daudé
2020-08-25 11:18   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 37/58] auxbus: " Eduardo Habkost
2020-08-25 11:18   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 38/58] rocker: " Eduardo Habkost
2020-08-25 11:19   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 39/58] pxa2xx: " Eduardo Habkost
2020-08-25 11:19   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 40/58] mptsas: " Eduardo Habkost
2020-08-25 11:20   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 41/58] kvm: Move QOM macros to kvm.h Eduardo Habkost
2020-08-25 11:20   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 42/58] vfio/pci: Move QOM macros to header Eduardo Habkost
2020-08-20 13:14   ` Philippe Mathieu-Daudé
2020-08-20 13:14   ` Philippe Mathieu-Daudé
2020-08-25 11:20   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 43/58] qom: make object_ref/unref use a void * instead of Object * Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 44/58] qom: provide convenient macros for declaring and defining types Eduardo Habkost
2020-08-20 17:45   ` Eduardo Habkost
2020-08-20 17:57     ` Daniel P. Berrangé
2020-08-20 18:48       ` Eduardo Habkost
2020-08-20 18:40     ` Laurent Vivier
2020-08-20  0:12 ` [PATCH v2 45/58] qom: Allow class type name to be specified in OBJECT_DECLARE* Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 46/58] qom: DECLARE_*_CHECKERS macros Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 47/58] qom: Make type checker functions accept const pointers Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 48/58] qom: TYPE_INFO macro Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 49/58] codeconverter: script for automating QOM code cleanups Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 50/58] [automated] Delete duplicate QOM typedefs Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 51/58] [automated] Use TYPE_INFO macro Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 52/58] [automated] Move QOM typedefs and add missing includes Eduardo Habkost
2020-08-25 11:26   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 53/58] [automated] Use DECLARE_*CHECKER* macros Eduardo Habkost
2020-08-25 11:35   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 54/58] [semi-automated] Use DECLARE_*CHECKER* when possible (--force mode) Eduardo Habkost
2020-08-25 11:43   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 55/58] [automated] Use OBJECT_DECLARE_TYPE where possible Eduardo Habkost
2020-08-25 11:47   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 56/58] [automated] Use OBJECT_DECLARE_SIMPLE_TYPE when possible Eduardo Habkost
2020-08-25 11:49   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 57/58] crypto: use QOM macros for declaration/definition of secret types Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 58/58] crypto: use QOM macros for declaration/definition of TLS creds types Eduardo Habkost
2020-08-20  0:18 ` [PATCH v2 00/58] qom: Automated conversion of type checking boilerplate Eduardo Habkost
2020-08-20  0:55 ` no-reply [this message]
2020-08-20  1:00 ` no-reply
2020-08-20  1:09 ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=159788495729.1726.15010283605311630003@66eaa9a8a123 \
    --to=no-reply@patchew.org \
    --cc=berrange@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).