false checkpatch finding?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<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 Documentation/volatile-considered-harmful.txt
#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.

Mike

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

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux