Bug 207085 - checkpatch.pl reporting missing blank line after a packed field of a structure
Summary: checkpatch.pl reporting missing blank line after a packed field of a structure
Status: NEW
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: other_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-03 15:19 UTC by michelesr
Modified: 2020-04-03 15:19 UTC (History)
0 users

See Also:
Kernel Version: 5.6.0-next
Subsystem:
Regression: No
Bisected commit-id:


Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.