* Re: [janitor] remove casts in drivers/net/arm/
[not found] <20040229142516.3d218ed0.rddunlap@osdl.org>
@ 2004-02-29 22:34 ` Randy.Dunlap
2004-03-02 12:10 ` Russell King
2004-02-29 22:35 ` [janitor] remove unneeded casts in /hamradio/ Randy.Dunlap
` (10 subsequent siblings)
11 siblings, 1 reply; 18+ messages in thread
From: Randy.Dunlap @ 2004-02-29 22:34 UTC (permalink / raw)
To: jgarzik; +Cc: netdev, rking
From: Carlo Perassi <carlo@linux.it>
drivers/net/arm/am79c961a.c | 18 +++++++++---------
drivers/net/arm/ether1.c | 18 +++++++++---------
drivers/net/arm/ether3.c | 18 +++++++++---------
drivers/net/arm/etherh.c | 4 ++--
4 files changed, 29 insertions(+), 29 deletions(-)
diff -puN drivers/net/arm/am79c961a.c~net_arm_casts drivers/net/arm/am79c961a.c
--- linux-263-229/drivers/net/arm/am79c961a.c~net_arm_casts 2004-02-29 13:53:00.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/arm/am79c961a.c 2004-02-29 13:53:00.000000000 -0800
@@ -196,7 +196,7 @@ am79c961_ramtest(struct net_device *dev,
static void
am79c961_init_for_open(struct net_device *dev)
{
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
unsigned long flags;
unsigned char *p;
u_int hdr_addr, first_free_addr;
@@ -271,7 +271,7 @@ am79c961_init_for_open(struct net_device
static void am79c961_timer(unsigned long data)
{
struct net_device *dev = (struct net_device *)data;
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
unsigned int lnkstat, carrier;
lnkstat = read_ireg(dev->base_addr, ISALED0) & ISALED0_LNKST;
@@ -291,7 +291,7 @@ static void am79c961_timer(unsigned long
static int
am79c961_open(struct net_device *dev)
{
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
int ret;
memset (&priv->stats, 0, sizeof (priv->stats));
@@ -318,7 +318,7 @@ am79c961_open(struct net_device *dev)
static int
am79c961_close(struct net_device *dev)
{
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
unsigned long flags;
del_timer_sync(&priv->timer);
@@ -341,7 +341,7 @@ am79c961_close(struct net_device *dev)
*/
static struct net_device_stats *am79c961_getstats (struct net_device *dev)
{
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
return &priv->stats;
}
@@ -365,7 +365,7 @@ static void am79c961_mc_hash(struct dev_
*/
static void am79c961_setmulticastlist (struct net_device *dev)
{
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
unsigned long flags;
unsigned short multi_hash[4], mode;
int i, stopped;
@@ -444,7 +444,7 @@ static void am79c961_timeout(struct net_
static int
am79c961_sendpacket(struct sk_buff *skb, struct net_device *dev)
{
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
unsigned int hdraddr, bufaddr;
unsigned int head;
unsigned long flags;
@@ -593,7 +593,7 @@ static irqreturn_t
am79c961_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *)dev_id;
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
u_int status, n = 100;
int handled = 0;
@@ -630,7 +630,7 @@ am79c961_interrupt(int irq, void *dev_id
static int
am79c961_hw_init(struct net_device *dev)
{
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
spin_lock_irq(&priv->chip_lock);
write_rreg (dev->base_addr, CSR0, CSR0_STOP);
diff -puN drivers/net/arm/ether1.c~net_arm_casts drivers/net/arm/ether1.c
--- linux-263-229/drivers/net/arm/ether1.c~net_arm_casts 2004-02-29 13:53:00.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/arm/ether1.c 2004-02-29 13:53:00.000000000 -0800
@@ -447,7 +447,7 @@ static rbd_t init_rbd = {
static int
ether1_init_for_open (struct net_device *dev)
{
- struct ether1_priv *priv = (struct ether1_priv *)dev->priv;
+ struct ether1_priv *priv = dev->priv;
int i, status, addr, next, next2;
int failures = 0;
unsigned long timeout;
@@ -616,7 +616,7 @@ ether1_init_for_open (struct net_device
static int
ether1_txalloc (struct net_device *dev, int size)
{
- struct ether1_priv *priv = (struct ether1_priv *)dev->priv;
+ struct ether1_priv *priv = dev->priv;
int start, tail;
size = (size + 1) & ~1;
@@ -642,7 +642,7 @@ ether1_txalloc (struct net_device *dev,
static int
ether1_open (struct net_device *dev)
{
- struct ether1_priv *priv = (struct ether1_priv *)dev->priv;
+ struct ether1_priv *priv = dev->priv;
if (!is_valid_ether_addr(dev->dev_addr)) {
printk(KERN_WARNING "%s: invalid ethernet MAC address\n",
@@ -668,7 +668,7 @@ ether1_open (struct net_device *dev)
static void
ether1_timeout(struct net_device *dev)
{
- struct ether1_priv *priv = (struct ether1_priv *)dev->priv;
+ struct ether1_priv *priv = dev->priv;
printk(KERN_WARNING "%s: transmit timeout, network cable problem?\n",
dev->name);
@@ -686,7 +686,7 @@ ether1_timeout(struct net_device *dev)
static int
ether1_sendpacket (struct sk_buff *skb, struct net_device *dev)
{
- struct ether1_priv *priv = (struct ether1_priv *)dev->priv;
+ struct ether1_priv *priv = dev->priv;
int tmp, tst, nopaddr, txaddr, tbdaddr, dataddr;
unsigned long flags;
tx_t tx;
@@ -762,7 +762,7 @@ ether1_sendpacket (struct sk_buff *skb,
static void
ether1_xmit_done (struct net_device *dev)
{
- struct ether1_priv *priv = (struct ether1_priv *)dev->priv;
+ struct ether1_priv *priv = dev->priv;
nop_t nop;
int caddr, tst;
@@ -863,7 +863,7 @@ again:
static void
ether1_recv_done (struct net_device *dev)
{
- struct ether1_priv *priv = (struct ether1_priv *)dev->priv;
+ struct ether1_priv *priv = dev->priv;
int status;
int nexttail, rbdaddr;
rbd_t rbd;
@@ -919,7 +919,7 @@ static irqreturn_t
ether1_interrupt (int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *)dev_id;
- struct ether1_priv *priv = (struct ether1_priv *)dev->priv;
+ struct ether1_priv *priv = dev->priv;
int status;
status = ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS);
@@ -978,7 +978,7 @@ ether1_close (struct net_device *dev)
static struct net_device_stats *
ether1_getstats (struct net_device *dev)
{
- struct ether1_priv *priv = (struct ether1_priv *)dev->priv;
+ struct ether1_priv *priv = dev->priv;
return &priv->stats;
}
diff -puN drivers/net/arm/ether3.c~net_arm_casts drivers/net/arm/ether3.c
--- linux-263-229/drivers/net/arm/ether3.c~net_arm_casts 2004-02-29 13:53:00.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/arm/ether3.c 2004-02-29 13:53:00.000000000 -0800
@@ -121,7 +121,7 @@ static inline void ether3_outw(int v, co
static int
ether3_setbuffer(struct net_device *dev, buffer_rw_t read, int start)
{
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
int timeout = 1000;
ether3_outw(priv->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1);
@@ -180,7 +180,7 @@ static void
ether3_ledoff(unsigned long data)
{
struct net_device *dev = (struct net_device *)data;
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
ether3_outw(priv->regs.config2 |= CFG2_CTRLO, REG_CONFIG2);
}
@@ -280,7 +280,7 @@ ether3_ramtest(struct net_device *dev, u
static int __init
ether3_init_2(struct net_device *dev)
{
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
int i;
priv->regs.config1 = CFG1_RECVCOMPSTAT0|CFG1_DMABURST8;
@@ -330,7 +330,7 @@ ether3_init_2(struct net_device *dev)
static void
ether3_init_for_open(struct net_device *dev)
{
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
int i;
memset(&priv->stats, 0, sizeof(struct net_device_stats));
@@ -434,7 +434,7 @@ ether3_open(struct net_device *dev)
static int
ether3_close(struct net_device *dev)
{
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
netif_stop_queue(dev);
@@ -457,7 +457,7 @@ ether3_close(struct net_device *dev)
*/
static struct net_device_stats *ether3_getstats(struct net_device *dev)
{
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
return &priv->stats;
}
@@ -469,7 +469,7 @@ static struct net_device_stats *ether3_g
*/
static void ether3_setmulticastlist(struct net_device *dev)
{
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
priv->regs.config1 &= ~CFG1_RECVPROMISC;
@@ -487,7 +487,7 @@ static void ether3_setmulticastlist(stru
static void
ether3_timeout(struct net_device *dev)
{
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
unsigned long flags;
del_timer(&priv->timer);
@@ -518,7 +518,7 @@ ether3_timeout(struct net_device *dev)
static int
ether3_sendpacket(struct sk_buff *skb, struct net_device *dev)
{
- struct dev_priv *priv = (struct dev_priv *)dev->priv;
+ struct dev_priv *priv = dev->priv;
unsigned long flags;
unsigned int length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
unsigned int ptr, next_ptr;
diff -puN drivers/net/arm/etherh.c~net_arm_casts drivers/net/arm/etherh.c
--- linux-263-229/drivers/net/arm/etherh.c~net_arm_casts 2004-02-29 13:53:00.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/arm/etherh.c 2004-02-29 13:53:00.000000000 -0800
@@ -144,7 +144,7 @@ static expansioncard_ops_t etherh_ops =
static void
etherh_setif(struct net_device *dev)
{
- struct etherh_priv *eh = (struct etherh_priv *)dev->priv;
+ struct etherh_priv *eh = dev->priv;
struct ei_device *ei_local = &eh->eidev;
unsigned long addr, flags;
@@ -188,7 +188,7 @@ etherh_setif(struct net_device *dev)
static int
etherh_getifstat(struct net_device *dev)
{
- struct etherh_priv *eh = (struct etherh_priv *)dev->priv;
+ struct etherh_priv *eh = dev->priv;
struct ei_device *ei_local = &eh->eidev;
int stat = 0;
_
--
~Randy
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove unneeded casts in /hamradio/
[not found] <20040229142516.3d218ed0.rddunlap@osdl.org>
2004-02-29 22:34 ` [janitor] remove casts in drivers/net/arm/ Randy.Dunlap
@ 2004-02-29 22:35 ` Randy.Dunlap
2004-02-29 22:35 ` [janitor] remove unneeded casts in /appletalk/ & /fc/ Randy.Dunlap
` (9 subsequent siblings)
11 siblings, 0 replies; 18+ messages in thread
From: Randy.Dunlap @ 2004-02-29 22:35 UTC (permalink / raw)
To: jgarzik; +Cc: netdev
From: Carlo Perassi <carlo@linux.it>
drivers/net/hamradio/baycom_epp.c | 4 ++--
drivers/net/hamradio/baycom_par.c | 8 ++++----
drivers/net/hamradio/baycom_ser_fdx.c | 6 +++---
drivers/net/hamradio/baycom_ser_hdx.c | 6 +++---
4 files changed, 12 insertions(+), 12 deletions(-)
diff -puN drivers/net/hamradio/baycom_epp.c~net_hamradio_casts drivers/net/hamradio/baycom_epp.c
--- linux-263-229/drivers/net/hamradio/baycom_epp.c~net_hamradio_casts 2004-02-29 13:55:12.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/hamradio/baycom_epp.c 2004-02-29 13:55:12.000000000 -0800
@@ -646,7 +646,7 @@ static int transmit(struct baycom_state
static void do_rxpacket(struct net_device *dev)
{
- struct baycom_state *bc = (struct baycom_state *)dev->priv;
+ struct baycom_state *bc = dev->priv;
struct sk_buff *skb;
unsigned char *cp;
unsigned pktlen;
@@ -705,7 +705,7 @@ static void do_rxpacket(struct net_devic
static int receive(struct net_device *dev, int cnt)
{
- struct baycom_state *bc = (struct baycom_state *)dev->priv;
+ struct baycom_state *bc = dev->priv;
struct parport *pp = bc->pdev->port;
unsigned int bitbuf, notbitstream, bitstream, numbits, state;
unsigned char tmp[128];
diff -puN drivers/net/hamradio/baycom_par.c~net_hamradio_casts drivers/net/hamradio/baycom_par.c
--- linux-263-229/drivers/net/hamradio/baycom_par.c~net_hamradio_casts 2004-02-29 13:55:12.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/hamradio/baycom_par.c 2004-02-29 13:55:12.000000000 -0800
@@ -272,7 +272,7 @@ static __inline__ void par96_rx(struct n
static void par96_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *)dev_id;
- struct baycom_state *bc = (struct baycom_state *)dev->priv;
+ struct baycom_state *bc = dev->priv;
if (!dev || !bc || bc->hdrv.magic != HDLCDRV_MAGIC)
return;
@@ -302,7 +302,7 @@ static void par96_interrupt(int irq, voi
static void par96_wakeup(void *handle)
{
struct net_device *dev = (struct net_device *)handle;
- struct baycom_state *bc = (struct baycom_state *)dev->priv;
+ struct baycom_state *bc = dev->priv;
printk(KERN_DEBUG "baycom_par: %s: why am I being woken up?\n", dev->name);
if (!parport_claim(bc->pdev))
@@ -313,7 +313,7 @@ static void par96_wakeup(void *handle)
static int par96_open(struct net_device *dev)
{
- struct baycom_state *bc = (struct baycom_state *)dev->priv;
+ struct baycom_state *bc = dev->priv;
struct parport *pp;
if (!dev || !bc)
@@ -362,7 +362,7 @@ static int par96_open(struct net_device
static int par96_close(struct net_device *dev)
{
- struct baycom_state *bc = (struct baycom_state *)dev->priv;
+ struct baycom_state *bc = dev->priv;
struct parport *pp;
if (!dev || !bc)
diff -puN drivers/net/hamradio/baycom_ser_fdx.c~net_hamradio_casts drivers/net/hamradio/baycom_ser_fdx.c
--- linux-263-229/drivers/net/hamradio/baycom_ser_fdx.c~net_hamradio_casts 2004-02-29 13:55:12.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/hamradio/baycom_ser_fdx.c 2004-02-29 13:55:12.000000000 -0800
@@ -281,7 +281,7 @@ static __inline__ void ser12_rx(struct n
static irqreturn_t ser12_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *)dev_id;
- struct baycom_state *bc = (struct baycom_state *)dev->priv;
+ struct baycom_state *bc = dev->priv;
struct timeval tv;
unsigned char iir, msr;
unsigned int txcount = 0;
@@ -407,7 +407,7 @@ static enum uart ser12_check_uart(unsign
static int ser12_open(struct net_device *dev)
{
- struct baycom_state *bc = (struct baycom_state *)dev->priv;
+ struct baycom_state *bc = dev->priv;
enum uart u;
if (!dev || !bc)
@@ -466,7 +466,7 @@ static int ser12_open(struct net_device
static int ser12_close(struct net_device *dev)
{
- struct baycom_state *bc = (struct baycom_state *)dev->priv;
+ struct baycom_state *bc = dev->priv;
if (!dev || !bc)
return -EINVAL;
diff -puN drivers/net/hamradio/baycom_ser_hdx.c~net_hamradio_casts drivers/net/hamradio/baycom_ser_hdx.c
--- linux-263-229/drivers/net/hamradio/baycom_ser_hdx.c~net_hamradio_casts 2004-02-29 13:55:12.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/hamradio/baycom_ser_hdx.c 2004-02-29 13:55:12.000000000 -0800
@@ -375,7 +375,7 @@ static inline void ser12_rx(struct net_d
static irqreturn_t ser12_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *)dev_id;
- struct baycom_state *bc = (struct baycom_state *)dev->priv;
+ struct baycom_state *bc = dev->priv;
unsigned char iir;
if (!dev || !bc || bc->hdrv.magic != HDLCDRV_MAGIC)
@@ -468,7 +468,7 @@ static enum uart ser12_check_uart(unsign
static int ser12_open(struct net_device *dev)
{
- struct baycom_state *bc = (struct baycom_state *)dev->priv;
+ struct baycom_state *bc = dev->priv;
enum uart u;
if (!dev || !bc)
@@ -511,7 +511,7 @@ static int ser12_open(struct net_device
static int ser12_close(struct net_device *dev)
{
- struct baycom_state *bc = (struct baycom_state *)dev->priv;
+ struct baycom_state *bc = dev->priv;
if (!dev || !bc)
return -EINVAL;
_
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove unneeded casts in /appletalk/ & /fc/
[not found] <20040229142516.3d218ed0.rddunlap@osdl.org>
2004-02-29 22:34 ` [janitor] remove casts in drivers/net/arm/ Randy.Dunlap
2004-02-29 22:35 ` [janitor] remove unneeded casts in /hamradio/ Randy.Dunlap
@ 2004-02-29 22:35 ` Randy.Dunlap
2004-02-29 22:38 ` [janitor] remove unneeded casts in net/pcmcia/ Randy.Dunlap
` (8 subsequent siblings)
11 siblings, 0 replies; 18+ messages in thread
From: Randy.Dunlap @ 2004-02-29 22:35 UTC (permalink / raw)
To: jgarzik; +Cc: netdev
From: Carlo Perassi <carlo@linux.it>
drivers/net/appletalk/cops.c | 16 ++++++++--------
drivers/net/fc/iph5526.c | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
diff -puN drivers/net/appletalk/cops.c~net_atalk_fc_casts drivers/net/appletalk/cops.c
--- linux-263-229/drivers/net/appletalk/cops.c~net_atalk_fc_casts 2004-02-29 13:54:59.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/appletalk/cops.c 2004-02-29 13:54:59.000000000 -0800
@@ -422,7 +422,7 @@ static int __init cops_irq (int ioaddr,
*/
static int cops_open(struct net_device *dev)
{
- struct cops_local *lp = (struct cops_local *)dev->priv;
+ struct cops_local *lp = dev->priv;
if(dev->irq==0)
{
@@ -456,7 +456,7 @@ static int cops_open(struct net_device *
*/
static int cops_jumpstart(struct net_device *dev)
{
- struct cops_local *lp = (struct cops_local *)dev->priv;
+ struct cops_local *lp = dev->priv;
/*
* Once the card has the firmware loaded and has acquired
@@ -490,7 +490,7 @@ static void tangent_wait_reset(int ioadd
*/
static void cops_reset(struct net_device *dev, int sleep)
{
- struct cops_local *lp = (struct cops_local *)dev->priv;
+ struct cops_local *lp = dev->priv;
int ioaddr=dev->base_addr;
if(lp->board==TANGENT)
@@ -869,7 +869,7 @@ static void cops_rx(struct net_device *d
static void cops_timeout(struct net_device *dev)
{
- struct cops_local *lp = (struct cops_local *)dev->priv;
+ struct cops_local *lp = dev->priv;
int ioaddr = dev->base_addr;
lp->stats.tx_errors++;
@@ -891,7 +891,7 @@ static void cops_timeout(struct net_devi
static int cops_send_packet(struct sk_buff *skb, struct net_device *dev)
{
- struct cops_local *lp = (struct cops_local *)dev->priv;
+ struct cops_local *lp = dev->priv;
int ioaddr = dev->base_addr;
unsigned long flags;
@@ -966,7 +966,7 @@ static int cops_hard_header(struct sk_bu
static int cops_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
- struct cops_local *lp = (struct cops_local *)dev->priv;
+ struct cops_local *lp = dev->priv;
struct sockaddr_at *sa = (struct sockaddr_at *)&ifr->ifr_addr;
struct atalk_addr *aa = (struct atalk_addr *)&lp->node_addr;
@@ -1002,7 +1002,7 @@ static int cops_ioctl(struct net_device
static int cops_close(struct net_device *dev)
{
- struct cops_local *lp = (struct cops_local *)dev->priv;
+ struct cops_local *lp = dev->priv;
/* If we were running polled, yank the timer.
*/
@@ -1019,7 +1019,7 @@ static int cops_close(struct net_device
*/
static struct net_device_stats *cops_get_stats(struct net_device *dev)
{
- struct cops_local *lp = (struct cops_local *)dev->priv;
+ struct cops_local *lp = dev->priv;
return &lp->stats;
}
diff -puN drivers/net/fc/iph5526.c~net_atalk_fc_casts drivers/net/fc/iph5526.c
--- linux-263-229/drivers/net/fc/iph5526.c~net_atalk_fc_casts 2004-02-29 13:54:59.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/fc/iph5526.c 2004-02-29 13:54:59.000000000 -0800
@@ -238,7 +238,7 @@ int __init iph5526_probe(struct net_devi
static int __init iph5526_probe_pci(struct net_device *dev)
{
- struct fc_info *fi = (struct fc_info *)dev->priv;
+ struct fc_info *fi = dev->priv;
fi->dev = dev;
dev->base_addr = fi->base_addr;
dev->irq = fi->irq;
_
--
~Randy
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove unneeded casts in net/pcmcia/
[not found] <20040229142516.3d218ed0.rddunlap@osdl.org>
` (2 preceding siblings ...)
2004-02-29 22:35 ` [janitor] remove unneeded casts in /appletalk/ & /fc/ Randy.Dunlap
@ 2004-02-29 22:38 ` Randy.Dunlap
2004-02-29 22:40 ` [janitor] remove unneeded casts in net/wan/ Randy.Dunlap
` (7 subsequent siblings)
11 siblings, 0 replies; 18+ messages in thread
From: Randy.Dunlap @ 2004-02-29 22:38 UTC (permalink / raw)
To: jgarzik; +Cc: netdev
From: Carlo Perassi <carlo@linux.it>
drivers/net/pcmcia/3c574_cs.c | 18 +++++++++---------
drivers/net/pcmcia/3c589_cs.c | 14 +++++++-------
drivers/net/pcmcia/com20020_cs.c | 2 +-
drivers/net/pcmcia/fmvj18x_cs.c | 14 +++++++-------
drivers/net/pcmcia/ibmtr_cs.c | 2 +-
drivers/net/pcmcia/smc91c92_cs.c | 8 ++++----
6 files changed, 29 insertions(+), 29 deletions(-)
diff -puN drivers/net/pcmcia/3c574_cs.c~net_pcmcia_casts drivers/net/pcmcia/3c574_cs.c
--- linux-263-229/drivers/net/pcmcia/3c574_cs.c~net_pcmcia_casts 2004-02-29 13:55:31.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/pcmcia/3c574_cs.c 2004-02-29 13:55:31.000000000 -0800
@@ -733,7 +733,7 @@ static void mdio_write(ioaddr_t ioaddr,
/* Reset and restore all of the 3c574 registers. */
static void tc574_reset(struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
int i, ioaddr = dev->base_addr;
unsigned long flags;
@@ -814,7 +814,7 @@ static void tc574_reset(struct net_devic
static int el3_open(struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
dev_link_t *link = &lp->link;
if (!DEV_OK(link))
@@ -837,7 +837,7 @@ static int el3_open(struct net_device *d
static void el3_tx_timeout(struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
printk(KERN_NOTICE "%s: Transmit timed out!\n", dev->name);
@@ -852,7 +852,7 @@ static void el3_tx_timeout(struct net_de
static void pop_tx_status(struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
int i;
@@ -877,7 +877,7 @@ static void pop_tx_status(struct net_dev
static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
ioaddr_t ioaddr = dev->base_addr;
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
unsigned long flags;
DEBUG(3, "%s: el3_start_xmit(length = %ld) called, "
@@ -1074,7 +1074,7 @@ reschedule:
static struct net_device_stats *el3_get_stats(struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
if (netif_device_present(dev)) {
unsigned long flags;
@@ -1091,7 +1091,7 @@ static struct net_device_stats *el3_get_
*/
static void update_stats(struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
u8 rx, tx, up;
@@ -1128,7 +1128,7 @@ static void update_stats(struct net_devi
static int el3_rx(struct net_device *dev, int worklimit)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
short rx_status;
@@ -1190,7 +1190,7 @@ static struct ethtool_ops netdev_ethtool
/* Provide ioctl() calls to examine the MII xcvr state. */
static int el3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
u16 *data = (u16 *)&rq->ifr_data;
int phy = lp->phys & 0x1f;
diff -puN drivers/net/pcmcia/3c589_cs.c~net_pcmcia_casts drivers/net/pcmcia/3c589_cs.c
--- linux-263-229/drivers/net/pcmcia/3c589_cs.c~net_pcmcia_casts 2004-02-29 13:55:31.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/pcmcia/3c589_cs.c 2004-02-29 13:55:31.000000000 -0800
@@ -526,7 +526,7 @@ static u16 read_eeprom(ioaddr_t ioaddr,
*/
static void tc589_set_xcvr(struct net_device *dev, int if_port)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
EL3WINDOW(0);
@@ -648,7 +648,7 @@ static int el3_config(struct net_device
static int el3_open(struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
dev_link_t *link = &lp->link;
if (!DEV_OK(link))
@@ -672,7 +672,7 @@ static int el3_open(struct net_device *d
static void el3_tx_timeout(struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
printk(KERN_WARNING "%s: Transmit timed out!\n", dev->name);
@@ -687,7 +687,7 @@ static void el3_tx_timeout(struct net_de
static void pop_tx_status(struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
int i;
@@ -906,7 +906,7 @@ reschedule:
static struct net_device_stats *el3_get_stats(struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
unsigned long flags;
dev_link_t *link = &lp->link;
@@ -928,7 +928,7 @@ static struct net_device_stats *el3_get_
*/
static void update_stats(struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
DEBUG(2, "%s: updating the statistics.\n", dev->name);
@@ -955,7 +955,7 @@ static void update_stats(struct net_devi
static int el3_rx(struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
int worklimit = 32;
short rx_status;
diff -puN drivers/net/pcmcia/com20020_cs.c~net_pcmcia_casts drivers/net/pcmcia/com20020_cs.c
--- linux-263-229/drivers/net/pcmcia/com20020_cs.c~net_pcmcia_casts 2004-02-29 13:55:31.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/pcmcia/com20020_cs.c 2004-02-29 13:55:31.000000000 -0800
@@ -492,7 +492,7 @@ static int com20020_event(event_t event,
pcmcia_request_configuration(link->handle, &link->conf);
if (link->open) {
int ioaddr = dev->base_addr;
- struct arcnet_local *lp = (struct arcnet_local *)dev->priv;
+ struct arcnet_local *lp = dev->priv;
ARCRESET;
}
}
diff -puN drivers/net/pcmcia/fmvj18x_cs.c~net_pcmcia_casts drivers/net/pcmcia/fmvj18x_cs.c
--- linux-263-229/drivers/net/pcmcia/fmvj18x_cs.c~net_pcmcia_casts 2004-02-29 13:55:31.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/pcmcia/fmvj18x_cs.c 2004-02-29 13:55:31.000000000 -0800
@@ -862,7 +862,7 @@ static irqreturn_t fjn_interrupt(int irq
static void fjn_tx_timeout(struct net_device *dev)
{
- struct local_info_t *lp = (struct local_info_t *)dev->priv;
+ struct local_info_t *lp = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
printk(KERN_NOTICE "%s: transmit timed out with status %04x, %s?\n",
@@ -892,7 +892,7 @@ static void fjn_tx_timeout(struct net_de
static int fjn_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct local_info_t *lp = (struct local_info_t *)dev->priv;
+ struct local_info_t *lp = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
short length = skb->len;
@@ -966,7 +966,7 @@ static int fjn_start_xmit(struct sk_buff
static void fjn_reset(struct net_device *dev)
{
- struct local_info_t *lp = (struct local_info_t *)dev->priv;
+ struct local_info_t *lp = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
int i;
@@ -1052,7 +1052,7 @@ static void fjn_reset(struct net_device
static void fjn_rx(struct net_device *dev)
{
- struct local_info_t *lp = (struct local_info_t *)dev->priv;
+ struct local_info_t *lp = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
int boguscount = 10; /* 5 -> 10: by agy 19940922 */
@@ -1181,7 +1181,7 @@ static int fjn_config(struct net_device
static int fjn_open(struct net_device *dev)
{
- struct local_info_t *lp = (struct local_info_t *)dev->priv;
+ struct local_info_t *lp = dev->priv;
dev_link_t *link = &lp->link;
DEBUG(4, "fjn_open('%s').\n", dev->name);
@@ -1206,7 +1206,7 @@ static int fjn_open(struct net_device *d
static int fjn_close(struct net_device *dev)
{
- struct local_info_t *lp = (struct local_info_t *)dev->priv;
+ struct local_info_t *lp = dev->priv;
dev_link_t *link = &lp->link;
ioaddr_t ioaddr = dev->base_addr;
@@ -1252,7 +1252,7 @@ static struct net_device_stats *fjn_get_
static void set_rx_mode(struct net_device *dev)
{
ioaddr_t ioaddr = dev->base_addr;
- struct local_info_t *lp = (struct local_info_t *)dev->priv;
+ struct local_info_t *lp = dev->priv;
u_char mc_filter[8]; /* Multicast hash filter */
u_long flags;
int i;
diff -puN drivers/net/pcmcia/ibmtr_cs.c~net_pcmcia_casts drivers/net/pcmcia/ibmtr_cs.c
--- linux-263-229/drivers/net/pcmcia/ibmtr_cs.c~net_pcmcia_casts 2004-02-29 13:55:31.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/pcmcia/ibmtr_cs.c 2004-02-29 13:55:31.000000000 -0800
@@ -256,7 +256,7 @@ static void ibmtr_detach(dev_link_t *lin
unregister_netdev(dev);
{
- struct tok_info *ti = (struct tok_info *)dev->priv;
+ struct tok_info *ti = dev->priv;
del_timer_sync(&(ti->tr_timer));
}
if (link->state & DEV_CONFIG)
diff -puN drivers/net/pcmcia/smc91c92_cs.c~net_pcmcia_casts drivers/net/pcmcia/smc91c92_cs.c
--- linux-263-229/drivers/net/pcmcia/smc91c92_cs.c~net_pcmcia_casts 2004-02-29 13:55:31.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/pcmcia/smc91c92_cs.c 2004-02-29 13:55:31.000000000 -0800
@@ -1460,7 +1460,7 @@ static int smc_start_xmit(struct sk_buff
static void smc_tx_err(struct net_device * dev)
{
- struct smc_private *smc = (struct smc_private *)dev->priv;
+ struct smc_private *smc = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
int saved_packet = inw(ioaddr + PNR_ARR) & 0xff;
int packet_no = inw(ioaddr + FIFO_PORTS) & 0x7f;
@@ -1657,7 +1657,7 @@ irq_done:
static void smc_rx(struct net_device *dev)
{
- struct smc_private *smc = (struct smc_private *)dev->priv;
+ struct smc_private *smc = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
int rx_status;
int packet_length; /* Caution: not frame length, rather words
@@ -1725,7 +1725,7 @@ static void smc_rx(struct net_device *de
static struct net_device_stats *smc_get_stats(struct net_device *dev)
{
- struct smc_private *smc = (struct smc_private *)dev->priv;
+ struct smc_private *smc = dev->priv;
/* Nothing to update - the 91c92 is a pretty primative chip. */
return &smc->stats;
}
@@ -1830,7 +1830,7 @@ static int s9k_config(struct net_device
*/
static void smc_set_xcvr(struct net_device *dev, int if_port)
{
- struct smc_private *smc = (struct smc_private *)dev->priv;
+ struct smc_private *smc = dev->priv;
ioaddr_t ioaddr = dev->base_addr;
u_short saved_bank;
_
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove unneeded casts in net/wan/
[not found] <20040229142516.3d218ed0.rddunlap@osdl.org>
` (3 preceding siblings ...)
2004-02-29 22:38 ` [janitor] remove unneeded casts in net/pcmcia/ Randy.Dunlap
@ 2004-02-29 22:40 ` Randy.Dunlap
2004-02-29 22:42 ` [janitor] remove unneeded casts in net/wireless/ Randy.Dunlap
` (6 subsequent siblings)
11 siblings, 0 replies; 18+ messages in thread
From: Randy.Dunlap @ 2004-02-29 22:40 UTC (permalink / raw)
To: jgarzik; +Cc: netdev
From: Carlo Perassi <carlo@linux.it>
drivers/net/wan/comx-hw-locomx.c | 6 +++---
drivers/net/wan/comx-hw-munich.c | 6 +++---
drivers/net/wan/comx.c | 2 +-
drivers/net/wan/cosa.c | 2 +-
drivers/net/wan/lapbether.c | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
diff -puN drivers/net/wan/comx.c~net_wan_casts drivers/net/wan/comx.c
--- linux-263-229/drivers/net/wan/comx.c~net_wan_casts 2004-02-29 13:57:19.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/wan/comx.c 2004-02-29 13:57:19.000000000 -0800
@@ -379,7 +379,7 @@ int comx_rx(struct net_device *dev, stru
static struct net_device_stats *comx_stats(struct net_device *dev)
{
- struct comx_channel *ch = (struct comx_channel *)dev->priv;
+ struct comx_channel *ch = dev->priv;
return ch->current_stats;
}
diff -puN drivers/net/wan/comx-hw-locomx.c~net_wan_casts drivers/net/wan/comx-hw-locomx.c
--- linux-263-229/drivers/net/wan/comx-hw-locomx.c~net_wan_casts 2004-02-29 13:57:19.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/wan/comx-hw-locomx.c 2004-02-29 13:57:19.000000000 -0800
@@ -97,7 +97,7 @@ static void locomx_rx(struct z8530_chann
static int LOCOMX_send_packet(struct net_device *dev, struct sk_buff *skb)
{
- struct comx_channel *ch = (struct comx_channel *)dev->priv;
+ struct comx_channel *ch = dev->priv;
struct locomx_data *hw = ch->HW_privdata;
if (ch->debug_flags & DEBUG_HW_TX) {
@@ -376,7 +376,7 @@ static int locomx_write_proc(struct file
static int LOCOMX_init(struct net_device *dev)
{
- struct comx_channel *ch = (struct comx_channel *)dev->priv;
+ struct comx_channel *ch = dev->priv;
struct locomx_data *hw;
struct proc_dir_entry *new_file;
@@ -449,7 +449,7 @@ cleanup_HW_privdata:
static int LOCOMX_exit(struct net_device *dev)
{
- struct comx_channel *ch = (struct comx_channel *)dev->priv;
+ struct comx_channel *ch = dev->priv;
ch->HW_access_board = NULL;
ch->HW_release_board = NULL;
diff -puN drivers/net/wan/comx-hw-munich.c~net_wan_casts drivers/net/wan/comx-hw-munich.c
--- linux-263-229/drivers/net/wan/comx-hw-munich.c~net_wan_casts 2004-02-29 13:57:19.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/wan/comx-hw-munich.c 2004-02-29 13:57:19.000000000 -0800
@@ -933,7 +933,7 @@ static int slicecom_reset(struct net_dev
static int MUNICH_send_packet(struct net_device *dev, struct sk_buff *skb)
{
- struct comx_channel *ch = (struct comx_channel *)dev->priv;
+ struct comx_channel *ch = dev->priv;
struct slicecom_privdata *hw = ch->HW_privdata;
/* Send it to the debug facility too if needed: */
@@ -2656,7 +2656,7 @@ static int init_escape(struct comx_chann
static int BOARD_init(struct net_device *dev)
{
- struct comx_channel *ch = (struct comx_channel *)dev->priv;
+ struct comx_channel *ch = dev->priv;
struct slicecom_privdata *hw;
struct proc_dir_entry *new_file;
@@ -2772,7 +2772,7 @@ static int BOARD_init(struct net_device
*/
static int BOARD_exit(struct net_device *dev)
{
- struct comx_channel *ch = (struct comx_channel *)dev->priv;
+ struct comx_channel *ch = dev->priv;
/* Free private data area */
// board = hw->boardnum + (ch->hardware == &pcicomhw ? pcicom_boards : slicecom_boards);
diff -puN drivers/net/wan/cosa.c~net_wan_casts drivers/net/wan/cosa.c
--- linux-263-229/drivers/net/wan/cosa.c~net_wan_casts 2004-02-29 13:57:19.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/wan/cosa.c 2004-02-29 13:57:19.000000000 -0800
@@ -1205,7 +1205,7 @@ static int cosa_sppp_ioctl(struct net_de
int cmd)
{
int rv;
- struct channel_data *chan = (struct channel_data *)dev->priv;
+ struct channel_data *chan = dev->priv;
rv = cosa_ioctl_common(chan->cosa, chan, cmd, (unsigned long)ifr->ifr_data);
if (rv == -ENOIOCTLCMD) {
return sppp_do_ioctl(dev, ifr, cmd);
diff -puN drivers/net/wan/lapbether.c~net_wan_casts drivers/net/wan/lapbether.c
--- linux-263-229/drivers/net/wan/lapbether.c~net_wan_casts 2004-02-29 13:57:19.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/wan/lapbether.c 2004-02-29 13:57:19.000000000 -0800
@@ -269,7 +269,7 @@ static void lapbeth_disconnected(struct
*/
static struct net_device_stats *lapbeth_get_stats(struct net_device *dev)
{
- struct lapbethdev *lapbeth = (struct lapbethdev *)dev->priv;
+ struct lapbethdev *lapbeth = dev->priv;
return &lapbeth->stats;
}
_
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove unneeded casts in net/wireless/
[not found] <20040229142516.3d218ed0.rddunlap@osdl.org>
` (4 preceding siblings ...)
2004-02-29 22:40 ` [janitor] remove unneeded casts in net/wan/ Randy.Dunlap
@ 2004-02-29 22:42 ` Randy.Dunlap
2004-02-29 22:53 ` [janitor] remove unneeded casts in lance drivers Randy.Dunlap
` (5 subsequent siblings)
11 siblings, 0 replies; 18+ messages in thread
From: Randy.Dunlap @ 2004-02-29 22:42 UTC (permalink / raw)
To: jgarzik; +Cc: netdev
From: Carlo Perassi <carlo@linux.it>
drivers/net/wireless/atmel.c | 8 ++++----
drivers/net/wireless/orinoco.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff -puN drivers/net/wireless/atmel.c~net_wireless_casts drivers/net/wireless/atmel.c
--- linux-263-229/drivers/net/wireless/atmel.c~net_wireless_casts 2004-02-29 13:57:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/wireless/atmel.c 2004-02-29 13:57:33.000000000 -0800
@@ -796,7 +796,7 @@ static void tx_update_descriptor(struct
static int start_tx (struct sk_buff *skb, struct net_device *dev)
{
- struct atmel_private *priv = (struct atmel_private *)dev->priv;
+ struct atmel_private *priv = dev->priv;
struct ieee802_11_hdr header;
unsigned long flags;
u16 buff, frame_ctl, len = (ETH_ZLEN < skb->len) ? skb->len : ETH_ZLEN;
@@ -1234,13 +1234,13 @@ static irqreturn_t service_interrupt(int
static struct net_device_stats *atmel_get_stats (struct net_device *dev)
{
- struct atmel_private *priv = (struct atmel_private *)dev->priv;
+ struct atmel_private *priv = dev->priv;
return &priv->stats;
}
static struct iw_statistics *atmel_get_wireless_stats (struct net_device *dev)
{
- struct atmel_private *priv = (struct atmel_private *)dev->priv;
+ struct atmel_private *priv = dev->priv;
/* update the link quality here in case we are seeing no beacons
at all to drive the process */
@@ -3053,7 +3053,7 @@ static void atmel_management_frame(struc
static void atmel_management_timer(u_long a)
{
struct net_device *dev = (struct net_device *) a;
- struct atmel_private *priv = (struct atmel_private *)dev->priv;
+ struct atmel_private *priv = dev->priv;
unsigned long flags;
/* Check if the card has been yanked. */
diff -puN drivers/net/wireless/orinoco.c~net_wireless_casts drivers/net/wireless/orinoco.c
--- linux-263-229/drivers/net/wireless/orinoco.c~net_wireless_casts 2004-02-29 13:57:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/wireless/orinoco.c 2004-02-29 13:57:33.000000000 -0800
@@ -2271,7 +2271,7 @@ orinoco_get_wireless_stats(struct net_de
static inline void orinoco_spy_gather(struct net_device *dev, u_char *mac,
int level, int noise)
{
- struct orinoco_private *priv = (struct orinoco_private *)dev->priv;
+ struct orinoco_private *priv = dev->priv;
int i;
/* Gather wireless spy statistics: for each packet, compare the
@@ -2290,7 +2290,7 @@ orinoco_stat_gather(struct net_device *d
struct sk_buff *skb,
struct hermes_rx_descriptor *desc)
{
- struct orinoco_private *priv = (struct orinoco_private *)dev->priv;
+ struct orinoco_private *priv = dev->priv;
/* Using spy support with lots of Rx packets, like in an
* infrastructure (AP), will really slow down everything, because
@@ -2311,7 +2311,7 @@ orinoco_stat_gather(struct net_device *d
static int
orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct orinoco_private *priv = (struct orinoco_private *)dev->priv;
+ struct orinoco_private *priv = dev->priv;
struct net_device_stats *stats = &priv->stats;
hermes_t *hw = &priv->hw;
int err = 0;
@@ -2449,7 +2449,7 @@ orinoco_xmit(struct sk_buff *skb, struct
static void
orinoco_tx_timeout(struct net_device *dev)
{
- struct orinoco_private *priv = (struct orinoco_private *)dev->priv;
+ struct orinoco_private *priv = dev->priv;
struct net_device_stats *stats = &priv->stats;
struct hermes *hw = &priv->hw;
_
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove unneeded casts in lance drivers
[not found] <20040229142516.3d218ed0.rddunlap@osdl.org>
` (5 preceding siblings ...)
2004-02-29 22:42 ` [janitor] remove unneeded casts in net/wireless/ Randy.Dunlap
@ 2004-02-29 22:53 ` Randy.Dunlap
2004-02-29 22:54 ` [janitor] remove unneeded casts in 3com drivers Randy.Dunlap
` (4 subsequent siblings)
11 siblings, 0 replies; 18+ messages in thread
From: Randy.Dunlap @ 2004-02-29 22:53 UTC (permalink / raw)
To: jgarzik; +Cc: netdev
From: Carlo Perassi <carlo@linux.it>
drivers/net/7990.c | 8 ++++----
drivers/net/a2065.c | 6 +++---
drivers/net/atari_pamsnet.c | 12 ++++++------
drivers/net/bagetlance.c | 2 +-
drivers/net/declance.c | 2 +-
drivers/net/hplance.c | 4 ++--
drivers/net/sun3lance.c | 14 +++++++-------
drivers/net/sunlance.c | 4 ++--
8 files changed, 26 insertions(+), 26 deletions(-)
diff -puN drivers/net/7990.c~net_lance_casts drivers/net/7990.c
--- linux-263-229/drivers/net/7990.c~net_lance_casts 2004-02-29 14:02:29.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/7990.c 2004-02-29 14:02:29.000000000 -0800
@@ -216,7 +216,7 @@ static int init_restart_lance (struct la
static int lance_reset (struct net_device *dev)
{
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
int status;
DECLARE_LL;
@@ -401,7 +401,7 @@ static irqreturn_t
lance_interrupt (int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *)dev_id;
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
int csr0;
DECLARE_LL;
@@ -457,7 +457,7 @@ lance_interrupt (int irq, void *dev_id,
int lance_open (struct net_device *dev)
{
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
int res;
DECLARE_LL;
@@ -499,7 +499,7 @@ void lance_tx_timeout(struct net_device
int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
{
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
volatile struct lance_init_block *ib = lp->init_block;
int entry, skblen, len;
static int outs;
diff -puN drivers/net/a2065.c~net_lance_casts drivers/net/a2065.c
--- linux-263-229/drivers/net/a2065.c~net_lance_casts 2004-02-29 14:02:29.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/a2065.c 2004-02-29 14:02:29.000000000 -0800
@@ -481,7 +481,7 @@ struct net_device *last_dev = 0;
static int lance_open (struct net_device *dev)
{
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
volatile struct lance_regs *ll = lp->ll;
int ret;
@@ -522,7 +522,7 @@ static int lance_close (struct net_devic
static inline int lance_reset (struct net_device *dev)
{
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
volatile struct lance_regs *ll = lp->ll;
int status;
@@ -556,7 +556,7 @@ static void lance_tx_timeout(struct net_
static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
{
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
volatile struct lance_regs *ll = lp->ll;
volatile struct lance_init_block *ib = lp->init_block;
int entry, skblen, len;
diff -puN drivers/net/atari_pamsnet.c~net_lance_casts drivers/net/atari_pamsnet.c
--- linux-263-229/drivers/net/atari_pamsnet.c~net_lance_casts 2004-02-29 14:02:29.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/atari_pamsnet.c 2004-02-29 14:02:29.000000000 -0800
@@ -667,7 +667,7 @@ struct net_device * __init pamsnet_probe
*/
static int
pamsnet_open(struct net_device *dev) {
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if (pamsnet_debug > 0)
printk("pamsnet_open\n");
@@ -696,7 +696,7 @@ pamsnet_open(struct net_device *dev) {
static int
pamsnet_send_packet(struct sk_buff *skb, struct net_device *dev) {
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned long flags;
/* Block a timer-based transmit from overlapping. This could better be
@@ -742,7 +742,7 @@ pamsnet_send_packet(struct sk_buff *skb,
*/
static void
pamsnet_poll_rx(struct net_device *dev) {
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int boguscount;
int pkt_len;
struct sk_buff *skb;
@@ -817,7 +817,7 @@ pamsnet_poll_rx(struct net_device *dev)
static void
pamsnet_tick(unsigned long data) {
struct net_device *dev = (struct net_device *)data;
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if( pamsnet_debug > 0 && (lp->open_time++ & 7) == 8 )
printk("pamsnet_tick: %ld\n", lp->open_time);
@@ -832,7 +832,7 @@ pamsnet_tick(unsigned long data) {
*/
static int
pamsnet_close(struct net_device *dev) {
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if (pamsnet_debug > 0)
printk("pamsnet_close, open_time=%ld\n", lp->open_time);
@@ -859,7 +859,7 @@ pamsnet_close(struct net_device *dev) {
*/
static struct net_device_stats *net_get_stats(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
return &lp->stats;
}
diff -puN drivers/net/bagetlance.c~net_lance_casts drivers/net/bagetlance.c
--- linux-263-229/drivers/net/bagetlance.c~net_lance_casts 2004-02-29 14:02:29.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/bagetlance.c 2004-02-29 14:02:29.000000000 -0800
@@ -1247,7 +1247,7 @@ static int lance_close( struct net_devic
static struct net_device_stats *lance_get_stats( struct net_device *dev )
{
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
return &lp->stats;
}
diff -puN drivers/net/declance.c~net_lance_casts drivers/net/declance.c
--- linux-263-229/drivers/net/declance.c~net_lance_casts 2004-02-29 14:02:29.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/declance.c 2004-02-29 14:02:29.000000000 -0800
@@ -1287,7 +1287,7 @@ static void __exit dec_lance_cleanup(voi
{
while (root_lance_dev) {
struct net_device *dev = root_lance_dev;
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
unregister_netdev(dev);
#ifdef CONFIG_TC
if (lp->slot >= 0)
diff -puN drivers/net/hplance.c~net_lance_casts drivers/net/hplance.c
--- linux-263-229/drivers/net/hplance.c~net_lance_casts 2004-02-29 14:02:29.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/hplance.c 2004-02-29 14:02:29.000000000 -0800
@@ -195,7 +195,7 @@ static unsigned short hplance_readrdp(vo
static int hplance_open(struct net_device *dev)
{
int status;
- struct hplance_private *lp = (struct hplance_private *)dev->priv;
+ struct hplance_private *lp = dev->priv;
struct hplance_reg *hpregs = (struct hplance_reg *)lp->base;
status = lance_open(dev); /* call generic lance open code */
@@ -209,7 +209,7 @@ static int hplance_open(struct net_devic
static int hplance_close(struct net_device *dev)
{
- struct hplance_private *lp = (struct hplance_private *)dev->priv;
+ struct hplance_private *lp = dev->priv;
struct hplance_reg *hpregs = (struct hplance_reg *)lp->base;
out_8(&(hpregs->status), 8); /* disable interrupts at boardlevel */
lance_close(dev);
diff -puN drivers/net/sun3lance.c~net_lance_casts drivers/net/sun3lance.c
--- linux-263-229/drivers/net/sun3lance.c~net_lance_casts 2004-02-29 14:02:29.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/sun3lance.c 2004-02-29 14:02:29.000000000 -0800
@@ -402,7 +402,7 @@ static int __init lance_probe( struct ne
static int lance_open( struct net_device *dev )
{
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
int i;
DPRINTK( 2, ( "%s: lance_open()\n", dev->name ));
@@ -439,7 +439,7 @@ static int lance_open( struct net_device
static void lance_init_ring( struct net_device *dev )
{
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
int i;
lp->lock = 0;
@@ -499,7 +499,7 @@ static void lance_init_ring( struct net_
static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
{
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
int entry, len;
struct lance_tx_head *head;
unsigned long flags;
@@ -772,7 +772,7 @@ static irqreturn_t lance_interrupt( int
/* get packet, toss into skbuff */
static int lance_rx( struct net_device *dev )
{
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
int entry = lp->new_rx;
/* If we own the next entry, it's a new packet. Send it up. */
@@ -870,7 +870,7 @@ static int lance_rx( struct net_device *
static int lance_close( struct net_device *dev )
{
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
netif_stop_queue(dev);
@@ -888,7 +888,7 @@ static int lance_close( struct net_devic
static struct net_device_stats *lance_get_stats( struct net_device *dev )
{
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
return &lp->stats;
}
@@ -904,7 +904,7 @@ static struct net_device_stats *lance_ge
/* completely untested on a sun3 */
static void set_multicast_list( struct net_device *dev )
{
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
if(netif_queue_stopped(dev))
/* Only possible if board is already started */
diff -puN drivers/net/sunlance.c~net_lance_casts drivers/net/sunlance.c
--- linux-263-229/drivers/net/sunlance.c~net_lance_casts 2004-02-29 14:02:29.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/sunlance.c 2004-02-29 14:02:29.000000000 -0800
@@ -816,7 +816,7 @@ out:
static irqreturn_t lance_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *)dev_id;
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
int csr0;
sbus_writew(LE_CSR0, lp->lregs + RAP);
@@ -915,7 +915,7 @@ struct net_device *last_dev = 0;
static int lance_open(struct net_device *dev)
{
- struct lance_private *lp = (struct lance_private *)dev->priv;
+ struct lance_private *lp = dev->priv;
volatile struct lance_init_block *ib = lp->init_block;
int status = 0;
_
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove unneeded casts in 3com drivers
[not found] <20040229142516.3d218ed0.rddunlap@osdl.org>
` (6 preceding siblings ...)
2004-02-29 22:53 ` [janitor] remove unneeded casts in lance drivers Randy.Dunlap
@ 2004-02-29 22:54 ` Randy.Dunlap
2004-02-29 22:56 ` [janitor] remove unneeded casts in intel-ee drivers Randy.Dunlap
` (3 subsequent siblings)
11 siblings, 0 replies; 18+ messages in thread
From: Randy.Dunlap @ 2004-02-29 22:54 UTC (permalink / raw)
To: jgarzik; +Cc: netdev
From: Carlo Perassi <carlo@linux.it>
drivers/net/3c501.c | 12 ++++++------
drivers/net/3c507.c | 10 +++++-----
drivers/net/3c509.c | 16 ++++++++--------
drivers/net/3c59x.c | 42 +++++++++++++++++++++---------------------
4 files changed, 40 insertions(+), 40 deletions(-)
diff -puN drivers/net/3c501.c~net_3cxyz_casts drivers/net/3c501.c
--- linux-263-229/drivers/net/3c501.c~net_3cxyz_casts 2004-02-29 14:02:48.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/3c501.c 2004-02-29 14:02:48.000000000 -0800
@@ -341,7 +341,7 @@ static int el_open(struct net_device *de
{
int retval;
int ioaddr = dev->base_addr;
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned long flags;
if (el_debug > 2)
@@ -371,7 +371,7 @@ static int el_open(struct net_device *de
static void el_timeout(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int ioaddr = dev->base_addr;
if (el_debug)
@@ -411,7 +411,7 @@ static void el_timeout(struct net_device
static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int ioaddr = dev->base_addr;
unsigned long flags;
@@ -698,7 +698,7 @@ out:
static void el_receive(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int ioaddr = dev->base_addr;
int pkt_len;
struct sk_buff *skb;
@@ -764,7 +764,7 @@ static void el_receive(struct net_device
static void el_reset(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int ioaddr = dev->base_addr;
if (el_debug> 2)
@@ -828,7 +828,7 @@ static int el1_close(struct net_device *
static struct net_device_stats *el1_get_stats(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
return &lp->stats;
}
diff -puN drivers/net/3c507.c~net_3cxyz_casts drivers/net/3c507.c
--- linux-263-229/drivers/net/3c507.c~net_3cxyz_casts 2004-02-29 14:02:48.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/3c507.c 2004-02-29 14:02:48.000000000 -0800
@@ -660,7 +660,7 @@ static int el16_close(struct net_device
closed. */
static struct net_device_stats *el16_get_stats(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
/* ToDo: decide if there are any useful statistics from the SCB. */
@@ -670,7 +670,7 @@ static struct net_device_stats *el16_get
/* Initialize the Rx-block list. */
static void init_rx_bufs(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned long write_ptr;
unsigned short SCB_base = SCB_BASE;
@@ -713,7 +713,7 @@ static void init_rx_bufs(struct net_devi
static void init_82586_mem(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
short ioaddr = dev->base_addr;
unsigned long shmem = dev->mem_start;
@@ -771,7 +771,7 @@ static void init_82586_mem(struct net_de
static void hardware_send_packet(struct net_device *dev, void *buf, short length, short pad)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
short ioaddr = dev->base_addr;
ushort tx_block = lp->tx_head;
unsigned long write_ptr = dev->mem_start + tx_block;
@@ -820,7 +820,7 @@ static void hardware_send_packet(struct
static void el16_rx(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned long shmem = dev->mem_start;
ushort rx_head = lp->rx_head;
ushort rx_tail = lp->rx_tail;
diff -puN drivers/net/3c509.c~net_3cxyz_casts drivers/net/3c509.c
--- linux-263-229/drivers/net/3c509.c~net_3cxyz_casts 2004-02-29 14:02:48.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/3c509.c 2004-02-29 14:02:48.000000000 -0800
@@ -829,7 +829,7 @@ el3_open(struct net_device *dev)
static void
el3_tx_timeout (struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
int ioaddr = dev->base_addr;
/* Transmitter timeout, serious problems. */
@@ -849,7 +849,7 @@ el3_tx_timeout (struct net_device *dev)
static int
el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
int ioaddr = dev->base_addr;
unsigned long flags;
@@ -975,7 +975,7 @@ el3_interrupt(int irq, void *dev_id, str
outw(AckIntr | RxEarly, ioaddr + EL3_CMD);
}
if (status & TxComplete) { /* Really Tx error. */
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
short tx_status;
int i = 4;
@@ -1022,7 +1022,7 @@ el3_interrupt(int irq, void *dev_id, str
static struct net_device_stats *
el3_get_stats(struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
unsigned long flags;
/*
@@ -1043,7 +1043,7 @@ el3_get_stats(struct net_device *dev)
*/
static void update_stats(struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
int ioaddr = dev->base_addr;
if (el3_debug > 5)
@@ -1073,7 +1073,7 @@ static void update_stats(struct net_devi
static int
el3_rx(struct net_device *dev)
{
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
int ioaddr = dev->base_addr;
short rx_status;
@@ -1145,7 +1145,7 @@ static void
set_multicast_list(struct net_device *dev)
{
unsigned long flags;
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
int ioaddr = dev->base_addr;
if (el3_debug > 1) {
@@ -1172,7 +1172,7 @@ static int
el3_close(struct net_device *dev)
{
int ioaddr = dev->base_addr;
- struct el3_private *lp = (struct el3_private *)dev->priv;
+ struct el3_private *lp = dev->priv;
if (el3_debug > 2)
printk("%s: Shutting down ethercard.\n", dev->name);
diff -puN drivers/net/3c59x.c~net_3cxyz_casts drivers/net/3c59x.c
--- linux-263-229/drivers/net/3c59x.c~net_3cxyz_casts 2004-02-29 14:02:48.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/3c59x.c 2004-02-29 14:02:48.000000000 -0800
@@ -1516,7 +1516,7 @@ static void
vortex_up(struct net_device *dev)
{
long ioaddr = dev->base_addr;
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
unsigned int config;
int i;
@@ -1714,7 +1714,7 @@ vortex_up(struct net_device *dev)
static int
vortex_open(struct net_device *dev)
{
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
int i;
int retval;
@@ -1772,7 +1772,7 @@ static void
vortex_timer(unsigned long data)
{
struct net_device *dev = (struct net_device *)data;
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
long ioaddr = dev->base_addr;
int next_tick = 60*HZ;
int ok = 0;
@@ -1898,7 +1898,7 @@ leave_media_alone:
static void vortex_tx_timeout(struct net_device *dev)
{
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
long ioaddr = dev->base_addr;
printk(KERN_ERR "%s: transmit timed out, tx_status %2.2x status %4.4x.\n",
@@ -1968,7 +1968,7 @@ static void vortex_tx_timeout(struct net
static void
vortex_error(struct net_device *dev, int status)
{
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
long ioaddr = dev->base_addr;
int do_tx_reset = 0, reset_mask = 0;
unsigned char tx_status = 0;
@@ -2070,7 +2070,7 @@ vortex_error(struct net_device *dev, int
static int
vortex_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
long ioaddr = dev->base_addr;
/* Put out the doubleword header... */
@@ -2125,7 +2125,7 @@ vortex_start_xmit(struct sk_buff *skb, s
static int
boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
long ioaddr = dev->base_addr;
/* Calculate the next Tx descriptor entry. */
int entry = vp->cur_tx % TX_RING_SIZE;
@@ -2225,7 +2225,7 @@ static irqreturn_t
vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = dev_id;
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
long ioaddr;
int status;
int work_done = max_interrupt_work;
@@ -2330,7 +2330,7 @@ static irqreturn_t
boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = dev_id;
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
long ioaddr;
int status;
int work_done = max_interrupt_work;
@@ -2455,7 +2455,7 @@ handler_exit:
static int vortex_rx(struct net_device *dev)
{
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
long ioaddr = dev->base_addr;
int i;
short rx_status;
@@ -2525,7 +2525,7 @@ static int vortex_rx(struct net_device *
static int
boomerang_rx(struct net_device *dev)
{
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
int entry = vp->cur_rx % RX_RING_SIZE;
long ioaddr = dev->base_addr;
int rx_status;
@@ -2627,7 +2627,7 @@ static void
rx_oom_timer(unsigned long arg)
{
struct net_device *dev = (struct net_device *)arg;
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
spin_lock_irq(&vp->lock);
if ((vp->cur_rx - vp->dirty_rx) == RX_RING_SIZE) /* This test is redundant, but makes me feel good */
@@ -2642,7 +2642,7 @@ rx_oom_timer(unsigned long arg)
static void
vortex_down(struct net_device *dev)
{
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
long ioaddr = dev->base_addr;
netif_stop_queue (dev);
@@ -2678,7 +2678,7 @@ vortex_down(struct net_device *dev)
static int
vortex_close(struct net_device *dev)
{
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
long ioaddr = dev->base_addr;
int i;
@@ -2740,7 +2740,7 @@ static void
dump_tx_ring(struct net_device *dev)
{
if (vortex_debug > 0) {
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
long ioaddr = dev->base_addr;
if (vp->full_bus_master_tx) {
@@ -2773,7 +2773,7 @@ dump_tx_ring(struct net_device *dev)
static struct net_device_stats *vortex_get_stats(struct net_device *dev)
{
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
unsigned long flags;
if (netif_device_present(dev)) { /* AKPM: Used to be netif_running */
@@ -2793,7 +2793,7 @@ static struct net_device_stats *vortex_g
*/
static void update_stats(long ioaddr, struct net_device *dev)
{
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
int old_window = inw(ioaddr + EL3_CMD);
if (old_window == 0xffff) /* Chip suspended or ejected. */
@@ -2855,7 +2855,7 @@ static struct ethtool_ops vortex_ethtool
static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
long ioaddr = dev->base_addr;
struct mii_ioctl_data *data = (struct mii_ioctl_data *)&rq->ifr_data;
int phy = vp->phys[0] & 0x1f;
@@ -2942,7 +2942,7 @@ static void mdio_sync(long ioaddr, int b
static int mdio_read(struct net_device *dev, int phy_id, int location)
{
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
int i;
long ioaddr = dev->base_addr;
int read_cmd = (0xf6 << 10) | (phy_id << 5) | location;
@@ -2976,7 +2976,7 @@ static int mdio_read(struct net_device *
static void mdio_write(struct net_device *dev, int phy_id, int location, int value)
{
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
long ioaddr = dev->base_addr;
int write_cmd = 0x50020000 | (phy_id << 23) | (location << 18) | value;
long mdio_addr = ioaddr + Wn4_PhysicalMgmt;
@@ -3010,7 +3010,7 @@ static void mdio_write(struct net_device
/* Set Wake-On-LAN mode and put the board into D3 (power-down) state. */
static void acpi_set_WOL(struct net_device *dev)
{
- struct vortex_private *vp = (struct vortex_private *)dev->priv;
+ struct vortex_private *vp = dev->priv;
long ioaddr = dev->base_addr;
/* Power up on: 1==Downloaded Filter, 2==Magic Packets, 4==Link Status. */
_
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove unneeded casts in intel-ee drivers
[not found] <20040229142516.3d218ed0.rddunlap@osdl.org>
` (7 preceding siblings ...)
2004-02-29 22:54 ` [janitor] remove unneeded casts in 3com drivers Randy.Dunlap
@ 2004-02-29 22:56 ` Randy.Dunlap
2004-02-29 22:57 ` [janitor] remove unneeded casts in generic drivers/net/ Randy.Dunlap
` (2 subsequent siblings)
11 siblings, 0 replies; 18+ messages in thread
From: Randy.Dunlap @ 2004-02-29 22:56 UTC (permalink / raw)
To: jgarzik; +Cc: netdev
From: Carlo Perassi <carlo@linux.it>
drivers/net/82596.c | 6 +++---
drivers/net/eepro.c | 16 ++++++++--------
drivers/net/eepro100.c | 42 +++++++++++++++++++++---------------------
drivers/net/eexpress.c | 28 ++++++++++++++--------------
drivers/net/lasi_82596.c | 6 +++---
5 files changed, 49 insertions(+), 49 deletions(-)
diff -puN drivers/net/82596.c~net_intel_casts drivers/net/82596.c
--- linux-263-229/drivers/net/82596.c~net_intel_casts 2004-02-29 14:02:15.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/82596.c 2004-02-29 14:02:15.000000000 -0800
@@ -528,7 +528,7 @@ static irqreturn_t i596_error(int irq, v
static inline void init_rx_bufs(struct net_device *dev)
{
- struct i596_private *lp = (struct i596_private *)dev->priv;
+ struct i596_private *lp = dev->priv;
int i;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
@@ -579,7 +579,7 @@ static inline void init_rx_bufs(struct n
static inline void remove_rx_bufs(struct net_device *dev)
{
- struct i596_private *lp = (struct i596_private *)dev->priv;
+ struct i596_private *lp = dev->priv;
struct i596_rbd *rbd;
int i;
@@ -765,7 +765,7 @@ failed:
static inline int i596_rx(struct net_device *dev)
{
- struct i596_private *lp = (struct i596_private *)dev->priv;
+ struct i596_private *lp = dev->priv;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
int frames = 0;
diff -puN drivers/net/eepro100.c~net_intel_casts drivers/net/eepro100.c
--- linux-263-229/drivers/net/eepro100.c~net_intel_casts 2004-02-29 14:02:15.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/eepro100.c 2004-02-29 14:02:15.000000000 -0800
@@ -995,7 +995,7 @@ static void mdio_write(struct net_device
static int
speedo_open(struct net_device *dev)
{
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
long ioaddr = dev->base_addr;
int retval;
@@ -1194,7 +1194,7 @@ speedo_rx_soft_reset(struct net_device *
static void speedo_timer(unsigned long data)
{
struct net_device *dev = (struct net_device *)data;
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
long ioaddr = dev->base_addr;
int phy_num = sp->phy[0] & 0x1f;
@@ -1239,7 +1239,7 @@ static void speedo_timer(unsigned long d
static void speedo_show_state(struct net_device *dev)
{
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
int i;
if (netif_msg_pktdata(sp)) {
@@ -1282,7 +1282,7 @@ static void speedo_show_state(struct net
static void
speedo_init_rx_ring(struct net_device *dev)
{
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
struct RxFD *rxf, *last_rxf = NULL;
dma_addr_t last_rxf_dma = 0 /* to shut up the compiler */;
int i;
@@ -1330,7 +1330,7 @@ speedo_init_rx_ring(struct net_device *d
static void speedo_purge_tx(struct net_device *dev)
{
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
int entry;
while ((int)(sp->cur_tx - sp->dirty_tx) > 0) {
@@ -1362,7 +1362,7 @@ static void speedo_purge_tx(struct net_d
static void reset_mii(struct net_device *dev)
{
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
/* Reset the MII transceiver, suggested by Fred Young @ scalable.com. */
if ((sp->phy[0] & 0x8000) == 0) {
@@ -1385,7 +1385,7 @@ static void reset_mii(struct net_device
static void speedo_tx_timeout(struct net_device *dev)
{
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
long ioaddr = dev->base_addr;
int status = inw(ioaddr + SCBStatus);
unsigned long flags;
@@ -1447,7 +1447,7 @@ static void speedo_tx_timeout(struct net
static int
speedo_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
long ioaddr = dev->base_addr;
int entry;
@@ -1518,7 +1518,7 @@ speedo_start_xmit(struct sk_buff *skb, s
static void speedo_tx_buffer_gc(struct net_device *dev)
{
unsigned int dirty_tx;
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
dirty_tx = sp->dirty_tx;
while ((int)(sp->cur_tx - dirty_tx) > 0) {
@@ -1677,7 +1677,7 @@ static irqreturn_t speedo_interrupt(int
static inline struct RxFD *speedo_rx_alloc(struct net_device *dev, int entry)
{
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
struct RxFD *rxf;
struct sk_buff *skb;
/* Get a fresh skbuff to replace the consumed one. */
@@ -1704,7 +1704,7 @@ static inline struct RxFD *speedo_rx_all
static inline void speedo_rx_link(struct net_device *dev, int entry,
struct RxFD *rxf, dma_addr_t rxf_dma)
{
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
rxf->status = cpu_to_le32(0xC0000001); /* '1' for driver use only. */
rxf->link = 0; /* None yet. */
rxf->count = cpu_to_le32(PKT_BUF_SZ << 16);
@@ -1718,7 +1718,7 @@ static inline void speedo_rx_link(struct
static int speedo_refill_rx_buf(struct net_device *dev, int force)
{
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
int entry;
struct RxFD *rxf;
@@ -1760,7 +1760,7 @@ static int speedo_refill_rx_buf(struct n
static void speedo_refill_rx_buffers(struct net_device *dev, int force)
{
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
/* Refill the RX ring. */
while ((int)(sp->cur_rx - sp->dirty_rx) > 0 &&
@@ -1770,7 +1770,7 @@ static void speedo_refill_rx_buffers(str
static int
speedo_rx(struct net_device *dev)
{
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
int entry = sp->cur_rx % RX_RING_SIZE;
int rx_work_limit = sp->dirty_rx + RX_RING_SIZE - sp->cur_rx;
int alloc_ok = 1;
@@ -1884,7 +1884,7 @@ static int
speedo_close(struct net_device *dev)
{
long ioaddr = dev->base_addr;
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
int i;
netdevice_stop(dev);
@@ -1962,7 +1962,7 @@ speedo_close(struct net_device *dev)
static struct net_device_stats *
speedo_get_stats(struct net_device *dev)
{
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
long ioaddr = dev->base_addr;
/* Update only if the previous dump finished. */
@@ -2070,7 +2070,7 @@ static int netdev_ethtool_ioctl(struct n
static int speedo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
struct mii_ioctl_data *data = (struct mii_ioctl_data *)&rq->ifr_data;
int phy = sp->phy[0] & 0x1f;
int saved_acpi;
@@ -2121,7 +2121,7 @@ static int speedo_ioctl(struct net_devic
*/
static void set_rx_mode(struct net_device *dev)
{
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
long ioaddr = dev->base_addr;
struct descriptor *last_cmd;
char new_rx_mode;
@@ -2313,7 +2313,7 @@ static void set_rx_mode(struct net_devic
static int eepro100_suspend(struct pci_dev *pdev, u32 state)
{
struct net_device *dev = pci_get_drvdata (pdev);
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
long ioaddr = dev->base_addr;
pci_save_state(pdev, sp->pm_state);
@@ -2333,7 +2333,7 @@ static int eepro100_suspend(struct pci_d
static int eepro100_resume(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata (pdev);
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
long ioaddr = dev->base_addr;
pci_restore_state(pdev, sp->pm_state);
@@ -2363,7 +2363,7 @@ static int eepro100_resume(struct pci_de
static void __devexit eepro100_remove_one (struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata (pdev);
- struct speedo_private *sp = (struct speedo_private *)dev->priv;
+ struct speedo_private *sp = dev->priv;
unregister_netdev(dev);
diff -puN drivers/net/eepro.c~net_intel_casts drivers/net/eepro.c
--- linux-263-229/drivers/net/eepro.c~net_intel_casts 2004-02-29 14:02:15.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/eepro.c 2004-02-29 14:02:15.000000000 -0800
@@ -932,7 +932,7 @@ static int eepro_open(struct net_device
unsigned short temp_reg, old8, old9;
int irqMask;
int i, ioaddr = dev->base_addr;
- struct eepro_local *lp = (struct eepro_local *)dev->priv;
+ struct eepro_local *lp = dev->priv;
if (net_debug > 3)
printk(KERN_DEBUG "%s: entering eepro_open routine.\n", dev->name);
@@ -1122,7 +1122,7 @@ static void eepro_tx_timeout (struct net
static int eepro_send_packet(struct sk_buff *skb, struct net_device *dev)
{
- struct eepro_local *lp = (struct eepro_local *)dev->priv;
+ struct eepro_local *lp = dev->priv;
unsigned long flags;
int ioaddr = dev->base_addr;
short length = skb->len;
@@ -1235,7 +1235,7 @@ eepro_interrupt(int irq, void *dev_id, s
static int eepro_close(struct net_device *dev)
{
- struct eepro_local *lp = (struct eepro_local *)dev->priv;
+ struct eepro_local *lp = dev->priv;
int ioaddr = dev->base_addr;
short temp_reg;
@@ -1280,7 +1280,7 @@ static int eepro_close(struct net_device
static struct net_device_stats *
eepro_get_stats(struct net_device *dev)
{
- struct eepro_local *lp = (struct eepro_local *)dev->priv;
+ struct eepro_local *lp = dev->priv;
return &lp->stats;
}
@@ -1290,7 +1290,7 @@ eepro_get_stats(struct net_device *dev)
static void
set_multicast_list(struct net_device *dev)
{
- struct eepro_local *lp = (struct eepro_local *)dev->priv;
+ struct eepro_local *lp = dev->priv;
short ioaddr = dev->base_addr;
unsigned short mode;
struct dev_mc_list *dmi=dev->mc_list;
@@ -1468,7 +1468,7 @@ read_eeprom(int ioaddr, int location, st
static int
hardware_send_packet(struct net_device *dev, void *buf, short length)
{
- struct eepro_local *lp = (struct eepro_local *)dev->priv;
+ struct eepro_local *lp = dev->priv;
short ioaddr = dev->base_addr;
unsigned status, tx_available, last, end;
@@ -1553,7 +1553,7 @@ hardware_send_packet(struct net_device *
static void
eepro_rx(struct net_device *dev)
{
- struct eepro_local *lp = (struct eepro_local *)dev->priv;
+ struct eepro_local *lp = dev->priv;
short ioaddr = dev->base_addr;
short boguscount = 20;
short rcv_car = lp->rx_start;
@@ -1651,7 +1651,7 @@ eepro_rx(struct net_device *dev)
static void
eepro_transmit_interrupt(struct net_device *dev)
{
- struct eepro_local *lp = (struct eepro_local *)dev->priv;
+ struct eepro_local *lp = dev->priv;
short ioaddr = dev->base_addr;
short boguscount = 25;
short xmt_status;
diff -puN drivers/net/eexpress.c~net_intel_casts drivers/net/eexpress.c
--- linux-263-229/drivers/net/eexpress.c~net_intel_casts 2004-02-29 14:02:15.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/eexpress.c 2004-02-29 14:02:15.000000000 -0800
@@ -452,7 +452,7 @@ static int eexp_open(struct net_device *
{
int ret;
unsigned short ioaddr = dev->base_addr;
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
#if NET_DEBUG > 6
printk(KERN_DEBUG "%s: eexp_open()\n", dev->name);
@@ -541,7 +541,7 @@ static int eexp_close(struct net_device
static struct net_device_stats *eexp_stats(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
return &lp->stats;
}
@@ -553,7 +553,7 @@ static struct net_device_stats *eexp_sta
static void unstick_cu(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned short ioaddr = dev->base_addr;
if (lp->started)
@@ -627,7 +627,7 @@ static void unstick_cu(struct net_device
static void eexp_timeout(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
#ifdef CONFIG_SMP
unsigned long flags;
#endif
@@ -667,7 +667,7 @@ static void eexp_timeout(struct net_devi
*/
static int eexp_xmit(struct sk_buff *buf, struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
short length = buf->len;
#ifdef CONFIG_SMP
unsigned long flags;
@@ -728,7 +728,7 @@ static unsigned short eexp_start_irq(str
unsigned short status)
{
unsigned short ack_cmd = SCB_ack(status);
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned short ioaddr = dev->base_addr;
if ((dev->flags & IFF_UP) && !(lp->started & STARTED_CU)) {
short diag_status, tdr_status;
@@ -925,7 +925,7 @@ static void eexp_hw_set_interface(struct
static void eexp_hw_rx_pio(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned short rx_block = lp->rx_ptr;
unsigned short boguscount = lp->num_rx_bufs;
unsigned short ioaddr = dev->base_addr;
@@ -1022,7 +1022,7 @@ static void eexp_hw_rx_pio(struct net_de
static void eexp_hw_tx_pio(struct net_device *dev, unsigned short *buf,
unsigned short len)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned short ioaddr = dev->base_addr;
if (LOCKUP16 || lp->width) {
@@ -1262,7 +1262,7 @@ static unsigned short __init eexp_hw_rea
static unsigned short eexp_hw_lasttxstat(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned short tx_block = lp->tx_reap;
unsigned short status;
@@ -1332,7 +1332,7 @@ static unsigned short eexp_hw_lasttxstat
static void eexp_hw_txrestart(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned short ioaddr = dev->base_addr;
lp->last_tx_restart = lp->tx_link;
@@ -1377,7 +1377,7 @@ static void eexp_hw_txrestart(struct net
static void eexp_hw_txinit(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned short tx_block = TX_BUF_START;
unsigned short curtbuf;
unsigned short ioaddr = dev->base_addr;
@@ -1419,7 +1419,7 @@ static void eexp_hw_txinit(struct net_de
static void eexp_hw_rxinit(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned short rx_block = lp->rx_buf_start;
unsigned short ioaddr = dev->base_addr;
@@ -1478,7 +1478,7 @@ static void eexp_hw_rxinit(struct net_de
static void eexp_hw_init586(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned short ioaddr = dev->base_addr;
int i;
@@ -1639,7 +1639,7 @@ static void
eexp_set_multicast(struct net_device *dev)
{
unsigned short ioaddr = dev->base_addr;
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int kick = 0, i;
if ((dev->flags & IFF_PROMISC) != lp->was_promisc) {
outw(CONF_PROMISC & ~31, ioaddr+SM_PTR);
diff -puN drivers/net/lasi_82596.c~net_intel_casts drivers/net/lasi_82596.c
--- linux-263-229/drivers/net/lasi_82596.c~net_intel_casts 2004-02-29 14:02:15.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/lasi_82596.c 2004-02-29 14:02:15.000000000 -0800
@@ -541,7 +541,7 @@ static void i596_error(int irq, void *de
static inline void init_rx_bufs(struct net_device *dev)
{
- struct i596_private *lp = (struct i596_private *)dev->priv;
+ struct i596_private *lp = dev->priv;
int i;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
@@ -595,7 +595,7 @@ static inline void init_rx_bufs(struct n
static inline void remove_rx_bufs(struct net_device *dev)
{
- struct i596_private *lp = (struct i596_private *)dev->priv;
+ struct i596_private *lp = dev->priv;
struct i596_rbd *rbd;
int i;
@@ -727,7 +727,7 @@ failed:
static inline int i596_rx(struct net_device *dev)
{
- struct i596_private *lp = (struct i596_private *)dev->priv;
+ struct i596_private *lp = dev->priv;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
int frames = 0;
_
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove unneeded casts in generic drivers/net/
[not found] <20040229142516.3d218ed0.rddunlap@osdl.org>
` (8 preceding siblings ...)
2004-02-29 22:56 ` [janitor] remove unneeded casts in intel-ee drivers Randy.Dunlap
@ 2004-02-29 22:57 ` Randy.Dunlap
2004-02-29 23:01 ` [janitor] remove unneeded casts in 3c527 Randy.Dunlap
2004-02-29 23:02 ` [janitor] remove unneeded casts (others) Randy.Dunlap
11 siblings, 0 replies; 18+ messages in thread
From: Randy.Dunlap @ 2004-02-29 22:57 UTC (permalink / raw)
To: jgarzik; +Cc: netdev
From: Carlo Perassi <carlo@linux.it>
drivers/net/ethertap.c | 10 +++++-----
drivers/net/isa-skeleton.c | 14 +++++++-------
drivers/net/loopback.c | 2 +-
drivers/net/plip.c | 20 ++++++++++----------
drivers/net/tun.c | 6 +++---
5 files changed, 26 insertions(+), 26 deletions(-)
diff -puN drivers/net/ethertap.c~net_generic_casts drivers/net/ethertap.c
--- linux-263-229/drivers/net/ethertap.c~net_generic_casts 2004-02-29 14:02:00.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/ethertap.c 2004-02-29 14:02:00.000000000 -0800
@@ -150,7 +150,7 @@ static unsigned ethertap_mc_hash(__u8 *d
static void set_multicast_list(struct net_device *dev)
{
unsigned groups = ~0;
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if (!(dev->flags&(IFF_NOARP|IFF_PROMISC|IFF_ALLMULTI))) {
struct dev_mc_list *dmi;
@@ -176,7 +176,7 @@ static void set_multicast_list(struct ne
static int ethertap_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
#ifdef CONFIG_ETHERTAP_MC
struct ethhdr *eth = (struct ethhdr*)skb->data;
#endif
@@ -234,7 +234,7 @@ static int ethertap_start_xmit(struct sk
static __inline__ int ethertap_rx_skb(struct sk_buff *skb, struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
#ifdef CONFIG_ETHERTAP_MC
struct ethhdr *eth = (struct ethhdr*)(skb->data + 2);
#endif
@@ -320,7 +320,7 @@ static void ethertap_rx(struct sock *sk,
static int ethertap_close(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
struct sock *sk = lp->nl;
if (ethertap_debug > 2)
@@ -338,7 +338,7 @@ static int ethertap_close(struct net_dev
static struct net_device_stats *ethertap_get_stats(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
return &lp->stats;
}
diff -puN drivers/net/isa-skeleton.c~net_generic_casts drivers/net/isa-skeleton.c
--- linux-263-229/drivers/net/isa-skeleton.c~net_generic_casts 2004-02-29 14:02:00.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/isa-skeleton.c 2004-02-29 14:02:00.000000000 -0800
@@ -326,7 +326,7 @@ out:
static void net_tx_timeout(struct net_device *dev)
{
- struct net_local *np = (struct net_local *)dev->priv;
+ struct net_local *np = dev->priv;
printk(KERN_WARNING "%s: transmit timed out, %s?\n", dev->name,
tx_done(dev) ? "IRQ conflict" : "network cable problem");
@@ -361,7 +361,7 @@ static void net_tx_timeout(struct net_de
static int
net_open(struct net_device *dev)
{
- struct net_local *np = (struct net_local *)dev->priv;
+ struct net_local *np = dev->priv;
int ioaddr = dev->base_addr;
/*
* This is used if the interrupt line can turned off (shared).
@@ -399,7 +399,7 @@ net_open(struct net_device *dev)
*/
static int net_send_packet(struct sk_buff *skb, struct net_device *dev)
{
- struct net_local *np = (struct net_local *)dev->priv;
+ struct net_local *np = dev->priv;
int ioaddr = dev->base_addr;
short length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
unsigned char *buf = skb->data;
@@ -465,7 +465,7 @@ static int net_send_packet(struct sk_buf
*/
void net_tx(struct net_device *dev)
{
- struct net_local *np = (struct net_local *)dev->priv;
+ struct net_local *np = dev->priv;
int entry;
/* This protects us from concurrent execution of
@@ -539,7 +539,7 @@ out:
static void
net_rx(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int ioaddr = dev->base_addr;
int boguscount = 10;
@@ -591,7 +591,7 @@ net_rx(struct net_device *dev)
static int
net_close(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int ioaddr = dev->base_addr;
lp->open_time = 0;
@@ -620,7 +620,7 @@ net_close(struct net_device *dev)
*/
static struct net_device_stats *net_get_stats(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
short ioaddr = dev->base_addr;
/* Update the statistics from the device registers. */
diff -puN drivers/net/loopback.c~net_generic_casts drivers/net/loopback.c
--- linux-263-229/drivers/net/loopback.c~net_generic_casts 2004-02-29 14:02:00.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/loopback.c 2004-02-29 14:02:00.000000000 -0800
@@ -123,7 +123,7 @@ static void emulate_large_send_offload(s
*/
static int loopback_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct net_device_stats *stats = (struct net_device_stats *)dev->priv;
+ struct net_device_stats *stats = dev->priv;
skb_orphan(skb);
diff -puN drivers/net/plip.c~net_generic_casts drivers/net/plip.c
--- linux-263-229/drivers/net/plip.c~net_generic_casts 2004-02-29 14:02:00.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/plip.c 2004-02-29 14:02:00.000000000 -0800
@@ -323,7 +323,7 @@ plip_init_netdev(struct net_device *dev)
static void
plip_kick_bh(struct net_device *dev)
{
- struct net_local *nl = (struct net_local *)dev->priv;
+ struct net_local *nl = dev->priv;
if (nl->is_deferred)
schedule_work(&nl->immediate);
@@ -366,7 +366,7 @@ static plip_func connection_state_table[
static void
plip_bh(struct net_device *dev)
{
- struct net_local *nl = (struct net_local *)dev->priv;
+ struct net_local *nl = dev->priv;
struct plip_local *snd = &nl->snd_data;
struct plip_local *rcv = &nl->rcv_data;
plip_func f;
@@ -384,7 +384,7 @@ plip_bh(struct net_device *dev)
static void
plip_timer_bh(struct net_device *dev)
{
- struct net_local *nl = (struct net_local *)dev->priv;
+ struct net_local *nl = dev->priv;
if (!(atomic_read (&nl->kill_timer))) {
plip_interrupt (-1, dev, NULL);
@@ -961,7 +961,7 @@ plip_interrupt(int irq, void *dev_id, st
static int
plip_tx_packet(struct sk_buff *skb, struct net_device *dev)
{
- struct net_local *nl = (struct net_local *)dev->priv;
+ struct net_local *nl = dev->priv;
struct plip_local *snd = &nl->snd_data;
if (netif_queue_stopped(dev))
@@ -1021,7 +1021,7 @@ plip_hard_header(struct sk_buff *skb, st
unsigned short type, void *daddr,
void *saddr, unsigned len)
{
- struct net_local *nl = (struct net_local *)dev->priv;
+ struct net_local *nl = dev->priv;
int ret;
if ((ret = nl->orig_hard_header(skb, dev, type, daddr, saddr, len)) >= 0)
@@ -1057,7 +1057,7 @@ int plip_hard_header_cache(struct neighb
static int
plip_open(struct net_device *dev)
{
- struct net_local *nl = (struct net_local *)dev->priv;
+ struct net_local *nl = dev->priv;
struct in_device *in_dev;
/* Grab the port */
@@ -1116,7 +1116,7 @@ plip_open(struct net_device *dev)
static int
plip_close(struct net_device *dev)
{
- struct net_local *nl = (struct net_local *)dev->priv;
+ struct net_local *nl = dev->priv;
struct plip_local *snd = &nl->snd_data;
struct plip_local *rcv = &nl->rcv_data;
@@ -1163,7 +1163,7 @@ static int
plip_preempt(void *handle)
{
struct net_device *dev = (struct net_device *)handle;
- struct net_local *nl = (struct net_local *)dev->priv;
+ struct net_local *nl = dev->priv;
/* Stand our ground if a datagram is on the wire */
if (nl->connection != PLIP_CN_NONE) {
@@ -1179,7 +1179,7 @@ static void
plip_wakeup(void *handle)
{
struct net_device *dev = (struct net_device *)handle;
- struct net_local *nl = (struct net_local *)dev->priv;
+ struct net_local *nl = dev->priv;
if (nl->port_owner) {
/* Why are we being woken up? */
@@ -1207,7 +1207,7 @@ plip_wakeup(void *handle)
static struct net_device_stats *
plip_get_stats(struct net_device *dev)
{
- struct net_local *nl = (struct net_local *)dev->priv;
+ struct net_local *nl = dev->priv;
struct net_device_stats *r = &nl->enet_stats;
return r;
diff -puN drivers/net/tun.c~net_generic_casts drivers/net/tun.c
--- linux-263-229/drivers/net/tun.c~net_generic_casts 2004-02-29 14:02:00.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/tun.c 2004-02-29 14:02:00.000000000 -0800
@@ -70,7 +70,7 @@ static int tun_net_close(struct net_devi
/* Net device start xmit */
static int tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct tun_struct *tun = (struct tun_struct *)dev->priv;
+ struct tun_struct *tun = dev->priv;
DBG(KERN_INFO "%s: tun_net_xmit %d\n", tun->dev->name, skb->len);
@@ -113,14 +113,14 @@ static void tun_net_mclist(struct net_de
static struct net_device_stats *tun_net_stats(struct net_device *dev)
{
- struct tun_struct *tun = (struct tun_struct *)dev->priv;
+ struct tun_struct *tun = dev->priv;
return &tun->stats;
}
/* Initialize net device. */
static void tun_net_init(struct net_device *dev)
{
- struct tun_struct *tun = (struct tun_struct *)dev->priv;
+ struct tun_struct *tun = dev->priv;
switch (tun->flags & TUN_TYPE_MASK) {
case TUN_TUN_DEV:
_
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove unneeded casts in 3c527
[not found] <20040229142516.3d218ed0.rddunlap@osdl.org>
` (9 preceding siblings ...)
2004-02-29 22:57 ` [janitor] remove unneeded casts in generic drivers/net/ Randy.Dunlap
@ 2004-02-29 23:01 ` Randy.Dunlap
2004-02-29 23:02 ` [janitor] remove unneeded casts (others) Randy.Dunlap
11 siblings, 0 replies; 18+ messages in thread
From: Randy.Dunlap @ 2004-02-29 23:01 UTC (permalink / raw)
To: jgarzik; +Cc: netdev
From: Carlo Perassi <carlo@linux.it>
drivers/net/3c527.c | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diff -puN drivers/net/3c527.c~drivers_net_v2_casts drivers/net/3c527.c
--- linux-263-229/drivers/net/3c527.c~drivers_net_v2_casts 2004-02-29 14:04:11.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/3c527.c 2004-02-29 14:04:11.000000000 -0800
@@ -573,7 +573,7 @@ static inline void mc32_ready_poll(struc
static int mc32_command_nowait(struct net_device *dev, u16 cmd, void *data, int len)
{
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
+ struct mc32_local *lp = dev->priv;
int ioaddr = dev->base_addr;
int ret = -1;
@@ -619,7 +619,7 @@ static int mc32_command_nowait(struct ne
static int mc32_command(struct net_device *dev, u16 cmd, void *data, int len)
{
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
+ struct mc32_local *lp = dev->priv;
int ioaddr = dev->base_addr;
int ret = 0;
@@ -671,7 +671,7 @@ static int mc32_command(struct net_devic
static void mc32_start_transceiver(struct net_device *dev) {
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
+ struct mc32_local *lp = dev->priv;
int ioaddr = dev->base_addr;
/* Ignore RX overflow on device closure */
@@ -706,7 +706,7 @@ static void mc32_start_transceiver(struc
static void mc32_halt_transceiver(struct net_device *dev)
{
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
+ struct mc32_local *lp = dev->priv;
int ioaddr = dev->base_addr;
mc32_ready_poll(dev);
@@ -743,7 +743,7 @@ static void mc32_halt_transceiver(struct
static int mc32_load_rx_ring(struct net_device *dev)
{
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
+ struct mc32_local *lp = dev->priv;
int i;
u16 rx_base;
volatile struct skb_header *p;
@@ -792,7 +792,7 @@ static int mc32_load_rx_ring(struct net_
static void mc32_flush_rx_ring(struct net_device *dev)
{
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
+ struct mc32_local *lp = dev->priv;
int i;
for(i=0; i < RX_RING_LEN; i++)
@@ -824,7 +824,7 @@ static void mc32_flush_rx_ring(struct ne
static void mc32_load_tx_ring(struct net_device *dev)
{
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
+ struct mc32_local *lp = dev->priv;
volatile struct skb_header *p;
int i;
u16 tx_base;
@@ -861,7 +861,7 @@ static void mc32_load_tx_ring(struct net
static void mc32_flush_tx_ring(struct net_device *dev)
{
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
+ struct mc32_local *lp = dev->priv;
int i;
for (i=0; i < TX_RING_LEN; i++)
@@ -899,7 +899,7 @@ static void mc32_flush_tx_ring(struct ne
static int mc32_open(struct net_device *dev)
{
int ioaddr = dev->base_addr;
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
+ struct mc32_local *lp = dev->priv;
u8 one=1;
u8 regs;
u16 descnumbuffs[2] = {TX_RING_LEN, RX_RING_LEN};
@@ -1022,7 +1022,7 @@ static void mc32_timeout(struct net_devi
static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev)
{
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
+ struct mc32_local *lp = dev->priv;
u32 head = atomic_read(&lp->tx_ring_head);
volatile struct skb_header *p, *np;
@@ -1092,7 +1092,7 @@ static int mc32_send_packet(struct sk_bu
static void mc32_update_stats(struct net_device *dev)
{
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
+ struct mc32_local *lp = dev->priv;
volatile struct mc32_stats *st = lp->stats;
u32 rx_errors=0;
@@ -1236,7 +1236,7 @@ static void mc32_rx_ring(struct net_devi
static void mc32_tx_ring(struct net_device *dev)
{
- struct mc32_local *lp=(struct mc32_local *)dev->priv;
+ struct mc32_local *lp = dev->priv;
volatile struct skb_header *np;
/*
@@ -1333,7 +1333,7 @@ static irqreturn_t mc32_interrupt(int ir
}
ioaddr = dev->base_addr;
- lp = (struct mc32_local *)dev->priv;
+ lp = dev->priv;
/* See whats cooking */
@@ -1450,7 +1450,7 @@ static irqreturn_t mc32_interrupt(int ir
static int mc32_close(struct net_device *dev)
{
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
+ struct mc32_local *lp = dev->priv;
int ioaddr = dev->base_addr;
u8 regs;
@@ -1499,7 +1499,7 @@ static int mc32_close(struct net_device
static struct net_device_stats *mc32_get_stats(struct net_device *dev)
{
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
+ struct mc32_local *lp = dev->priv;
mc32_update_stats(dev);
return &lp->net_stats;
@@ -1531,7 +1531,7 @@ static struct net_device_stats *mc32_get
static void do_mc32_set_multicast_list(struct net_device *dev, int retry)
{
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
+ struct mc32_local *lp = dev->priv;
u16 filt = (1<<2); /* Save Bad Packets, for stats purposes */
if (dev->flags&IFF_PROMISC)
_
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove unneeded casts (others)
[not found] <20040229142516.3d218ed0.rddunlap@osdl.org>
` (10 preceding siblings ...)
2004-02-29 23:01 ` [janitor] remove unneeded casts in 3c527 Randy.Dunlap
@ 2004-02-29 23:02 ` Randy.Dunlap
11 siblings, 0 replies; 18+ messages in thread
From: Randy.Dunlap @ 2004-02-29 23:02 UTC (permalink / raw)
To: jgarzik; +Cc: netdev
From: Carlo Perassi <carlo@linux.it>
drivers/net/amd8111e.c | 8 ++++----
drivers/net/ariadne.c | 10 +++++-----
drivers/net/at1700.c | 12 ++++++------
drivers/net/atari_bionet.c | 12 ++++++------
drivers/net/atp.c | 20 ++++++++++----------
drivers/net/bmac.c | 2 +-
drivers/net/cs89x0.c | 34 +++++++++++++++++-----------------
drivers/net/eth16i.c | 14 +++++++-------
drivers/net/fec.c | 2 +-
drivers/net/gt96100eth.c | 40 ++++++++++++++++++++--------------------
drivers/net/mac89x0.c | 10 +++++-----
drivers/net/ni5010.c | 8 ++++----
drivers/net/rrunner.c | 8 ++++----
drivers/net/sb1000.c | 14 +++++++-------
drivers/net/sb1250-mac.c | 14 +++++++-------
drivers/net/seeq8005.c | 12 ++++++------
drivers/net/sgiseeq.c | 2 +-
drivers/net/sk_g16.c | 2 +-
drivers/net/smc9194.c | 12 ++++++------
19 files changed, 118 insertions(+), 118 deletions(-)
diff -puN drivers/net/amd8111e.c~drivers_net_casts drivers/net/amd8111e.c
--- linux-263-229/drivers/net/amd8111e.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/amd8111e.c 2004-02-29 14:03:33.000000000 -0800
@@ -197,7 +197,7 @@ This function will set PHY speed. During
*/
static void amd8111e_set_ext_phy(struct net_device *dev)
{
- struct amd8111e_priv *lp = (struct amd8111e_priv *)dev->priv;
+ struct amd8111e_priv *lp = dev->priv;
u32 bmcr,advert,tmp;
/* Determine mii register values to set the speed */
@@ -239,7 +239,7 @@ all transmit and receive skbuffs.
*/
static int amd8111e_free_skbs(struct net_device *dev)
{
- struct amd8111e_priv *lp = (struct amd8111e_priv *)dev->priv;
+ struct amd8111e_priv *lp = dev->priv;
struct sk_buff* rx_skbuff;
int i;
@@ -290,7 +290,7 @@ This function will free all the previous
*/
static int amd8111e_init_ring(struct net_device *dev)
{
- struct amd8111e_priv *lp = (struct amd8111e_priv *)dev->priv;
+ struct amd8111e_priv *lp = dev->priv;
int i;
lp->rx_idx = lp->tx_idx = 0;
@@ -1185,7 +1185,7 @@ static int amd8111e_close(struct net_dev
*/
static int amd8111e_open(struct net_device * dev )
{
- struct amd8111e_priv *lp = (struct amd8111e_priv *)dev->priv;
+ struct amd8111e_priv *lp = dev->priv;
if(dev->irq ==0 || request_irq(dev->irq, amd8111e_interrupt, SA_SHIRQ,
dev->name, dev))
diff -puN drivers/net/ariadne.c~drivers_net_casts drivers/net/ariadne.c
--- linux-263-229/drivers/net/ariadne.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/ariadne.c 2004-02-29 14:03:33.000000000 -0800
@@ -333,7 +333,7 @@ static int ariadne_open(struct net_devic
static void ariadne_init_ring(struct net_device *dev)
{
- struct ariadne_private *priv = (struct ariadne_private *)dev->priv;
+ struct ariadne_private *priv = dev->priv;
volatile struct lancedata *lancedata = (struct lancedata *)dev->mem_start;
int i;
@@ -379,7 +379,7 @@ static void ariadne_init_ring(struct net
static int ariadne_close(struct net_device *dev)
{
- struct ariadne_private *priv = (struct ariadne_private *)dev->priv;
+ struct ariadne_private *priv = dev->priv;
volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
netif_stop_queue(dev);
@@ -589,7 +589,7 @@ static void ariadne_tx_timeout(struct ne
static int ariadne_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct ariadne_private *priv = (struct ariadne_private *)dev->priv;
+ struct ariadne_private *priv = dev->priv;
volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
int entry;
unsigned long flags;
@@ -697,7 +697,7 @@ static int ariadne_start_xmit(struct sk_
static int ariadne_rx(struct net_device *dev)
{
- struct ariadne_private *priv = (struct ariadne_private *)dev->priv;
+ struct ariadne_private *priv = dev->priv;
int entry = priv->cur_rx % RX_RING_SIZE;
int i;
@@ -787,7 +787,7 @@ static int ariadne_rx(struct net_device
static struct net_device_stats *ariadne_get_stats(struct net_device *dev)
{
- struct ariadne_private *priv = (struct ariadne_private *)dev->priv;
+ struct ariadne_private *priv = dev->priv;
volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
short saved_addr;
unsigned long flags;
diff -puN drivers/net/at1700.c~drivers_net_casts drivers/net/at1700.c
--- linux-263-229/drivers/net/at1700.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/at1700.c 2004-02-29 14:03:33.000000000 -0800
@@ -618,7 +618,7 @@ static int __init read_eeprom(long ioadd
static int net_open(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int ioaddr = dev->base_addr;
/* Set the configuration register 0 to 32K 100ns. byte-wide memory, 16 bit
@@ -649,7 +649,7 @@ static int net_open(struct net_device *d
static void net_tx_timeout (struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int ioaddr = dev->base_addr;
printk ("%s: transmit timed out with status %04x, %s?\n", dev->name,
@@ -808,7 +808,7 @@ net_interrupt(int irq, void *dev_id, str
static void
net_rx(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int ioaddr = dev->base_addr;
int boguscount = 5;
@@ -891,7 +891,7 @@ net_rx(struct net_device *dev)
/* The inverse routine to net_open(). */
static int net_close(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int ioaddr = dev->base_addr;
netif_stop_queue(dev);
@@ -919,7 +919,7 @@ static int net_close(struct net_device *
static struct net_device_stats *
net_get_stats(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
return &lp->stats;
}
@@ -931,7 +931,7 @@ static void
set_rx_mode(struct net_device *dev)
{
int ioaddr = dev->base_addr;
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned char mc_filter[8]; /* Multicast hash filter */
unsigned long flags;
int i;
diff -puN drivers/net/atari_bionet.c~drivers_net_casts drivers/net/atari_bionet.c
--- linux-263-229/drivers/net/atari_bionet.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/atari_bionet.c 2004-02-29 14:03:33.000000000 -0800
@@ -408,7 +408,7 @@ struct net_device * __init bionet_probe(
*/
static int
bionet_open(struct net_device *dev) {
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if (bionet_debug > 0)
printk("bionet_open\n");
@@ -433,7 +433,7 @@ bionet_open(struct net_device *dev) {
static int
bionet_send_packet(struct sk_buff *skb, struct net_device *dev) {
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned long flags;
/* Block a timer-based transmit from overlapping. This could better be
@@ -499,7 +499,7 @@ bionet_send_packet(struct sk_buff *skb,
*/
static void
bionet_poll_rx(struct net_device *dev) {
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int boguscount = 10;
int pkt_len, status;
unsigned long flags;
@@ -601,7 +601,7 @@ bionet_poll_rx(struct net_device *dev) {
static void
bionet_tick(unsigned long data) {
struct net_device *dev = (struct net_device *)data;
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if( bionet_debug > 0 && (lp->open_time++ & 7) == 8 )
printk("bionet_tick: %ld\n", lp->open_time);
@@ -616,7 +616,7 @@ bionet_tick(unsigned long data) {
*/
static int
bionet_close(struct net_device *dev) {
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if (bionet_debug > 0)
printk("bionet_close, open_time=%ld\n", lp->open_time);
@@ -638,7 +638,7 @@ bionet_close(struct net_device *dev) {
*/
static struct net_device_stats *net_get_stats(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
return &lp->stats;
}
diff -puN drivers/net/atp.c~drivers_net_casts drivers/net/atp.c
--- linux-263-229/drivers/net/atp.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/atp.c 2004-02-29 14:03:33.000000000 -0800
@@ -432,7 +432,7 @@ static unsigned short __init eeprom_op(l
*/
static int net_open(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int ret;
/* The interrupt line is turned off (tri-stated) when the device isn't in
@@ -458,7 +458,7 @@ static int net_open(struct net_device *d
the hardware may have been temporarily detached. */
static void hardware_init(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
long ioaddr = dev->base_addr;
int i;
@@ -541,7 +541,7 @@ static void write_packet(long ioaddr, in
static void tx_timeout(struct net_device *dev)
{
- struct net_local *np = (struct net_local *)dev->priv;
+ struct net_local *np = dev->priv;
long ioaddr = dev->base_addr;
printk(KERN_WARNING "%s: Transmit timed out, %s?\n", dev->name,
@@ -557,7 +557,7 @@ static void tx_timeout(struct net_device
static int atp_send_packet(struct sk_buff *skb, struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
long ioaddr = dev->base_addr;
int length;
unsigned long flags;
@@ -726,7 +726,7 @@ static void atp_timed_checker(unsigned l
{
struct net_device *dev = (struct net_device *)data;
long ioaddr = dev->base_addr;
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int tickssofar = jiffies - lp->last_rx_time;
int i;
@@ -762,7 +762,7 @@ static void atp_timed_checker(unsigned l
/* We have a good packet(s), get it/them out of the buffers. */
static void net_rx(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
long ioaddr = dev->base_addr;
struct rx_header rx_head;
@@ -838,7 +838,7 @@ static void read_block(long ioaddr, int
static int
net_close(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
long ioaddr = dev->base_addr;
netif_stop_queue(dev);
@@ -863,7 +863,7 @@ net_close(struct net_device *dev)
static struct net_device_stats *
net_get_stats(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
return &lp->stats;
}
@@ -873,7 +873,7 @@ net_get_stats(struct net_device *dev)
static void set_rx_mode_8002(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
long ioaddr = dev->base_addr;
if ( dev->mc_count > 0 || (dev->flags & (IFF_ALLMULTI|IFF_PROMISC))) {
@@ -890,7 +890,7 @@ static void set_rx_mode_8002(struct net_
static void set_rx_mode_8012(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
long ioaddr = dev->base_addr;
unsigned char new_mode, mc_filter[8]; /* Multicast hash filter */
int i;
diff -puN drivers/net/bmac.c~drivers_net_casts drivers/net/bmac.c
--- linux-263-229/drivers/net/bmac.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/bmac.c 2004-02-29 14:03:33.000000000 -0800
@@ -1086,7 +1086,7 @@ static int miscintcount;
static irqreturn_t bmac_misc_intr(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *) dev_id;
- struct bmac_data *bp = (struct bmac_data *)dev->priv;
+ struct bmac_data *bp = dev->priv;
unsigned int status = bmread(dev, STATUS);
if (miscintcount++ < 10) {
XXDEBUG(("bmac_misc_intr\n"));
diff -puN drivers/net/cs89x0.c~drivers_net_casts drivers/net/cs89x0.c
--- linux-263-229/drivers/net/cs89x0.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/cs89x0.c 2004-02-29 14:03:33.000000000 -0800
@@ -735,7 +735,7 @@ out1:
static void
get_dma_channel(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if (lp->dma) {
dev->dma = lp->dma;
@@ -757,7 +757,7 @@ get_dma_channel(struct net_device *dev)
static void
write_dma(struct net_device *dev, int chip_type, int dma)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if ((lp->isa_config & ANY_ISA_DMA) == 0)
return;
if (chip_type == CS8900) {
@@ -770,7 +770,7 @@ write_dma(struct net_device *dev, int ch
static void
set_dma_cfg(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if (lp->use_dma) {
if ((lp->isa_config & ANY_ISA_DMA) == 0) {
@@ -793,7 +793,7 @@ set_dma_cfg(struct net_device *dev)
static int
dma_bufcfg(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if (lp->use_dma)
return (lp->isa_config & ANY_ISA_DMA)? RX_DMA_ENBL : 0;
else
@@ -804,7 +804,7 @@ static int
dma_busctl(struct net_device *dev)
{
int retval = 0;
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if (lp->use_dma) {
if (lp->isa_config & ANY_ISA_DMA)
retval |= RESET_RX_DMA; /* Reset the DMA pointer */
@@ -820,7 +820,7 @@ dma_busctl(struct net_device *dev)
static void
dma_rx(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
struct sk_buff *skb;
int status, length;
unsigned char *bp = lp->rx_dma_ptr;
@@ -882,7 +882,7 @@ skip_this_frame:
void __init reset_chip(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int ioaddr = dev->base_addr;
int reset_start_time;
@@ -912,7 +912,7 @@ void __init reset_chip(struct net_devic
static void
control_dc_dc(struct net_device *dev, int on_not_off)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned int selfcontrol;
int timenow = jiffies;
/* control the DC to DC convertor in the SelfControl register.
@@ -940,7 +940,7 @@ control_dc_dc(struct net_device *dev, in
static int
detect_tp(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int timenow = jiffies;
int fdx;
@@ -1055,7 +1055,7 @@ send_test_pkt(struct net_device *dev)
static int
detect_aui(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if (net_debug > 1) printk("%s: Attempting AUI\n", dev->name);
control_dc_dc(dev, 0);
@@ -1071,7 +1071,7 @@ detect_aui(struct net_device *dev)
static int
detect_bnc(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if (net_debug > 1) printk("%s: Attempting BNC\n", dev->name);
control_dc_dc(dev, 1);
@@ -1117,7 +1117,7 @@ write_irq(struct net_device *dev, int ch
static int
net_open(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int result = 0;
int i;
int ret;
@@ -1358,7 +1358,7 @@ static void net_timeout(struct net_devic
static int net_send_packet(struct sk_buff *skb, struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if (net_debug > 3) {
printk("%s: sent %d byte packet of type %x\n",
@@ -1517,7 +1517,7 @@ count_rx_errors(int status, struct net_l
static void
net_rx(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
struct sk_buff *skb;
int status, length;
@@ -1573,7 +1573,7 @@ static void release_dma_buff(struct net_
static int
net_close(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
netif_stop_queue(dev);
@@ -1600,7 +1600,7 @@ net_close(struct net_device *dev)
static struct net_device_stats *
net_get_stats(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned long flags;
spin_lock_irqsave(&lp->lock, flags);
@@ -1614,7 +1614,7 @@ net_get_stats(struct net_device *dev)
static void set_multicast_list(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned long flags;
spin_lock_irqsave(&lp->lock, flags);
diff -puN drivers/net/eth16i.c~drivers_net_casts drivers/net/eth16i.c
--- linux-263-229/drivers/net/eth16i.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/eth16i.c 2004-02-29 14:03:33.000000000 -0800
@@ -950,7 +950,7 @@ static void eth16i_eeprom_cmd(int ioaddr
static int eth16i_open(struct net_device *dev)
{
- struct eth16i_local *lp = (struct eth16i_local *)dev->priv;
+ struct eth16i_local *lp = dev->priv;
int ioaddr = dev->base_addr;
/* Powerup the chip */
@@ -986,7 +986,7 @@ static int eth16i_open(struct net_device
static int eth16i_close(struct net_device *dev)
{
- struct eth16i_local *lp = (struct eth16i_local *)dev->priv;
+ struct eth16i_local *lp = dev->priv;
int ioaddr = dev->base_addr;
eth16i_reset(dev);
@@ -1012,7 +1012,7 @@ static int eth16i_close(struct net_devic
static void eth16i_timeout(struct net_device *dev)
{
- struct eth16i_local *lp = (struct eth16i_local *)dev->priv;
+ struct eth16i_local *lp = dev->priv;
int ioaddr = dev->base_addr;
/*
If we get here, some higher level has decided that
@@ -1053,7 +1053,7 @@ static void eth16i_timeout(struct net_de
static int eth16i_tx(struct sk_buff *skb, struct net_device *dev)
{
- struct eth16i_local *lp = (struct eth16i_local *)dev->priv;
+ struct eth16i_local *lp = dev->priv;
int ioaddr = dev->base_addr;
int status = 0;
ushort length = skb->len;
@@ -1130,7 +1130,7 @@ static int eth16i_tx(struct sk_buff *skb
static void eth16i_rx(struct net_device *dev)
{
- struct eth16i_local *lp = (struct eth16i_local *)dev->priv;
+ struct eth16i_local *lp = dev->priv;
int ioaddr = dev->base_addr;
int boguscount = MAX_RX_LOOP;
@@ -1340,7 +1340,7 @@ static void eth16i_skip_packet(struct ne
static void eth16i_reset(struct net_device *dev)
{
- struct eth16i_local *lp = (struct eth16i_local *)dev->priv;
+ struct eth16i_local *lp = dev->priv;
int ioaddr = dev->base_addr;
if(eth16i_debug > 1)
@@ -1372,7 +1372,7 @@ static void eth16i_multicast(struct net_
static struct net_device_stats *eth16i_get_stats(struct net_device *dev)
{
- struct eth16i_local *lp = (struct eth16i_local *)dev->priv;
+ struct eth16i_local *lp = dev->priv;
return &lp->stats;
}
diff -puN drivers/net/fec.c~drivers_net_casts drivers/net/fec.c
--- linux-263-229/drivers/net/fec.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/fec.c 2004-02-29 14:03:33.000000000 -0800
@@ -1531,7 +1531,7 @@ fec_enet_close(struct net_device *dev)
static struct net_device_stats *fec_enet_get_stats(struct net_device *dev)
{
- struct fec_enet_private *fep = (struct fec_enet_private *)dev->priv;
+ struct fec_enet_private *fep = dev->priv;
return &fep->stats;
}
diff -puN drivers/net/gt96100eth.c~drivers_net_casts drivers/net/gt96100eth.c
--- linux-263-229/drivers/net/gt96100eth.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/gt96100eth.c 2004-02-29 14:03:33.000000000 -0800
@@ -277,7 +277,7 @@ read_MII(int phy_addr, u32 reg)
static void
dump_tx_desc(int dbg_lvl, struct net_device *dev, int i)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
gt96100_td_t *td = &gp->tx_ring[i];
dbg(dbg_lvl, "Tx descriptor at 0x%08lx:\n", virt_to_phys(td));
@@ -292,7 +292,7 @@ dump_tx_desc(int dbg_lvl, struct net_dev
static void
dump_rx_desc(int dbg_lvl, struct net_device *dev, int i)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
gt96100_rd_t *rd = &gp->rx_ring[i];
dbg(dbg_lvl, "Rx descriptor at 0x%08lx:\n", virt_to_phys(rd));
@@ -332,7 +332,7 @@ write_MII(int phy_addr, u32 reg, u16 dat
static void
dump_tx_ring(struct net_device *dev)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
int i;
dbg(0, "%s: txno/txni/cnt=%d/%d/%d\n", __FUNCTION__,
@@ -345,7 +345,7 @@ dump_tx_ring(struct net_device *dev)
static void
dump_rx_ring(struct net_device *dev)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
int i;
dbg(0, "%s: rxno=%d\n", __FUNCTION__, gp->rx_next_out);
@@ -359,7 +359,7 @@ static void
dump_MII(int dbg_lvl, struct net_device *dev)
{
int i, val;
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
if (dbg_lvl <= GT96100_DEBUG) {
for (i=0; i<7; i++) {
@@ -419,7 +419,7 @@ dump_skb(int dbg_lvl, struct net_device
static int
gt96100_add_hash_entry(struct net_device *dev, unsigned char* addr)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
//u16 hashResult, stmp;
//unsigned char ctmp, hash_ea[6];
u32 tblEntry1, tblEntry0, *tblEntryAddr;
@@ -544,7 +544,7 @@ update_stats(struct gt96100_private *gp)
static void
abort(struct net_device *dev, u32 abort_bits)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
int timedout = 100; // wait up to 100 msec for hard stop to complete
dbg(3, "%s\n", __FUNCTION__);
@@ -582,7 +582,7 @@ abort(struct net_device *dev, u32 abort_
static void
hard_stop(struct net_device *dev)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
dbg(3, "%s\n", __FUNCTION__);
@@ -598,7 +598,7 @@ hard_stop(struct net_device *dev)
static void
enable_ether_irq(struct net_device *dev)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
u32 intMask;
/*
* route ethernet interrupt to GT_SERINT0 for port 0,
@@ -631,7 +631,7 @@ enable_ether_irq(struct net_device *dev)
static void
disable_ether_irq(struct net_device *dev)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
u32 intMask;
int intr_mask_reg = (gp->port_num == 0) ?
GT96100_SERINT0_MASK : GT96100_INT0_HIGH_MASK;
@@ -839,7 +839,7 @@ out:
static void
reset_tx(struct net_device *dev)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
int i;
abort(dev, sdcmrAT);
@@ -877,7 +877,7 @@ reset_tx(struct net_device *dev)
static void
reset_rx(struct net_device *dev)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
int i;
abort(dev, sdcmrAR);
@@ -934,7 +934,7 @@ gt96100_check_tx_consistent(struct gt961
static int
gt96100_init(struct net_device *dev)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
u32 tmp;
u16 mii_reg;
@@ -1115,7 +1115,7 @@ gt96100_close(struct net_device *dev)
static int
gt96100_tx(struct sk_buff *skb, struct net_device *dev)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
unsigned long flags;
int nextIn;
@@ -1187,7 +1187,7 @@ gt96100_tx(struct sk_buff *skb, struct n
static int
gt96100_rx(struct net_device *dev, u32 status)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
struct sk_buff *skb;
int pkt_len, nextOut, cdp;
gt96100_rd_t *rd;
@@ -1296,7 +1296,7 @@ gt96100_rx(struct net_device *dev, u32 s
static void
gt96100_tx_complete(struct net_device *dev, u32 status)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
int nextOut, cdp;
gt96100_td_t *td;
u32 cmdstat;
@@ -1385,7 +1385,7 @@ static irqreturn_t
gt96100_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *)dev_id;
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
u32 status;
int handled = 0;
@@ -1486,7 +1486,7 @@ gt96100_interrupt(int irq, void *dev_id,
static void
gt96100_tx_timeout(struct net_device *dev)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
unsigned long flags;
spin_lock_irqsave(&gp->lock, flags);
@@ -1511,7 +1511,7 @@ gt96100_tx_timeout(struct net_device *de
static void
gt96100_set_rx_mode(struct net_device *dev)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
unsigned long flags;
//struct dev_mc_list *mcptr;
@@ -1555,7 +1555,7 @@ gt96100_set_rx_mode(struct net_device *d
static struct net_device_stats *
gt96100_get_stats(struct net_device *dev)
{
- struct gt96100_private *gp = (struct gt96100_private *)dev->priv;
+ struct gt96100_private *gp = dev->priv;
unsigned long flags;
dbg(3, "%s: dev=%p\n", __FUNCTION__, dev);
diff -puN drivers/net/mac89x0.c~drivers_net_casts drivers/net/mac89x0.c
--- linux-263-229/drivers/net/mac89x0.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/mac89x0.c 2004-02-29 14:03:33.000000000 -0800
@@ -328,7 +328,7 @@ void __init reset_chip(struct net_device
static int
net_open(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int i;
/* Disable the interrupt for now */
@@ -392,7 +392,7 @@ net_send_packet(struct sk_buff *skb, str
if (test_and_set_bit(0, (void*)&dev->tbusy) != 0)
printk("%s: Transmitter access conflict.\n", dev->name);
else {
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned long flags;
if (net_debug > 3)
@@ -505,7 +505,7 @@ static irqreturn_t net_interrupt(int irq
static void
net_rx(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
struct sk_buff *skb;
int status, length;
@@ -571,7 +571,7 @@ net_close(struct net_device *dev)
static struct net_device_stats *
net_get_stats(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
unsigned long flags;
local_irq_save(flags);
@@ -585,7 +585,7 @@ net_get_stats(struct net_device *dev)
static void set_multicast_list(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
if(dev->flags&IFF_PROMISC)
{
diff -puN drivers/net/ni5010.c~drivers_net_casts drivers/net/ni5010.c
--- linux-263-229/drivers/net/ni5010.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/ni5010.c 2004-02-29 14:03:33.000000000 -0800
@@ -527,7 +527,7 @@ static void dump_packet(void *buf, int l
/* We have a good packet, get it out of the buffer. */
static void ni5010_rx(struct net_device *dev)
{
- struct ni5010_local *lp = (struct ni5010_local *)dev->priv;
+ struct ni5010_local *lp = dev->priv;
int ioaddr = dev->base_addr;
unsigned char rcv_stat;
struct sk_buff *skb;
@@ -592,7 +592,7 @@ static void ni5010_rx(struct net_device
static int process_xmt_interrupt(struct net_device *dev)
{
- struct ni5010_local *lp = (struct ni5010_local *)dev->priv;
+ struct ni5010_local *lp = dev->priv;
int ioaddr = dev->base_addr;
int xmit_stat;
@@ -651,7 +651,7 @@ static int ni5010_close(struct net_devic
closed. */
static struct net_device_stats *ni5010_get_stats(struct net_device *dev)
{
- struct ni5010_local *lp = (struct ni5010_local *)dev->priv;
+ struct ni5010_local *lp = dev->priv;
PRINTK2((KERN_DEBUG "%s: entering ni5010_get_stats\n", dev->name));
@@ -693,7 +693,7 @@ static void ni5010_set_multicast_list(st
static void hardware_send_packet(struct net_device *dev, char *buf, int length, int pad)
{
- struct ni5010_local *lp = (struct ni5010_local *)dev->priv;
+ struct ni5010_local *lp = dev->priv;
int ioaddr = dev->base_addr;
unsigned long flags;
unsigned int buf_offs;
diff -puN drivers/net/rrunner.c~drivers_net_casts drivers/net/rrunner.c
--- linux-263-229/drivers/net/rrunner.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/rrunner.c 2004-02-29 14:03:33.000000000 -0800
@@ -960,7 +960,7 @@ static u32 rr_handle_event(struct net_de
static void rx_int(struct net_device *dev, u32 rxlimit, u32 index)
{
- struct rr_private *rrpriv = (struct rr_private *)dev->priv;
+ struct rr_private *rrpriv = dev->priv;
struct rr_regs *regs = rrpriv->regs;
do {
@@ -1133,7 +1133,7 @@ static irqreturn_t rr_interrupt(int irq,
static void rr_timer(unsigned long data)
{
struct net_device *dev = (struct net_device *)data;
- struct rr_private *rrpriv = (struct rr_private *)dev->priv;
+ struct rr_private *rrpriv = dev->priv;
struct rr_regs *regs = rrpriv->regs;
unsigned long flags;
@@ -1160,7 +1160,7 @@ static void rr_timer(unsigned long data)
static int rr_open(struct net_device *dev)
{
- struct rr_private *rrpriv = (struct rr_private *)dev->priv;
+ struct rr_private *rrpriv = dev->priv;
struct pci_dev *pdev = rrpriv->pci_dev;
struct rr_regs *regs;
int ecode = 0;
@@ -1418,7 +1418,7 @@ static int rr_close(struct net_device *d
static int rr_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct rr_private *rrpriv = (struct rr_private *)dev->priv;
+ struct rr_private *rrpriv = dev->priv;
struct rr_regs *regs = rrpriv->regs;
struct ring_ctrl *txctrl;
unsigned long flags;
diff -puN drivers/net/sb1000.c~drivers_net_casts drivers/net/sb1000.c
--- linux-263-229/drivers/net/sb1000.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/sb1000.c 2004-02-29 14:03:33.000000000 -0800
@@ -746,7 +746,7 @@ sb1000_rx(struct net_device *dev)
int ioaddr, ns;
unsigned int skbsize;
struct sk_buff *skb;
- struct sb1000_private *lp = (struct sb1000_private *)dev->priv;
+ struct sb1000_private *lp = dev->priv;
struct net_device_stats *stats = &lp->stats;
/* SB1000 frame constants */
@@ -905,7 +905,7 @@ sb1000_error_dpc(struct net_device *dev)
char *name;
unsigned char st[5];
int ioaddr[2];
- struct sb1000_private *lp = (struct sb1000_private *)dev->priv;
+ struct sb1000_private *lp = dev->priv;
const unsigned char Command0[6] = {0x80, 0x26, 0x00, 0x00, 0x00, 0x00};
const int ErrorDpcCounterInitialize = 200;
@@ -932,7 +932,7 @@ sb1000_open(struct net_device *dev)
{
char *name;
int ioaddr[2], status;
- struct sb1000_private *lp = (struct sb1000_private *)dev->priv;
+ struct sb1000_private *lp = dev->priv;
const unsigned short FirmwareVersion[] = {0x01, 0x01};
ioaddr[0] = dev->base_addr;
@@ -998,7 +998,7 @@ static int sb1000_dev_ioctl(struct net_d
short PID[4];
int ioaddr[2], status, frequency;
unsigned int stats[5];
- struct sb1000_private *lp = (struct sb1000_private *)dev->priv;
+ struct sb1000_private *lp = dev->priv;
if (!(dev && dev->flags & IFF_UP))
return -ENODEV;
@@ -1092,7 +1092,7 @@ static irqreturn_t sb1000_interrupt(int
unsigned char st;
int ioaddr[2];
struct net_device *dev = (struct net_device *) dev_id;
- struct sb1000_private *lp = (struct sb1000_private *)dev->priv;
+ struct sb1000_private *lp = dev->priv;
const unsigned char Command0[6] = {0x80, 0x2c, 0x00, 0x00, 0x00, 0x00};
const unsigned char Command1[6] = {0x80, 0x2e, 0x00, 0x00, 0x00, 0x00};
@@ -1148,7 +1148,7 @@ static irqreturn_t sb1000_interrupt(int
static struct net_device_stats *sb1000_stats(struct net_device *dev)
{
- struct sb1000_private *lp = (struct sb1000_private *)dev->priv;
+ struct sb1000_private *lp = dev->priv;
return &lp->stats;
}
@@ -1156,7 +1156,7 @@ static int sb1000_close(struct net_devic
{
int i;
int ioaddr[2];
- struct sb1000_private *lp = (struct sb1000_private *)dev->priv;
+ struct sb1000_private *lp = dev->priv;
if (sb1000_debug > 2)
printk(KERN_DEBUG "%s: Shutting down sb1000.\n", dev->name);
diff -puN drivers/net/sb1250-mac.c~drivers_net_casts drivers/net/sb1250-mac.c
--- linux-263-229/drivers/net/sb1250-mac.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/sb1250-mac.c 2004-02-29 14:03:33.000000000 -0800
@@ -2150,7 +2150,7 @@ static irqreturn_t sbmac_intr(int irq,vo
********************************************************************* */
static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev)
{
- struct sbmac_softc *sc = (struct sbmac_softc *)dev->priv;
+ struct sbmac_softc *sc = dev->priv;
/* lock eth irq */
spin_lock_irq (&sc->sbm_lock);
@@ -2454,7 +2454,7 @@ static int sbmac_init(struct net_device
static int sbmac_open(struct net_device *dev)
{
- struct sbmac_softc *sc = (struct sbmac_softc *)dev->priv;
+ struct sbmac_softc *sc = dev->priv;
if (debug > 1) {
printk(KERN_DEBUG "%s: sbmac_open() irq %d.\n", dev->name, dev->irq);
@@ -2609,7 +2609,7 @@ static int sbmac_mii_poll(struct sbmac_s
static void sbmac_timer(unsigned long data)
{
struct net_device *dev = (struct net_device *)data;
- struct sbmac_softc *sc = (struct sbmac_softc *)dev->priv;
+ struct sbmac_softc *sc = dev->priv;
int next_tick = HZ;
int mii_status;
@@ -2673,7 +2673,7 @@ static void sbmac_tx_timeout (struct net
static struct net_device_stats *sbmac_get_stats(struct net_device *dev)
{
- struct sbmac_softc *sc = (struct sbmac_softc *)dev->priv;
+ struct sbmac_softc *sc = dev->priv;
unsigned long flags;
spin_lock_irqsave(&sc->sbm_lock, flags);
@@ -2691,7 +2691,7 @@ static void sbmac_set_rx_mode(struct net
{
unsigned long flags;
int msg_flag = 0;
- struct sbmac_softc *sc = (struct sbmac_softc *)dev->priv;
+ struct sbmac_softc *sc = dev->priv;
spin_lock_irqsave(&sc->sbm_lock, flags);
if ((dev->flags ^ sc->sbm_devflags) & IFF_PROMISC) {
@@ -2726,7 +2726,7 @@ static void sbmac_set_rx_mode(struct net
static int sbmac_mii_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
- struct sbmac_softc *sc = (struct sbmac_softc *)dev->priv;
+ struct sbmac_softc *sc = dev->priv;
u16 *data = (u16 *)&rq->ifr_data;
unsigned long flags;
int retval;
@@ -2762,7 +2762,7 @@ static int sbmac_mii_ioctl(struct net_de
static int sbmac_close(struct net_device *dev)
{
- struct sbmac_softc *sc = (struct sbmac_softc *)dev->priv;
+ struct sbmac_softc *sc = dev->priv;
unsigned long flags;
int irq;
diff -puN drivers/net/seeq8005.c~drivers_net_casts drivers/net/seeq8005.c
--- linux-263-229/drivers/net/seeq8005.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/seeq8005.c 2004-02-29 14:03:33.000000000 -0800
@@ -357,7 +357,7 @@ out:
*/
static int seeq8005_open(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
{
int irqval = request_irq(dev->irq, &seeq8005_interrupt, 0, "seeq8005", dev);
@@ -390,7 +390,7 @@ static void seeq8005_timeout(struct net_
static int seeq8005_send_packet(struct sk_buff *skb, struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
short length = skb->len;
unsigned char *buf;
@@ -462,7 +462,7 @@ static irqreturn_t seeq8005_interrupt(in
/* We have a good packet(s), get it/them out of the buffers. */
static void seeq8005_rx(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int boguscount = 10;
int pkt_hdr;
int ioaddr = dev->base_addr;
@@ -561,7 +561,7 @@ static void seeq8005_rx(struct net_devic
/* The inverse routine to net_open(). */
static int seeq8005_close(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int ioaddr = dev->base_addr;
lp->open_time = 0;
@@ -583,7 +583,7 @@ static int seeq8005_close(struct net_dev
closed. */
static struct net_device_stats *seeq8005_get_stats(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
return &lp->stats;
}
@@ -618,7 +618,7 @@ static void set_multicast_list(struct ne
void seeq8005_init(struct net_device *dev, int startp)
{
- struct net_local *lp = (struct net_local *)dev->priv;
+ struct net_local *lp = dev->priv;
int ioaddr = dev->base_addr;
int i;
diff -puN drivers/net/sgiseeq.c~drivers_net_casts drivers/net/sgiseeq.c
--- linux-263-229/drivers/net/sgiseeq.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/sgiseeq.c 2004-02-29 14:03:33.000000000 -0800
@@ -445,7 +445,7 @@ static irqreturn_t sgiseeq_interrupt(int
static int sgiseeq_open(struct net_device *dev)
{
- struct sgiseeq_private *sp = (struct sgiseeq_private *)dev->priv;
+ struct sgiseeq_private *sp = dev->priv;
struct sgiseeq_regs *sregs = sp->sregs;
int err = init_seeq(dev, sp, sregs);
diff -puN drivers/net/sk_g16.c~drivers_net_casts drivers/net/sk_g16.c
--- linux-263-229/drivers/net/sk_g16.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/sk_g16.c 2004-02-29 14:03:33.000000000 -0800
@@ -869,7 +869,7 @@ static int SK_open(struct net_device *de
int irqtab[] = SK_IRQS;
- struct priv *p = (struct priv *)dev->priv;
+ struct priv *p = dev->priv;
PRINTK(("## %s: At beginning of SK_open(). CSR0: %#06x\n",
SK_NAME, SK_read_reg(CSR0)));
diff -puN drivers/net/smc9194.c~drivers_net_casts drivers/net/smc9194.c
--- linux-263-229/drivers/net/smc9194.c~drivers_net_casts 2004-02-29 14:03:33.000000000 -0800
+++ linux-263-229-rddunlap/drivers/net/smc9194.c 2004-02-29 14:03:33.000000000 -0800
@@ -465,7 +465,7 @@ static void smc_setmulticast( int ioaddr
*/
static int smc_wait_to_send_packet( struct sk_buff * skb, struct net_device * dev )
{
- struct smc_local *lp = (struct smc_local *)dev->priv;
+ struct smc_local *lp = dev->priv;
unsigned short ioaddr = dev->base_addr;
word length;
unsigned short numPages;
@@ -576,7 +576,7 @@ static int smc_wait_to_send_packet( stru
*/
static void smc_hardware_send_packet( struct net_device * dev )
{
- struct smc_local *lp = (struct smc_local *)dev->priv;
+ struct smc_local *lp = dev->priv;
byte packet_no;
struct sk_buff * skb = lp->saved_skb;
word length;
@@ -1150,7 +1150,7 @@ static irqreturn_t smc_interrupt(int irq
{
struct net_device *dev = dev_id;
int ioaddr = dev->base_addr;
- struct smc_local *lp = (struct smc_local *)dev->priv;
+ struct smc_local *lp = dev->priv;
byte status;
word card_stats;
@@ -1274,7 +1274,7 @@ static irqreturn_t smc_interrupt(int irq
*/
static void smc_rcv(struct net_device *dev)
{
- struct smc_local *lp = (struct smc_local *)dev->priv;
+ struct smc_local *lp = dev->priv;
int ioaddr = dev->base_addr;
int packet_number;
word status;
@@ -1401,7 +1401,7 @@ done:
static void smc_tx( struct net_device * dev )
{
int ioaddr = dev->base_addr;
- struct smc_local *lp = (struct smc_local *)dev->priv;
+ struct smc_local *lp = dev->priv;
byte saved_packet;
byte packet_no;
word tx_status;
@@ -1474,7 +1474,7 @@ static int smc_close(struct net_device *
. This may be called with the card open or closed.
.-------------------------------------------------------------*/
static struct net_device_stats* smc_query_statistics(struct net_device *dev) {
- struct smc_local *lp = (struct smc_local *)dev->priv;
+ struct smc_local *lp = dev->priv;
return &lp->stats;
}
_
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove casts in drivers/net/arm/
2004-02-29 22:34 ` [janitor] remove casts in drivers/net/arm/ Randy.Dunlap
@ 2004-03-02 12:10 ` Russell King
[not found] ` <4044D86C.70709@pobox.com>
0 siblings, 1 reply; 18+ messages in thread
From: Russell King @ 2004-03-02 12:10 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: jgarzik, netdev
On Sun, Feb 29, 2004 at 02:34:36PM -0800, Randy.Dunlap wrote:
> drivers/net/arm/am79c961a.c | 18 +++++++++---------
> drivers/net/arm/ether1.c | 18 +++++++++---------
> drivers/net/arm/ether3.c | 18 +++++++++---------
> drivers/net/arm/etherh.c | 4 ++--
> 4 files changed, 29 insertions(+), 29 deletions(-)
I think we should really consider using netdev_priv() in all these places
so the compiler knows that 'dev' and 'priv' are related.
> diff -puN drivers/net/arm/am79c961a.c~net_arm_casts drivers/net/arm/am79c961a.c
> --- linux-263-229/drivers/net/arm/am79c961a.c~net_arm_casts 2004-02-29 13:53:00.000000000 -0800
> +++ linux-263-229-rddunlap/drivers/net/arm/am79c961a.c 2004-02-29 13:53:00.000000000 -0800
> @@ -196,7 +196,7 @@ am79c961_ramtest(struct net_device *dev,
> static void
> am79c961_init_for_open(struct net_device *dev)
> {
> - struct dev_priv *priv = (struct dev_priv *)dev->priv;
> + struct dev_priv *priv = dev->priv;
> unsigned long flags;
> unsigned char *p;
> u_int hdr_addr, first_free_addr;
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove casts in drivers/net/arm/
[not found] ` <4044D86C.70709@pobox.com>
@ 2004-03-02 19:02 ` Randy.Dunlap
2004-03-02 19:07 ` Jeff Garzik
0 siblings, 1 reply; 18+ messages in thread
From: Randy.Dunlap @ 2004-03-02 19:02 UTC (permalink / raw)
To: Jeff Garzik; +Cc: rmk, netdev
On Tue, 02 Mar 2004 13:54:36 -0500 Jeff Garzik wrote:
| Russell King wrote:
| > On Sun, Feb 29, 2004 at 02:34:36PM -0800, Randy.Dunlap wrote:
| >
| >> drivers/net/arm/am79c961a.c | 18 +++++++++---------
| >> drivers/net/arm/ether1.c | 18 +++++++++---------
| >> drivers/net/arm/ether3.c | 18 +++++++++---------
| >> drivers/net/arm/etherh.c | 4 ++--
| >> 4 files changed, 29 insertions(+), 29 deletions(-)
| >
| >
| > I think we should really consider using netdev_priv() in all these places
| > so the compiler knows that 'dev' and 'priv' are related.
|
|
| Good point.
I respectfully disagree, but if the maintainter won't merge
them as is, so be it.
I have trouble understanding why this:
return (char *)dev + ((sizeof(struct net_device) + 31) & ~31);
is better than using a structure->field, i.e.,
dev->priv
Can one of you enlighten me?
Using dev->priv shows that 'dev' and 'priv' are related.
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove casts in drivers/net/arm/
2004-03-02 19:02 ` Randy.Dunlap
@ 2004-03-02 19:07 ` Jeff Garzik
2004-03-02 19:17 ` Randy.Dunlap
0 siblings, 1 reply; 18+ messages in thread
From: Jeff Garzik @ 2004-03-02 19:07 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: rmk, netdev
Randy.Dunlap wrote:
> On Tue, 02 Mar 2004 13:54:36 -0500 Jeff Garzik wrote:
>
> | Russell King wrote:
> | > On Sun, Feb 29, 2004 at 02:34:36PM -0800, Randy.Dunlap wrote:
> | >
> | >> drivers/net/arm/am79c961a.c | 18 +++++++++---------
> | >> drivers/net/arm/ether1.c | 18 +++++++++---------
> | >> drivers/net/arm/ether3.c | 18 +++++++++---------
> | >> drivers/net/arm/etherh.c | 4 ++--
> | >> 4 files changed, 29 insertions(+), 29 deletions(-)
> | >
> | >
> | > I think we should really consider using netdev_priv() in all these places
> | > so the compiler knows that 'dev' and 'priv' are related.
> |
> |
> | Good point.
>
> I respectfully disagree, but if the maintainter won't merge
> them as is, so be it.
>
> I have trouble understanding why this:
> return (char *)dev + ((sizeof(struct net_device) + 31) & ~31);
> is better than using a structure->field, i.e.,
> dev->priv
>
> Can one of you enlighten me?
One is an additional pointer load and dereference, and one is a constant
offset from the beginning of the dev structure, calculated at compile
time. netdev_priv() provides the same results as dev->priv but at less
cost.
Jeff
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove casts in drivers/net/arm/
2004-03-02 19:07 ` Jeff Garzik
@ 2004-03-02 19:17 ` Randy.Dunlap
2004-03-02 19:29 ` Jeff Garzik
0 siblings, 1 reply; 18+ messages in thread
From: Randy.Dunlap @ 2004-03-02 19:17 UTC (permalink / raw)
To: Jeff Garzik; +Cc: rmk, netdev
On Tue, 02 Mar 2004 14:07:36 -0500 Jeff Garzik wrote:
| Randy.Dunlap wrote:
| > On Tue, 02 Mar 2004 13:54:36 -0500 Jeff Garzik wrote:
| >
| > | Russell King wrote:
| > | > On Sun, Feb 29, 2004 at 02:34:36PM -0800, Randy.Dunlap wrote:
| > | >
| > | >> drivers/net/arm/am79c961a.c | 18 +++++++++---------
| > | >> drivers/net/arm/ether1.c | 18 +++++++++---------
| > | >> drivers/net/arm/ether3.c | 18 +++++++++---------
| > | >> drivers/net/arm/etherh.c | 4 ++--
| > | >> 4 files changed, 29 insertions(+), 29 deletions(-)
| > | >
| > | >
| > | > I think we should really consider using netdev_priv() in all these places
| > | > so the compiler knows that 'dev' and 'priv' are related.
| > |
| > |
| > | Good point.
| >
| > I respectfully disagree, but if the maintainter won't merge
| > them as is, so be it.
| >
| > I have trouble understanding why this:
| > return (char *)dev + ((sizeof(struct net_device) + 31) & ~31);
| > is better than using a structure->field, i.e.,
| > dev->priv
| >
| > Can one of you enlighten me?
|
|
| One is an additional pointer load and dereference, and one is a constant
| offset from the beginning of the dev structure, calculated at compile
| time. netdev_priv() provides the same results as dev->priv but at less
| cost.
OK, thanks, I see.
I think it's ugly, but you'll get updated patches anyway.
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove casts in drivers/net/arm/
2004-03-02 19:17 ` Randy.Dunlap
@ 2004-03-02 19:29 ` Jeff Garzik
2004-03-02 19:36 ` Russell King
0 siblings, 1 reply; 18+ messages in thread
From: Jeff Garzik @ 2004-03-02 19:29 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: rmk, netdev
Randy.Dunlap wrote:
> On Tue, 02 Mar 2004 14:07:36 -0500 Jeff Garzik wrote:
>
> | Randy.Dunlap wrote:
> | > On Tue, 02 Mar 2004 13:54:36 -0500 Jeff Garzik wrote:
> | >
> | > | Russell King wrote:
> | > | > On Sun, Feb 29, 2004 at 02:34:36PM -0800, Randy.Dunlap wrote:
> | > | >
> | > | >> drivers/net/arm/am79c961a.c | 18 +++++++++---------
> | > | >> drivers/net/arm/ether1.c | 18 +++++++++---------
> | > | >> drivers/net/arm/ether3.c | 18 +++++++++---------
> | > | >> drivers/net/arm/etherh.c | 4 ++--
> | > | >> 4 files changed, 29 insertions(+), 29 deletions(-)
> | > | >
> | > | >
> | > | > I think we should really consider using netdev_priv() in all these places
> | > | > so the compiler knows that 'dev' and 'priv' are related.
> | > |
> | > |
> | > | Good point.
> | >
> | > I respectfully disagree, but if the maintainter won't merge
> | > them as is, so be it.
> | >
> | > I have trouble understanding why this:
> | > return (char *)dev + ((sizeof(struct net_device) + 31) & ~31);
> | > is better than using a structure->field, i.e.,
> | > dev->priv
> | >
> | > Can one of you enlighten me?
> |
> |
> | One is an additional pointer load and dereference, and one is a constant
> | offset from the beginning of the dev structure, calculated at compile
> | time. netdev_priv() provides the same results as dev->priv but at less
> | cost.
>
> OK, thanks, I see.
> I think it's ugly, but you'll get updated patches anyway.
I wasn't rejecting your patches.
In fact, I want to apply your cast patches separate from any
netdev_priv() cleanup.
netdev_priv() should be a separate item on the janitor todo list.
RMK however is free to reject these patches for drivers/net/arm/ of
course...
Jeff
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [janitor] remove casts in drivers/net/arm/
2004-03-02 19:29 ` Jeff Garzik
@ 2004-03-02 19:36 ` Russell King
0 siblings, 0 replies; 18+ messages in thread
From: Russell King @ 2004-03-02 19:36 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Randy.Dunlap, netdev
On Tue, Mar 02, 2004 at 02:29:02PM -0500, Jeff Garzik wrote:
> I wasn't rejecting your patches.
>
> In fact, I want to apply your cast patches separate from any
> netdev_priv() cleanup.
>
> netdev_priv() should be a separate item on the janitor todo list.
>
> RMK however is free to reject these patches for drivers/net/arm/ of
> course...
I'm easy - I probably won't look at this until post-2.6.4 anyway.
However, it seems a bit silly to produce two patches changing the
exact same lines when one patch would do.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2004-03-02 19:36 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20040229142516.3d218ed0.rddunlap@osdl.org>
2004-02-29 22:34 ` [janitor] remove casts in drivers/net/arm/ Randy.Dunlap
2004-03-02 12:10 ` Russell King
[not found] ` <4044D86C.70709@pobox.com>
2004-03-02 19:02 ` Randy.Dunlap
2004-03-02 19:07 ` Jeff Garzik
2004-03-02 19:17 ` Randy.Dunlap
2004-03-02 19:29 ` Jeff Garzik
2004-03-02 19:36 ` Russell King
2004-02-29 22:35 ` [janitor] remove unneeded casts in /hamradio/ Randy.Dunlap
2004-02-29 22:35 ` [janitor] remove unneeded casts in /appletalk/ & /fc/ Randy.Dunlap
2004-02-29 22:38 ` [janitor] remove unneeded casts in net/pcmcia/ Randy.Dunlap
2004-02-29 22:40 ` [janitor] remove unneeded casts in net/wan/ Randy.Dunlap
2004-02-29 22:42 ` [janitor] remove unneeded casts in net/wireless/ Randy.Dunlap
2004-02-29 22:53 ` [janitor] remove unneeded casts in lance drivers Randy.Dunlap
2004-02-29 22:54 ` [janitor] remove unneeded casts in 3com drivers Randy.Dunlap
2004-02-29 22:56 ` [janitor] remove unneeded casts in intel-ee drivers Randy.Dunlap
2004-02-29 22:57 ` [janitor] remove unneeded casts in generic drivers/net/ Randy.Dunlap
2004-02-29 23:01 ` [janitor] remove unneeded casts in 3c527 Randy.Dunlap
2004-02-29 23:02 ` [janitor] remove unneeded casts (others) Randy.Dunlap
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).