From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fengguang Wu Subject: Re: error: implicit declarations of BUG/BUG_ON/WARN_ON/WARN_ON_ONCE Date: Mon, 25 Jun 2012 12:20:17 +0800 Message-ID: <20120625042017.GA11705@localhost> References: <20120615143303.3b88edcbc3efc7b1bf81839b@canb.auug.org.au> <20120615065231.GA12272@localhost> <4FDB6261.2030400@xenotime.net> <4FDF5D50.7030505@xenotime.net> <20120622071305.GA15102@localhost> <20120625025301.GB9317@linux-sh.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga14.intel.com ([143.182.124.37]:60686 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751243Ab2FYEU0 (ORCPT ); Mon, 25 Jun 2012 00:20:26 -0400 Content-Disposition: inline In-Reply-To: <20120625025301.GB9317@linux-sh.org> Sender: linux-next-owner@vger.kernel.org List-ID: To: Paul Mundt Cc: Randy Dunlap , Stephen Rothwell , linux-next@vger.kernel.org, LKML , Arnd Bergmann Hi Paul, The patch builds fine, thank you! Tested-by: Fengguang Wu Thanks, Fengguang > I'm really starting to loathe this header. This should take care of it: > > --- > > diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h > index 506ec19..7d10f96 100644 > --- a/include/asm-generic/bug.h > +++ b/include/asm-generic/bug.h > @@ -3,10 +3,18 @@ > > #include > > +#ifdef CONFIG_GENERIC_BUG > +#define BUGFLAG_WARNING (1 << 0) > +#define BUGFLAG_TAINT(taint) (BUGFLAG_WARNING | ((taint) << 8)) > +#define BUG_GET_TAINT(bug) ((bug)->flags >> 8) > +#endif > + > +#ifndef __ASSEMBLY__ > +#include > + > #ifdef CONFIG_BUG > > #ifdef CONFIG_GENERIC_BUG > -#ifndef __ASSEMBLY__ > struct bug_entry { > #ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS > unsigned long bug_addr; > @@ -23,17 +31,8 @@ struct bug_entry { > #endif > unsigned short flags; > }; > -#endif /* __ASSEMBLY__ */ > - > -#define BUGFLAG_WARNING (1 << 0) > -#define BUGFLAG_TAINT(taint) (BUGFLAG_WARNING | ((taint) << 8)) > -#define BUG_GET_TAINT(bug) ((bug)->flags >> 8) > - > #endif /* CONFIG_GENERIC_BUG */ > > -#ifndef __ASSEMBLY__ > -#include > - > /* > * Don't use BUG() or BUG_ON() unless there's really no way out; one > * example might be detecting data structure corruption in the middle