From: David Miller <davem@davemloft.net>
To: linux@rasmusvillemoes.dk
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: arcnet: Remove "#define bool int"
Date: Mon, 07 Jul 2014 21:35:01 -0700 (PDT) [thread overview]
Message-ID: <20140707.213501.964032202172502145.davem@davemloft.net> (raw)
In-Reply-To: <1404303121-2548-1-git-send-email-linux@rasmusvillemoes.dk>
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Date: Wed, 2 Jul 2014 14:12:01 +0200
> The header file include/linux/arcdevice.h #defines bool to int, if
> bool is not already #defined. However, the files which use that header
> file seem to rely on that #define (unconditionally) being in effect:
> the prototypes for the functions arcrimi_reset, com20020_reset,
> com90io_reset, com90xx_reset (whose addresses are assigned to the
> hw.reset member of struct arcnet_local) use int explicitly.
>
> Moreover, that #define is an accident waiting to happen (scenario:
> inclusion of arcdevice.h followed by inclusion of some header which
> declares function prototypes using bool). Also, #include
> <linux/types.h> must appear before #include <linux/arcdevice.h> (the
> compiler wouldn't like "typedef _Bool int").
>
> Since none of the files using arcdevice.h declare variables of type
> "bool", the patch is actually quite simple, unlike the commit message.
>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Applied to net-next, thanks.
prev parent reply other threads:[~2014-07-08 4:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-02 12:12 [PATCH] net: arcnet: Remove "#define bool int" Rasmus Villemoes
2014-07-02 16:02 ` Greg Kroah-Hartman
2014-07-02 17:49 ` Rasmus Villemoes
2014-07-08 4:35 ` David Miller [this message]
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=20140707.213501.964032202172502145.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).