Commit dce2f963 authored by Mitchell Blank Jr's avatar Mitchell Blank Jr Committed by Linus Torvalds

[PATCH] atm warning fix (vs 2.5.21)

This fixes a large batch of warnings that popped up with the new stricter
bitops.h that recently was introduced.  We actually didn't have 64-bit
bug, but we had built our own *_flags_t typedef's that were just struct
wrappers around an unsigned long.  We used to pass their addresses directly
to set_bit() and friends but now that causes an error.  The typedef's really
didn't serve much purpose so the cleanest fix is to just eliminate them and
use "unsigned long" directly.
parent 68587662
......@@ -275,12 +275,8 @@ enum {
#define ATM_ATMOPT_CLP 1 /* set CLP bit */
typedef struct { unsigned long bits; } atm_vcc_flags_t;
struct atm_vcc {
atm_vcc_flags_t flags; /* VCC flags (ATM_VF_*) */
unsigned long flags; /* VCC flags (ATM_VF_*) */
unsigned char family; /* address family; 0 if unused */
short vpi; /* VPI and VCI (types must be equal */
/* with sockaddr) */
......@@ -330,10 +326,6 @@ struct atm_dev_addr {
struct atm_dev_addr *next; /* next address */
};
typedef struct { unsigned int bits; } atm_dev_flags_t;
struct atm_dev {
const struct atmdev_ops *ops; /* device operations; NULL if unused */
const struct atmphy_ops *phy; /* PHY operations, may be undefined */
......@@ -344,7 +336,7 @@ struct atm_dev {
struct atm_vcc *last; /* last VCC (or undefined) */
void *dev_data; /* per-device data */
void *phy_data; /* private PHY date */
atm_dev_flags_t flags; /* device flags (ATM_DF_*) */
unsigned long flags; /* device flags (ATM_DF_*) */
struct atm_dev_addr *local; /* local ATM addresses */
unsigned char esi[ESI_LEN]; /* ESI ("MAC" addr) */
struct atm_cirange ci_range; /* VPI/VCI range */
......@@ -414,7 +406,7 @@ struct atm_skb_data {
#define ATM_SKB(skb) (((struct atm_skb_data *) (skb)->cb))
struct atm_dev *atm_dev_register(const char *type,const struct atmdev_ops *ops,
int number,atm_dev_flags_t *flags); /* number == -1: pick first available */
int number,unsigned long *flags); /* number == -1: pick first available */
struct atm_dev *atm_find_dev(int number);
void atm_dev_deregister(struct atm_dev *dev);
void shutdown_atm_dev(struct atm_dev *dev);
......
......@@ -710,7 +710,7 @@ static struct atm_dev atmarpd_dev = {
999, /* dummy device number */
NULL,NULL, /* pretend not to have any VCCs */
NULL,NULL, /* no data */
{ 0 }, /* no flags */
0, /* no flags */
NULL, /* no local address */
{ 0 } /* no ESI, no statistics */
};
......
......@@ -564,7 +564,7 @@ static struct atm_dev lecatm_dev = {
999, /*dummy device number*/
NULL,NULL, /*no VCCs*/
NULL,NULL, /*no data*/
{ 0 }, /*no flags*/
0, /*no flags*/
NULL, /* no local address*/
{ 0 } /*no ESI or rest of the atm_dev struct things*/
};
......
......@@ -220,7 +220,7 @@ static void vc_info(struct atm_vcc *vcc,char *buf)
default:
here += sprintf(here,"%3d",vcc->family);
}
here += sprintf(here," %04lx %5d %7d/%7d %7d/%7d\n",vcc->flags.bits,
here += sprintf(here," %04lx %5d %7d/%7d %7d/%7d\n",vcc->flags,
vcc->reply,
atomic_read(&vcc->tx_inuse),vcc->sk->sndbuf,
atomic_read(&vcc->rx_inuse),vcc->sk->rcvbuf);
......
......@@ -83,7 +83,7 @@ struct atm_dev *atm_find_dev(int number)
struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops,
int number, atm_dev_flags_t *flags)
int number, unsigned long *flags)
{
struct atm_dev *dev;
......
......@@ -239,7 +239,7 @@ static struct atm_dev sigd_dev = {
999, /* dummy device number */
NULL,NULL, /* pretend not to have any VCCs */
NULL,NULL, /* no data */
{ 0 }, /* no flags */
0, /* no flags */
NULL, /* no local address */
{ 0 } /* no ESI, no statistics */
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment