Skip to content

Commit

Permalink
Fix compile breakage with kref.h
Browse files Browse the repository at this point in the history
This set of build failures just started appearing on parisc:

  In file included from drivers/input/serio/serio_raw.c:12:
  include/linux/kref.h: In function 'kref_get':
  include/linux/kref.h:40: error: 'TAINT_WARN' undeclared (first use in this function)
  include/linux/kref.h:40: error: (Each undeclared identifier is reported only once
  include/linux/kref.h:40: error: for each function it appears in.)
  include/linux/kref.h: In function 'kref_sub':
  include/linux/kref.h:65: error: 'TAINT_WARN' undeclared (first use in this function)

It happens because TAINT_WARN is defined in kernel.h and this particular
compile doesn't seem to include it (no idea why it's just manifesting ..
probably some #include file untangling exposed it).

Fix by adding

  #include <linux/kernel.h>

to linux/kref.h

Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
James Bottomley authored and Linus Torvalds committed Jan 17, 2012
1 parent e268337 commit 67175b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/kref.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <linux/bug.h>
#include <linux/atomic.h>
#include <linux/kernel.h>

struct kref {
atomic_t refcount;
Expand Down

0 comments on commit 67175b8

Please sign in to comment.