git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
arch
/
ia64
/
hp
/
sim
/
simeth.c
diff --git
a/arch/ia64/hp/sim/simeth.c
b/arch/ia64/hp/sim/simeth.c
index
3c9c307
..
0639ec0
100644
(file)
--- a/
arch/ia64/hp/sim/simeth.c
+++ b/
arch/ia64/hp/sim/simeth.c
@@
-20,7
+20,7
@@
#include <linux/if_arp.h>
#include <linux/skbuff.h>
#include <linux/notifier.h>
#include <linux/if_arp.h>
#include <linux/skbuff.h>
#include <linux/notifier.h>
-#include <
asm
/bitops.h>
+#include <
linux
/bitops.h>
#include <asm/system.h>
#include <asm/irq.h>
#include <asm/system.h>
#include <asm/irq.h>
@@
-191,7
+191,7
@@
simeth_probe1(void)
unsigned char mac_addr[ETH_ALEN];
struct simeth_local *local;
struct net_device *dev;
unsigned char mac_addr[ETH_ALEN];
struct simeth_local *local;
struct net_device *dev;
- int fd, i, err;
+ int fd, i, err
, rc
;
/*
* XXX Fix me
/*
* XXX Fix me
@@
-228,7
+228,9
@@
simeth_probe1(void)
return err;
}
return err;
}
- dev->irq = assign_irq_vector(AUTO_ASSIGN);
+ if ((rc = assign_irq_vector(AUTO_ASSIGN)) < 0)
+ panic("%s: out of interrupt vectors!\n", __FUNCTION__);
+ dev->irq = rc;
/*
* attach the interrupt in the simulator, this does enable interrupts
/*
* attach the interrupt in the simulator, this does enable interrupts
@@
-286,7
+288,7
@@
static __inline__ int dev_is_ethdev(struct net_device *dev)
static int
simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr)
{
static int
simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr)
{
- struct net_device *dev =
(struct net_device *)
ptr;
+ struct net_device *dev = ptr;
struct simeth_local *local;
struct in_device *in_dev;
struct in_ifaddr **ifap = NULL;
struct simeth_local *local;
struct in_device *in_dev;
struct in_ifaddr **ifap = NULL;
@@
-382,7
+384,7
@@
frame_print(unsigned char *from, unsigned char *frame, int len)
static int
simeth_tx(struct sk_buff *skb, struct net_device *dev)
{
static int
simeth_tx(struct sk_buff *skb, struct net_device *dev)
{
- struct simeth_local *local =
(struct simeth_local *)
dev->priv;
+ struct simeth_local *local = dev->priv;
#if 0
/* ensure we have at least ETH_ZLEN bytes (min frame size) */
#if 0
/* ensure we have at least ETH_ZLEN bytes (min frame size) */
@@
-446,7
+448,7
@@
simeth_rx(struct net_device *dev)
int len;
int rcv_count = SIMETH_RECV_MAX;
int len;
int rcv_count = SIMETH_RECV_MAX;
- local =
(struct simeth_local *)
dev->priv;
+ local = dev->priv;
/*
* the loop concept has been borrowed from other drivers
* looks to me like it's a throttling thing to avoid pushing to many
/*
* the loop concept has been borrowed from other drivers
* looks to me like it's a throttling thing to avoid pushing to many
@@
-515,7
+517,7
@@
simeth_interrupt(int irq, void *dev_id, struct pt_regs * regs)
static struct net_device_stats *
simeth_get_stats(struct net_device *dev)
{
static struct net_device_stats *
simeth_get_stats(struct net_device *dev)
{
- struct simeth_local
*local = (struct simeth_local *)
dev->priv;
+ struct simeth_local
*local =
dev->priv;
return &local->stats;
}
return &local->stats;
}