From: Roland Hieber <r.hieber@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 4/4] linux/types.h: fix missing include for BITS_TO_LONGS()
Date: Thu, 9 Aug 2018 23:32:03 +0200 [thread overview]
Message-ID: <20180809213203.7xmvzubyuqizqb4o@pengutronix.de> (raw)
In-Reply-To: <20180809193839.lqtaurzxn62emuhg@pengutronix.de>
On Thu, Aug 09, 2018 at 09:38:39PM +0200, Sascha Hauer wrote:
> On Mon, Jul 30, 2018 at 01:14:37PM +0200, Roland Hieber wrote:
> > Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> > ---
> > include/linux/types.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/include/linux/types.h b/include/linux/types.h
> > index f64ec4a814..44d8238d53 100644
> > --- a/include/linux/types.h
> > +++ b/include/linux/types.h
> > @@ -2,6 +2,7 @@
> > #define _LINUX_TYPES_H
> >
> > #include <linux/posix_types.h>
> > +#include <linux/bitops.h>
> > #include <asm/types.h>
>
> This breaks compilation on ppc. Here linux/bitops.h includes files which
> use types (__be32 and friends) which are declared later in
> include/linux/types.h.
>
> Why specifically is this patch needed?
I was isolating the architecture-specific parts of a shared customer
code base into single files (in order to port it to another arch), and
in that process I ended up with a .c file that included <linux/types.h>
for some macro which I don't remember, but it did not compile because
<linux/types.h> declares macros that use BITS_TO_LONGS(), which is
declared in <linux/bitops.h>, which was not included before.
I guess the original code already included <linux/bitops.h> via some
other path before including <linux/types.h>, so the error did not happen
there. So I reasoned that if <linux/types.h> uses BITS_TO_LONGS(), it
should include the respective header where this macro is defined.
And now that you say it, I see that I should have written that in my
commit message.
- Roland
--
Roland Hieber | r.hieber@pengutronix.de |
Pengutronix e.K. | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-08-09 21:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-30 11:14 [PATCH 1/4] ARM: i.MX: HAB: fix missing include for EPERM Roland Hieber
2018-07-30 11:14 ` [PATCH 2/4] ARM: i.MX: OCOTP: fix missing include for uint32_t etc Roland Hieber
2018-07-30 11:14 ` [PATCH 3/4] gpio: fix missing includes for bool and struct list_head Roland Hieber
2018-07-30 11:14 ` [PATCH 4/4] linux/types.h: fix missing include for BITS_TO_LONGS() Roland Hieber
2018-08-09 19:38 ` Sascha Hauer
2018-08-09 21:32 ` Roland Hieber [this message]
2018-08-08 7:07 ` [PATCH 1/4] ARM: i.MX: HAB: fix missing include for EPERM Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180809213203.7xmvzubyuqizqb4o@pengutronix.de \
--to=r.hieber@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox