CHECK: No space is necessary after a cast #273: FILE: drivers/net/ethernet/dlink/dl2k.c:1202: +#define READ_STAT(S, B, I) (*((u64 *) (((void *) B) + S[I].stat_offset))) CHECK: Macro argument 'S' may be better as '(S)' to avoid precedence issues #273: FILE: drivers/net/ethernet/dlink/dl2k.c:1202: +#define READ_STAT(S, B, I) (*((u64 *) (((void *) B) + S[I].stat_offset))) CHECK: No space is necessary after a cast #274: FILE: drivers/net/ethernet/dlink/dl2k.c:1203: +#define READ_DATA(S, B, I) (*((u64 *) (((void *) B) + S[I].data_offset))) CHECK: Macro argument 'S' may be better as '(S)' to avoid precedence issues #274: FILE: drivers/net/ethernet/dlink/dl2k.c:1203: +#define READ_DATA(S, B, I) (*((u64 *) (((void *) B) + S[I].data_offset))) CHECK: Macro argument 'SIZE' may be better as '(SIZE)' to avoid precedence issues #276: FILE: drivers/net/ethernet/dlink/dl2k.c:1205: +#define GET_STATS(STATS, SIZE) \ + for (int i = 0; i < SIZE; i++) { \ + if (STATS[i].size == sizeof(u32)) \ + READ_STAT(STATS, np, i) = dr32(STATS[i].regs); \ + else \ + READ_STAT(STATS, np, i) = dr16(STATS[i].regs); \ + } CHECK: Macro argument 'SIZE' may be better as '(SIZE)' to avoid precedence issues #284: FILE: drivers/net/ethernet/dlink/dl2k.c:1213: +#define CLEAR_STATS(STATS, SIZE) \ + for (int i = 0; i < SIZE; i++) { \ + if (STATS[i].size == sizeof(u32)) \ + dr32(STATS[i].regs); \ + else \ + dr16(STATS[i].regs); \ + } CHECK: Lines should not end with a '(' #440: FILE: drivers/net/ethernet/dlink/dl2k.c:1419: +static void get_ethtool_rmon_stats( WARNING: line length of 83 exceeds 80 columns #448: FILE: drivers/net/ethernet/dlink/dl2k.c:1427: + READ_DATA(rmon_stats, rmon_base, i) = READ_STAT(rmon_stats, np, i); WARNING: line length of 83 exceeds 80 columns #464: FILE: drivers/net/ethernet/dlink/dl2k.c:1443: + READ_DATA(ctrl_stats, ctrl_base, i) = READ_STAT(ctrl_stats, np, i); CHECK: Please don't use multiple blank lines #481: FILE: drivers/net/ethernet/dlink/dl2k.c:1460: + + CHECK: spinlock_t definition without comment #560: FILE: drivers/net/ethernet/dlink/dl2k.h:387: + spinlock_t stats_lock; total: 0 errors, 2 warnings, 9 checks, 529 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 2e4d2fddc672 ("net: dlink: add support for reporting stats via `ethtool -S`") has style problems, please review. NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT BAD_REPORTED_BY_LINK CAMELCASE COMMIT_LOG_LONG_LINE 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. total: 0 errors, 2 warnings, 9 checks, 529 lines checked