Skip to content

Commit

Permalink
kernel-add-support-for-gcc-5-checkpatch-fixes
Browse files Browse the repository at this point in the history
WARNING: line over 80 characters
torvalds#25: FILE: include/linux/compiler-gcc5.h:2:
+#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead."

WARNING: please, no space before tabs
torvalds#29: FILE: include/linux/compiler-gcc5.h:6:
+#define __must_check ^I^I__attribute__((warn_unused_result))$

ERROR: space required after that ',' (ctx:VxV)
torvalds#30: FILE: include/linux/compiler-gcc5.h:7:
+#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
                              ^

ERROR: space required after that ',' (ctx:VxV)
torvalds#30: FILE: include/linux/compiler-gcc5.h:7:
+#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
                                                      ^

total: 2 errors, 2 warnings, 66 lines checked

./patches/kernel-add-support-for-gcc-5.patch has style problems, please review.

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

Please run checkpatch prior to sending patches

Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
akpm00 authored and sfrothwell committed Sep 9, 2014
1 parent be7b330 commit 4f69e9b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/linux/compiler-gcc5.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead."
#endif

#define __used __attribute__((__used__))
#define __must_check __attribute__((warn_unused_result))
#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
#define __used __attribute__((__used__))
#define __must_check __attribute__((warn_unused_result))
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)

/* Mark functions as cold. gcc will assume any path leading to a call
to them will be unlikely. This means a lot of manual unlikely()s
Expand Down

0 comments on commit 4f69e9b

Please sign in to comment.