aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/arcdevice.h
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2014-07-02 08:12:01 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-08 00:34:43 -0400
commitdb55b62cab8d458aba4e7a81dc4dd98b45c03d85 (patch)
tree76e595d03ae546c114a0a72ddd233379fa131d27 /include/linux/arcdevice.h
parenta16a3361927f75e6032df110920c83ca6c5045d3 (diff)
net: arcnet: Remove "#define bool int"
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/arcdevice.h')
-rw-r--r--include/linux/arcdevice.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/linux/arcdevice.h b/include/linux/arcdevice.h
index 7216b0daf544..df0356220730 100644
--- a/include/linux/arcdevice.h
+++ b/include/linux/arcdevice.h
@@ -22,10 +22,6 @@
22#ifdef __KERNEL__ 22#ifdef __KERNEL__
23#include <linux/irqreturn.h> 23#include <linux/irqreturn.h>
24 24
25#ifndef bool
26#define bool int
27#endif
28
29/* 25/*
30 * RECON_THRESHOLD is the maximum number of RECON messages to receive 26 * RECON_THRESHOLD is the maximum number of RECON messages to receive
31 * within one minute before printing a "cabling problem" warning. The 27 * within one minute before printing a "cabling problem" warning. The
@@ -285,9 +281,9 @@ struct arcnet_local {
285 unsigned long first_recon; /* time of "first" RECON message to count */ 281 unsigned long first_recon; /* time of "first" RECON message to count */
286 unsigned long last_recon; /* time of most recent RECON */ 282 unsigned long last_recon; /* time of most recent RECON */
287 int num_recons; /* number of RECONs between first and last. */ 283 int num_recons; /* number of RECONs between first and last. */
288 bool network_down; /* do we think the network is down? */ 284 int network_down; /* do we think the network is down? */
289 285
290 bool excnak_pending; /* We just got an excesive nak interrupt */ 286 int excnak_pending; /* We just got an excesive nak interrupt */
291 287
292 struct { 288 struct {
293 uint16_t sequence; /* sequence number (incs with each packet) */ 289 uint16_t sequence; /* sequence number (incs with each packet) */
@@ -305,7 +301,7 @@ struct arcnet_local {
305 void (*command) (struct net_device * dev, int cmd); 301 void (*command) (struct net_device * dev, int cmd);
306 int (*status) (struct net_device * dev); 302 int (*status) (struct net_device * dev);
307 void (*intmask) (struct net_device * dev, int mask); 303 void (*intmask) (struct net_device * dev, int mask);
308 bool (*reset) (struct net_device * dev, bool really_reset); 304 int (*reset) (struct net_device * dev, int really_reset);
309 void (*open) (struct net_device * dev); 305 void (*open) (struct net_device * dev);
310 void (*close) (struct net_device * dev); 306 void (*close) (struct net_device * dev);
311 307