linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fix compile breakage with kref.h
@ 2012-01-17 21:14 James Bottomley
  2012-01-17 21:26 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2012-01-17 21:14 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Greg Kroah-Hartman
  Cc: Parisc List, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1290 bytes --]

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>

---

diff --git a/include/linux/kref.h b/include/linux/kref.h
index abc0120..9c07dce 100644
--- a/include/linux/kref.h
+++ b/include/linux/kref.h
@@ -17,6 +17,7 @@
 
 #include <linux/bug.h>
 #include <linux/atomic.h>
+#include <linux/kernel.h>
 
 struct kref {
 	atomic_t refcount;

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Fix compile breakage with kref.h
  2012-01-17 21:14 Fix compile breakage with kref.h James Bottomley
@ 2012-01-17 21:26 ` Greg Kroah-Hartman
  2012-01-17 22:09   ` Paul Gortmaker
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2012-01-17 21:26 UTC (permalink / raw)
  To: James Bottomley; +Cc: Linus Torvalds, Andrew Morton, Parisc List, linux-kernel

On Tue, Jan 17, 2012 at 09:14:05PM +0000, James Bottomley wrote:
> 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

Does adding <linux/bug.h> fix it instead?  We are using WARN_ON() here.
Hm, but that needs kernel.h as well, ugh, what a mess.

> Signed-off-by: James Bottomley <JBottomley@Parallels.com>

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fix compile breakage with kref.h
  2012-01-17 21:26 ` Greg Kroah-Hartman
@ 2012-01-17 22:09   ` Paul Gortmaker
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Gortmaker @ 2012-01-17 22:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: James Bottomley, Linus Torvalds, Andrew Morton, Parisc List,
	linux-kernel

On Tue, Jan 17, 2012 at 4:26 PM, Greg Kroah-Hartman <greg@kroah.com> wrote:
> On Tue, Jan 17, 2012 at 09:14:05PM +0000, James Bottomley wrote:
>> 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
>
> Does adding <linux/bug.h> fix it instead?  We are using WARN_ON() here.
> Hm, but that needs kernel.h as well, ugh, what a mess.

I've got some work done already towards cleaning this up; aiming for
getting it done and in linux-next for the 3.4 cycle.

https://lkml.org/lkml/2012/1/4/455

Paul.
---

>
>> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
>
> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-17 22:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-17 21:14 Fix compile breakage with kref.h James Bottomley
2012-01-17 21:26 ` Greg Kroah-Hartman
2012-01-17 22:09   ` Paul Gortmaker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).