<4.8 tree>/scripts/checkpatch.pl -F foo.h
WARNING: Missing a blank line after declarations
#3: FILE: foo.h:3:
+       unsigned long f1;
+       volatile __le64 f2.

WARNING: Use of volatile is usually wrong: see 
#3: FILE: foo.h:3:
+       volatile __le64 f2.

total: 0 errors, 2 warnings, 4 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.

foo.h has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Adding a gratuitous blank line after f1 silences the bogus warning.

The volatile warning is ok because this is a hardware written field.

Snip the test file from below.


<snip foo.h>
struct foo {
        unsigned long f1;
        volatile __le64 f2.
</snip foo.h>

Reply via email to