ERROR: Macros with complex values should be enclosed in parentheses #58: FILE: drivers/net/ethernet/realtek/r8169_main.c:740: +#define NODE_PROP(_NAME, _PROP) \ + (const struct software_node) { \ + .name = (_NAME), \ + .properties = (_PROP), \ + } BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. WARNING: line length of 82 exceeds 80 columns #119: FILE: drivers/net/ethernet/realtek/r8169_main.c:2475: + snprintf(nodes->gpio_name, sizeof(nodes->gpio_name), "r8169_gpio-%x", id); WARNING: line length of 91 exceeds 80 columns #122: FILE: drivers/net/ethernet/realtek/r8169_main.c:2478: + snprintf(nodes->phylink_name, sizeof(nodes->phylink_name), "r8169_phylink-%x", id); WARNING: line length of 81 exceeds 80 columns #129: FILE: drivers/net/ethernet/realtek/r8169_main.c:2485: + nodes->gpio_props[0] = PROPERTY_ENTRY_STRING("pinctrl-names", "default"); WARNING: line length of 97 exceeds 80 columns #131: FILE: drivers/net/ethernet/realtek/r8169_main.c:2487: + nodes->gpio0_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_GPIO], 8, GPIO_ACTIVE_LOW); WARNING: line length of 98 exceeds 80 columns #132: FILE: drivers/net/ethernet/realtek/r8169_main.c:2488: + nodes->gpio1_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_GPIO], 11, GPIO_ACTIVE_LOW); WARNING: line length of 89 exceeds 80 columns #134: FILE: drivers/net/ethernet/realtek/r8169_main.c:2490: + nodes->i2c_props[0] = PROPERTY_ENTRY_STRING("compatible", "snps,designware-i2c"); WARNING: line length of 96 exceeds 80 columns #136: FILE: drivers/net/ethernet/realtek/r8169_main.c:2492: + nodes->i2c_props[2] = PROPERTY_ENTRY_U32("clock-frequency", I2C_MAX_STANDARD_MODE_FREQ); WARNING: line length of 82 exceeds 80 columns #141: FILE: drivers/net/ethernet/realtek/r8169_main.c:2497: + nodes->sfp_props[1] = PROPERTY_ENTRY_REF_ARRAY("i2c-bus", nodes->i2c_ref); WARNING: line length of 91 exceeds 80 columns #142: FILE: drivers/net/ethernet/realtek/r8169_main.c:2498: + nodes->sfp_props[2] = PROPERTY_ENTRY_REF_ARRAY("mod-def0-gpios", nodes->gpio0_ref); WARNING: line length of 86 exceeds 80 columns #143: FILE: drivers/net/ethernet/realtek/r8169_main.c:2499: + nodes->sfp_props[3] = PROPERTY_ENTRY_REF_ARRAY("los-gpios", nodes->gpio1_ref); WARNING: line length of 85 exceeds 80 columns #147: FILE: drivers/net/ethernet/realtek/r8169_main.c:2503: + nodes->phylink_props[0] = PROPERTY_ENTRY_STRING("managed", "in-band-status"); WARNING: line length of 82 exceeds 80 columns #148: FILE: drivers/net/ethernet/realtek/r8169_main.c:2504: + nodes->phylink_props[1] = PROPERTY_ENTRY_REF_ARRAY("sfp", nodes->sfp_ref); WARNING: line length of 87 exceeds 80 columns #149: FILE: drivers/net/ethernet/realtek/r8169_main.c:2505: + swnodes[SWNODE_PHYLINK] = NODE_PROP(nodes->phylink_name, nodes->phylink_props); WARNING: line length of 82 exceeds 80 columns #311: FILE: drivers/net/ethernet/realtek/r8169_main.c:2667: + return dev_err_probe(&pdev->dev, ret, "r8169_swnodes_register\n"); total: 1 errors, 14 warnings, 0 checks, 348 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. Commit 9f6561130feb ("r8169: implement SFP support") has style problems, please review. NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT BAD_REPORTED_BY_LINK CAMELCASE COMMIT_LOG_LONG_LINE FILE_PATH_CHANGES GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.