CHECK: Please use a blank line after function/struct/union/enum declarations #141: FILE: drivers/fwctl/main.c:16: +}; +static_assert(FWCTL_MAX_DEVICES < (1U << MINORBITS)); CHECK: Macro argument 'drv_struct' may be better as '(drv_struct)' to avoid precedence issues #350: FILE: include/linux/fwctl.h:46: +#define fwctl_alloc_device(parent, ops, drv_struct, member) \ + ({ \ + static_assert(__same_type(struct fwctl_device, \ + ((drv_struct *)NULL)->member)); \ + static_assert(offsetof(drv_struct, member) == 0); \ + (drv_struct *)_fwctl_alloc_device(parent, ops, \ + sizeof(drv_struct)); \ + }) CHECK: Macro argument 'member' may be better as '(member)' to avoid precedence issues #350: FILE: include/linux/fwctl.h:46: +#define fwctl_alloc_device(parent, ops, drv_struct, member) \ + ({ \ + static_assert(__same_type(struct fwctl_device, \ + ((drv_struct *)NULL)->member)); \ + static_assert(offsetof(drv_struct, member) == 0); \ + (drv_struct *)_fwctl_alloc_device(parent, ops, \ + sizeof(drv_struct)); \ + }) CHECK: Please use a blank line after function/struct/union/enum declarations #364: FILE: include/linux/fwctl.h:60: +} +static inline void fwctl_put(struct fwctl_device *fwctl) CHECK: Please use a blank line after function/struct/union/enum declarations #368: FILE: include/linux/fwctl.h:64: +} +DEFINE_FREE(fwctl, struct fwctl_device *, if (_T) fwctl_put(_T)); ERROR: trailing statements should be on next line #368: FILE: include/linux/fwctl.h:64: +DEFINE_FREE(fwctl, struct fwctl_device *, if (_T) fwctl_put(_T)); total: 1 errors, 0 warnings, 5 checks, 283 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 a37ae8729e4a ("fwctl: Add basic structure for a class subsystem with a cdev") 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.