Commit 2131266d authored by David Kilroy's avatar David Kilroy Committed by John W. Linville

orinoco: Fix interesting checkpatch errors

ERROR: "foo * bar" should be "foo *bar"
ERROR: do not initialise statics to 0 or NULL
WARNING: printk() should include KERN_ facility level
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
Signed-off-by: default avatarDavid Kilroy <kilroyd@googlemail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b2f30a0a
...@@ -110,9 +110,9 @@ MODULE_LICENSE("Dual MPL/GPL"); ...@@ -110,9 +110,9 @@ MODULE_LICENSE("Dual MPL/GPL");
/* Level of debugging. Used in the macros in orinoco.h */ /* Level of debugging. Used in the macros in orinoco.h */
#ifdef ORINOCO_DEBUG #ifdef ORINOCO_DEBUG
int orinoco_debug = ORINOCO_DEBUG; int orinoco_debug = ORINOCO_DEBUG;
EXPORT_SYMBOL(orinoco_debug);
module_param(orinoco_debug, int, 0644); module_param(orinoco_debug, int, 0644);
MODULE_PARM_DESC(orinoco_debug, "Debug level"); MODULE_PARM_DESC(orinoco_debug, "Debug level");
EXPORT_SYMBOL(orinoco_debug);
#endif #endif
static int suppress_linkstatus; /* = 0 */ static int suppress_linkstatus; /* = 0 */
...@@ -1650,7 +1650,7 @@ static void orinoco_rx_isr_tasklet(unsigned long data) ...@@ -1650,7 +1650,7 @@ static void orinoco_rx_isr_tasklet(unsigned long data)
static void print_linkstatus(struct net_device *dev, u16 status) static void print_linkstatus(struct net_device *dev, u16 status)
{ {
char * s; char *s;
if (suppress_linkstatus) if (suppress_linkstatus)
return; return;
...@@ -2309,6 +2309,7 @@ int __orinoco_up(struct net_device *dev) ...@@ -2309,6 +2309,7 @@ int __orinoco_up(struct net_device *dev)
return 0; return 0;
} }
EXPORT_SYMBOL(__orinoco_up);
int __orinoco_down(struct net_device *dev) int __orinoco_down(struct net_device *dev)
{ {
...@@ -2340,6 +2341,7 @@ int __orinoco_down(struct net_device *dev) ...@@ -2340,6 +2341,7 @@ int __orinoco_down(struct net_device *dev)
return 0; return 0;
} }
EXPORT_SYMBOL(__orinoco_down);
static int orinoco_allocate_fid(struct net_device *dev) static int orinoco_allocate_fid(struct net_device *dev)
{ {
...@@ -2350,16 +2352,12 @@ static int orinoco_allocate_fid(struct net_device *dev) ...@@ -2350,16 +2352,12 @@ static int orinoco_allocate_fid(struct net_device *dev)
err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid); err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid);
if (err == -EIO && priv->nicbuf_size > TX_NICBUF_SIZE_BUG) { if (err == -EIO && priv->nicbuf_size > TX_NICBUF_SIZE_BUG) {
/* Try workaround for old Symbol firmware bug */ /* Try workaround for old Symbol firmware bug */
printk(KERN_WARNING "%s: firmware ALLOC bug detected "
"(old Symbol firmware?). Trying to work around... ",
dev->name);
priv->nicbuf_size = TX_NICBUF_SIZE_BUG; priv->nicbuf_size = TX_NICBUF_SIZE_BUG;
err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid); err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid);
if (err)
printk("failed!\n"); printk(KERN_WARNING "%s: firmware ALLOC bug detected "
else "(old Symbol firmware?). Work around %s\n",
printk("ok.\n"); dev->name, err ? "failed!" : "ok.");
} }
return err; return err;
...@@ -2382,6 +2380,7 @@ int orinoco_reinit_firmware(struct net_device *dev) ...@@ -2382,6 +2380,7 @@ int orinoco_reinit_firmware(struct net_device *dev)
return err; return err;
} }
EXPORT_SYMBOL(orinoco_reinit_firmware);
static int __orinoco_hw_set_bitrate(struct orinoco_private *priv) static int __orinoco_hw_set_bitrate(struct orinoco_private *priv)
{ {
...@@ -3060,12 +3059,14 @@ irqreturn_t orinoco_interrupt(int irq, void *dev_id) ...@@ -3060,12 +3059,14 @@ irqreturn_t orinoco_interrupt(int irq, void *dev_id)
hermes_t *hw = &priv->hw; hermes_t *hw = &priv->hw;
int count = MAX_IRQLOOPS_PER_IRQ; int count = MAX_IRQLOOPS_PER_IRQ;
u16 evstat, events; u16 evstat, events;
/* These are used to detect a runaway interrupt situation */ /* These are used to detect a runaway interrupt situation.
/* If we get more than MAX_IRQLOOPS_PER_JIFFY iterations in a jiffy, *
* we panic and shut down the hardware */ * If we get more than MAX_IRQLOOPS_PER_JIFFY iterations in a jiffy,
static int last_irq_jiffy = 0; /* jiffies value the last time * we panic and shut down the hardware
* we were called */ */
static int loops_this_jiffy = 0; /* jiffies value the last time we were called */
static int last_irq_jiffy; /* = 0 */
static int loops_this_jiffy; /* = 0 */
unsigned long flags; unsigned long flags;
if (orinoco_lock(priv, &flags) != 0) { if (orinoco_lock(priv, &flags) != 0) {
...@@ -3127,6 +3128,7 @@ irqreturn_t orinoco_interrupt(int irq, void *dev_id) ...@@ -3127,6 +3128,7 @@ irqreturn_t orinoco_interrupt(int irq, void *dev_id)
orinoco_unlock(priv, &flags); orinoco_unlock(priv, &flags);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
EXPORT_SYMBOL(orinoco_interrupt);
/********************************************************************/ /********************************************************************/
/* Power management */ /* Power management */
...@@ -3442,11 +3444,8 @@ static int orinoco_init(struct net_device *dev) ...@@ -3442,11 +3444,8 @@ static int orinoco_init(struct net_device *dev)
printk(KERN_DEBUG "%s: IEEE standard IBSS ad-hoc mode supported\n", printk(KERN_DEBUG "%s: IEEE standard IBSS ad-hoc mode supported\n",
dev->name); dev->name);
if (priv->has_wep) { if (priv->has_wep) {
printk(KERN_DEBUG "%s: WEP supported, ", dev->name); printk(KERN_DEBUG "%s: WEP supported, %s-bit key\n", dev->name,
if (priv->has_big_wep) priv->has_big_wep ? "104" : "40");
printk("104-bit key\n");
else
printk("40-bit key\n");
} }
if (priv->has_wpa) { if (priv->has_wpa) {
printk(KERN_DEBUG "%s: WPA-PSK supported\n", dev->name); printk(KERN_DEBUG "%s: WPA-PSK supported\n", dev->name);
...@@ -3672,6 +3671,7 @@ struct net_device ...@@ -3672,6 +3671,7 @@ struct net_device
return dev; return dev;
} }
EXPORT_SYMBOL(alloc_orinocodev);
void free_orinocodev(struct net_device *dev) void free_orinocodev(struct net_device *dev)
{ {
...@@ -3701,6 +3701,7 @@ void free_orinocodev(struct net_device *dev) ...@@ -3701,6 +3701,7 @@ void free_orinocodev(struct net_device *dev)
orinoco_bss_data_free(priv); orinoco_bss_data_free(priv);
free_netdev(dev); free_netdev(dev);
} }
EXPORT_SYMBOL(free_orinocodev);
/********************************************************************/ /********************************************************************/
/* Wireless extensions */ /* Wireless extensions */
...@@ -6143,15 +6144,6 @@ static const struct ethtool_ops orinoco_ethtool_ops = { ...@@ -6143,15 +6144,6 @@ static const struct ethtool_ops orinoco_ethtool_ops = {
/* Module initialization */ /* Module initialization */
/********************************************************************/ /********************************************************************/
EXPORT_SYMBOL(alloc_orinocodev);
EXPORT_SYMBOL(free_orinocodev);
EXPORT_SYMBOL(__orinoco_up);
EXPORT_SYMBOL(__orinoco_down);
EXPORT_SYMBOL(orinoco_reinit_firmware);
EXPORT_SYMBOL(orinoco_interrupt);
/* Can't be declared "const" or the whole __initdata section will /* Can't be declared "const" or the whole __initdata section will
* become const */ * become const */
static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment