Bug 207085

Summary: checkpatch.pl reporting missing blank line after a packed field of a structure
Product: Other Reporter: michelesr
Component: OtherAssignee: other_other
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.6.0-next Subsystem:
Regression: No Bisected commit-id:

Description michelesr 2020-04-03 15:19:49 UTC
To reproduce:

scripts/checkpatch.pl -f drivers/hwmon/dell-smm-hwmon.c | grep 'blank' -A 4

The command will generate warnings for missing blank lines after declarations that are caused by the following structure declaration:

struct smm_regs {
	unsigned int eax;
	unsigned int ebx __packed;
	unsigned int ecx __packed;
	unsigned int edx __packed;
	unsigned int esi __packed;
	unsigned int edi __packed;
};

This is somehow a false positive as the warning message is misleading, as there shouldn't be blank lines between fields of a structure.