Patchew URL: https://patchew.org/QEMU/20200918204714.27276-1-ehabk...@redhat.com/
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200918204714.27276-1-ehabk...@redhat.com Subject: [PULL 00/17] QOM queue, 2020-09-18 === 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 === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 Switched to a new branch 'test' 74e8c80 Use OBJECT_DECLARE_SIMPLE_TYPE when possible 15a16fe Use OBJECT_DECLARE_TYPE when possible 145c405 qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 580edfa qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE 7edd65a scripts/codeconverter: Update to latest version 668fa4d target/s390x: Set instance_align on S390CPU TypeInfo 200d65f target/riscv: Set instance_align on RISCVCPU TypeInfo 0dc3472 target/ppc: Set instance_align on PowerPCCPU TypeInfo 9b1a0bc target/arm: Set instance_align on CPUARM TypeInfo 121003c qom: Allow objects to be allocated with increased alignment 1967925 qom: Correct error values in two contracts 862522d qom: Clean up object_property_get_enum()'s error value 5363814 qom: Correct object_class_dynamic_cast_assert() documentation c3cbbe1 sifive: Use DECLARE_*CHECKER* macros bb31b29 sifive: Move QOM typedefs and add missing includes 1bfe9f9 sifive_u: Rename memmap enum constants 20307d4 sifive_e: Rename memmap enum constants === OUTPUT BEGIN === 1/17 Checking commit 20307d4c2db9 (sifive_e: Rename memmap enum constants) WARNING: line over 80 characters #86: FILE: hw/riscv/sifive_e.c:114: + memmap[SIFIVE_E_DEV_MROM].base, &address_space_memory); WARNING: line over 80 characters #131: FILE: hw/riscv/sifive_e.c:229: + sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_E_DEV_GPIO0].base); total: 0 errors, 2 warnings, 186 lines checked Patch 1/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 2/17 Checking commit 1bfe9f9eccb5 (sifive_u: Rename memmap enum constants) WARNING: line over 80 characters #303: FILE: hw/riscv/sifive_u.c:531: + memmap[SIFIVE_U_DEV_MROM].base, &address_space_memory); WARNING: line over 80 characters #367: FILE: hw/riscv/sifive_u.c:734: + sysbus_mmio_map(SYS_BUS_DEVICE(&s->prci), 0, memmap[SIFIVE_U_DEV_PRCI].base); WARNING: line over 80 characters #374: FILE: hw/riscv/sifive_u.c:740: + sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_U_DEV_GPIO].base); total: 0 errors, 3 warnings, 412 lines checked Patch 2/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 3/17 Checking commit bb31b295487b (sifive: Move QOM typedefs and add missing includes) 4/17 Checking commit c3cbbe15fbe1 (sifive: Use DECLARE_*CHECKER* macros) 5/17 Checking commit 5363814b4203 (qom: Correct object_class_dynamic_cast_assert() documentation) 6/17 Checking commit 862522d76ecb (qom: Clean up object_property_get_enum()'s error value) 7/17 Checking commit 1967925fb215 (qom: Correct error values in two contracts) 8/17 Checking commit 121003cf6782 (qom: Allow objects to be allocated with increased alignment) WARNING: architecture specific defines should be avoided #74: FILE: qom/object.c:694: +#if __STDC_VERSION__ >= 201112L total: 0 errors, 1 warnings, 84 lines checked Patch 8/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 9/17 Checking commit 9b1a0bce035d (target/arm: Set instance_align on CPUARM TypeInfo) 10/17 Checking commit 0dc3472929b0 (target/ppc: Set instance_align on PowerPCCPU TypeInfo) 11/17 Checking commit 200d65fb6653 (target/riscv: Set instance_align on RISCVCPU TypeInfo) 12/17 Checking commit 668fa4dcfc21 (target/s390x: Set instance_align on S390CPU TypeInfo) 13/17 Checking commit 7edd65a82b36 (scripts/codeconverter: Update to latest version) ERROR: line over 90 characters #26: FILE: scripts/codeconverter/codeconverter/patching.py:8: +from typing import IO, Match, NamedTuple, Optional, Literal, Iterable, Type, Dict, List, Any, TypeVar, NewType, Tuple, Union ERROR: line over 90 characters #78: FILE: scripts/codeconverter/codeconverter/patching.py:184: + def group_finditer(self, klass: Type['FileMatch'], group: Union[str, int]) -> Iterable['FileMatch']: ERROR: line over 90 characters #85: FILE: scripts/codeconverter/codeconverter/patching.py:191: + def try_group_match(self, klass: Type['FileMatch'], group: Union[str, int]) -> Optional['FileMatch']: WARNING: line over 80 characters #161: FILE: scripts/codeconverter/codeconverter/patching.py:289: + def find_match(self, t: Type[T], name: str, group: str='name') -> Optional[T]: WARNING: line over 80 characters #194: FILE: scripts/codeconverter/codeconverter/patching.py:331: + matches = [klass(self, m) for m in klass.finditer(self.original_content)] ERROR: line over 90 characters #221: FILE: scripts/codeconverter/codeconverter/patching.py:370: + def scan_for_matches(self, class_names: Optional[List[str]]=None) -> Iterable[FileMatch]: WARNING: line over 80 characters #337: FILE: scripts/codeconverter/codeconverter/qom_macros.py:28: + regexp = S(r'^[ \t]*#[ \t]*define', CPP_SPACE, NAMED('name', RE_IDENTIFIER), r'\b') ERROR: line over 90 characters #394: FILE: scripts/codeconverter/codeconverter/qom_macros.py:444: + r'\s*\(\s*', OR(NAMED('instancetype', RE_IDENTIFIER), RE_TYPE, name='c_type'), ERROR: line over 90 characters #457: FILE: scripts/codeconverter/codeconverter/qom_macros.py:513: + OR(RE_IDENTIFIER, RE_STRING, RE_MACRO_CONCAT, RE_FUN_CALL, name='typename'), SP, WARNING: line over 80 characters #521: FILE: scripts/codeconverter/codeconverter/qom_macros.py:575: + """Common base class for code that will look at a set of type declarations""" ERROR: line over 90 characters #531: FILE: scripts/codeconverter/codeconverter/qom_macros.py:583: + decl_types: List[Type[TypeDeclaration]] = [DeclareInstanceChecker, DeclareInstanceType, WARNING: line over 80 characters #532: FILE: scripts/codeconverter/codeconverter/qom_macros.py:584: + DeclareClassCheckers, DeclareClassType, WARNING: line over 80 characters #550: FILE: scripts/codeconverter/codeconverter/qom_macros.py:602: + field_dict = dict((f, v.pop() if v else None) for f,v in fvalues.items()) WARNING: line over 80 characters #551: FILE: scripts/codeconverter/codeconverter/qom_macros.py:603: + yield from self.gen_patches_for_type(uppercase, checkers, field_dict) WARNING: line over 80 characters #553: FILE: scripts/codeconverter/codeconverter/qom_macros.py:605: + def find_conflicts(self, uppercase: str, checkers: List[TypeDeclaration]) -> bool: WARNING: line over 80 characters #554: FILE: scripts/codeconverter/codeconverter/qom_macros.py:606: + """Look for conflicting declarations that would make it unsafe to add new ones""" WARNING: line over 80 characters #557: FILE: scripts/codeconverter/codeconverter/qom_macros.py:609: + conflicting.extend(chain(self.file.find_matches(DefineDirective, uppercase), ERROR: line over 90 characters #558: FILE: scripts/codeconverter/codeconverter/qom_macros.py:610: + self.file.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'), ERROR: line over 90 characters #559: FILE: scripts/codeconverter/codeconverter/qom_macros.py:611: + self.file.find_matches(DeclareClassType, uppercase, 'uppercase'), ERROR: line over 90 characters #560: FILE: scripts/codeconverter/codeconverter/qom_macros.py:612: + self.file.find_matches(DeclareInstanceType, uppercase, 'uppercase'))) ERROR: line over 90 characters #563: FILE: scripts/codeconverter/codeconverter/qom_macros.py:615: + conflicting.extend(o for o in chain(self.allfiles.find_matches(DeclareInstanceChecker, uppercase, 'uppercase'), ERROR: line over 90 characters #564: FILE: scripts/codeconverter/codeconverter/qom_macros.py:616: + self.allfiles.find_matches(DeclareClassCheckers, uppercase, 'uppercase'), ERROR: line over 90 characters #565: FILE: scripts/codeconverter/codeconverter/qom_macros.py:617: + self.allfiles.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'), ERROR: line over 90 characters #566: FILE: scripts/codeconverter/codeconverter/qom_macros.py:618: + self.allfiles.find_matches(DefineDirective, uppercase)) WARNING: line over 80 characters #568: FILE: scripts/codeconverter/codeconverter/qom_macros.py:620: + # if both are .c files, there's no conflict at all: WARNING: line over 80 characters #585: FILE: scripts/codeconverter/codeconverter/qom_macros.py:637: + fields: Dict[str, Optional[str]]) -> Iterable[Patch]: WARNING: line over 80 characters #595: FILE: scripts/codeconverter/codeconverter/qom_macros.py:647: + fields: Dict[str, Optional[str]]) -> Iterable[Patch]: WARNING: line over 80 characters #625: FILE: scripts/codeconverter/codeconverter/qom_macros.py:655: + yield first_checker.prepend(f'DECLARE_INSTANCE_TYPE({uppercase}, void)\n') WARNING: line over 80 characters #627: FILE: scripts/codeconverter/codeconverter/qom_macros.py:657: + yield first_checker.prepend(f'DECLARE_CLASS_TYPE({uppercase}, void)\n') ERROR: line over 90 characters #634: FILE: scripts/codeconverter/codeconverter/qom_macros.py:664: + #s = (f"DECLARE_OBJ_CHECKERS({final_values['instancetype']}, {final_values['classtype']},\n"+ ERROR: line over 90 characters #635: FILE: scripts/codeconverter/codeconverter/qom_macros.py:665: + # f" {final_values['uppercase']}, {final_values['typename']})\n") WARNING: line over 80 characters #645: FILE: scripts/codeconverter/codeconverter/qom_macros.py:675: + fields: Dict[str, Optional[str]]) -> Iterable[Patch]: ERROR: line over 90 characters #719: FILE: scripts/codeconverter/codeconverter/qom_macros.py:754: +def find_type_checkers(files:FileList, name:str, group:str='uppercase') -> Iterable[TypeCheckerDeclaration]: ERROR: line over 90 characters #722: FILE: scripts/codeconverter/codeconverter/qom_macros.py:757: + for c in (DeclareInstanceChecker, DeclareClassCheckers, DeclareObjCheckers, ObjectDeclareType, ObjectDeclareSimpleType): ERROR: line over 90 characters #738: FILE: scripts/codeconverter/codeconverter/qom_macros.py:794: + user_classes = [TypeCheckMacro, DeclareObjCheckers, DeclareInstanceChecker, DeclareClassCheckers, InterfaceCheckMacro] ERROR: line over 90 characters #796: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:43: + return [m.group('arrayitem') for m in self.group_finditer(ArrayItem, 'arrayitems')] WARNING: line over 80 characters #820: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:66: + Common base class for type definitions (TypeInfo variables or OBJECT_DEFINE* macros) WARNING: line over 80 characters #987: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:245: + self.warn("%s class size type (%s) is not *Class?", self.name, classtype) ERROR: line over 90 characters #992: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:250: + self.debug("searching for simpletype declaration using %s as InstanceType", instancetype) ERROR: line over 90 characters #1005: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:263: + c = (f'OBJECT_DECLARE_SIMPLE_TYPE({self.group("instancetype")}, {self.group("lowercase")},\n' WARNING: line over 80 characters #1012: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:270: + # this will just ensure the caches for find_match() and matches_for_type() ERROR: line over 90 characters #1047: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:321: + # self.warn("macro/constant type name is required for instance/class type") WARNING: line over 80 characters #1066: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:333: + self.warn("This will make type validation difficult in the future") WARNING: line over 80 characters #1069: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:336: + parent_uppercase = find_typename_uppercase(self.allfiles, parent_typename) ERROR: line over 90 characters #1071: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:338: + self.info("Can't find right uppercase name for parent type (%s)", parent_typename) ERROR: line over 90 characters #1073: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:340: + self.warn("Can't find right uppercase name for parent type (%s)", parent_typename) WARNING: line over 80 characters #1074: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:341: + self.warn("This will make type validation difficult in the future") ERROR: line over 90 characters #1096: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:346: + #checkers: List[TypeCheckerDeclaration] = list(find_type_checkers(self.allfiles, uppercase)) ERROR: line over 90 characters #1098: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:348: + # c.info("instance type checker declaration (%s) is here", c.group('uppercase')) ERROR: line over 90 characters #1102: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:352: + # self.warn("Can't find where type checkers for %s (%s) are declared. We will need them to validate sizes of %s", ERROR: line over 90 characters #1123: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:371: + # self.warn("type at instance_size is %r. Should instance_size be set to sizeof(%s) ?", ERROR: line over 90 characters #1128: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:376: + # self.warn("instance type checker for %s (%s) not found", typename, instancetype) ERROR: line over 90 characters #1142: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:390: + # self.warn("type at class_size is %r. Should class_size be set to sizeof(%s) ?", ERROR: line over 90 characters #1147: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:395: + # self.warn("class type checker for %s (%s) not found", typename, classtype) WARNING: line over 80 characters #1170: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:416: + newbegin += f' {instancetype}, {classtype},\n' WARNING: line over 80 characters #1171: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:417: + newbegin += f' {uppercase}, {parent_uppercase}' WARNING: line over 80 characters #1204: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:450: +def find_type_definitions(files: FileList, uppercase: str) -> Iterable[TypeDefinition]: ERROR: line over 90 characters #1205: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:451: + types: List[Type[TypeDefinition]] = [TypeInfoVar, ObjectDefineType, ObjectDefineTypeExtended] WARNING: line over 80 characters #1217: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:463: + fields: Dict[str, Optional[str]]) -> Iterable[Patch]: WARNING: line over 80 characters #1265: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:511: + instance_checkers = [c for c in find_type_checkers(self.allfiles, uppercase) WARNING: line over 80 characters #1297: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:543: + self.warn("typedef mismatch: %s is defined as %s", t, td_type) ERROR: line over 90 characters #1302: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:548: + other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype') ERROR: line over 90 characters #1311: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:557: + decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers] WARNING: line over 80 characters #1313: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:559: + for m in self.allfiles.find_matches(t, uppercase, 'uppercase')] ERROR: line over 90 characters #1329: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:575: + self.warn("mismatching instance type for %s (%s)", uppercase, instancetype) WARNING: line over 80 characters #1334: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:580: + self.warn("mismatching class type for %s (%s)", uppercase, classtype) ERROR: line over 90 characters #1351: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:597: + elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]): WARNING: line over 80 characters #1377: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:623: + self.warn("typedef mismatch: %s is defined as %s", t, td_type) ERROR: line over 90 characters #1382: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:628: + other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype') ERROR: line over 90 characters #1391: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:637: + decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers] WARNING: line over 80 characters #1393: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:639: + for m in self.allfiles.find_matches(t, uppercase, 'uppercase')] ERROR: line over 90 characters #1414: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:660: + self.warn("mismatching instance type for %s (%s)", uppercase, instancetype) ERROR: line over 90 characters #1436: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:682: + elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]): WARNING: line over 80 characters #1457: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:703: + #all_defines = [m for m in self.allfiles.matches_of_type(ExpressionDefine)] ERROR: line over 90 characters #1487: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:744: + if 'instance_size' in values and parent.get_raw_initializer_value('instance_size') != values['instance_size'].raw: ERROR: line over 90 characters #1493: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:749: + if 'class_size' in values and parent.get_raw_initializer_value('class_size') != values['class_size'].raw: ERROR: line over 90 characters #1564: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:871: + self.warn("can't identify the function where type_register_static(&%s) is called", self.name) WARNING: line over 80 characters #1613: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:912: + yield self.group_match('func_name').make_patch('type_register_static') total: 44 errors, 34 warnings, 1701 lines checked Patch 13/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 14/17 Checking commit 580edfa51e34 (qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE) WARNING: line over 80 characters #228: FILE: include/qom/object.h:649: +#define OBJECT_DECLARE_SIMPLE_TYPE(InstanceType, module_obj_name, MODULE_OBJ_NAME) \ WARNING: line over 80 characters #233: FILE: include/qom/object.h:654: + DECLARE_INSTANCE_CHECKER(InstanceType, MODULE_OBJ_NAME, TYPE_##MODULE_OBJ_NAME) total: 0 errors, 2 warnings, 192 lines checked Patch 14/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 15/17 Checking commit 145c40532e4a (qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros) 16/17 Checking commit 15a16fe73496 (Use OBJECT_DECLARE_TYPE when possible) WARNING: line over 80 characters #153: FILE: hw/arm/vexpress.c:184: +OBJECT_DECLARE_TYPE(VexpressMachineState, VexpressMachineClass, VEXPRESS_MACHINE) WARNING: line over 80 characters #970: FILE: include/hw/s390x/3270-ccw.h:34: +OBJECT_DECLARE_TYPE(EmulatedCcw3270Device, EmulatedCcw3270Class, EMULATED_CCW_3270) total: 0 errors, 2 warnings, 902 lines checked Patch 16/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 17/17 Checking commit 74e8c804ff31 (Use OBJECT_DECLARE_SIMPLE_TYPE when possible) WARNING: line over 80 characters #46: FILE: backends/cryptodev-vhost-user.c:42: +OBJECT_DECLARE_SIMPLE_TYPE(CryptoDevBackendVhostUser, CRYPTODEV_BACKEND_VHOST_USER) total: 0 errors, 1 warnings, 6146 lines checked Patch 17/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/20200918204714.27276-1-ehabk...@redhat.com/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-de...@redhat.com