Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1499711

false checkpatch finding?

From "Marciniszyn, Mike" <mike.marciniszyn@intel.com>
Newsgroups linux.kernel
Subject false checkpatch finding?
Date 2016-10-12 16:10 +0200
Message-ID <srsoh-5uN-17@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


<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>

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

false checkpatch finding? "Marciniszyn, Mike" <mike.marciniszyn@intel.com> - 2016-10-12 16:10 +0200

csiph-web