Skip to content

Commit

Permalink
staging: rtl8187se: fix static sparse warnings
Browse files Browse the repository at this point in the history
This patch fixes sparse warnings regarding functions that should be
static in driver rtl8187se.

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Teodora Baluta authored and Greg Kroah-Hartman committed Oct 19, 2013
1 parent 8e87b1b commit 17ab33e
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 60 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ static inline void ieee80211_extract_country_ie(

}

int
static int
ieee80211_TranslateToDbm(
unsigned char SignalStrengthIndex // 0-100 index.
)
Expand Down
6 changes: 4 additions & 2 deletions drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,8 @@ static struct sk_buff* ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d
return skb;
}

struct sk_buff* ieee80211_assoc_resp(struct ieee80211_device *ieee, u8 *dest)
static struct sk_buff* ieee80211_assoc_resp(struct ieee80211_device *ieee,
u8 *dest)
{
struct sk_buff *skb;
u8* tag;
Expand Down Expand Up @@ -940,7 +941,8 @@ struct sk_buff* ieee80211_assoc_resp(struct ieee80211_device *ieee, u8 *dest)
return skb;
}

struct sk_buff* ieee80211_auth_resp(struct ieee80211_device *ieee,int status, u8 *dest)
static struct sk_buff* ieee80211_auth_resp(struct ieee80211_device *ieee,
int status, u8 *dest)
{
struct sk_buff *skb;
struct ieee80211_authentication *auth;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ void ieee80211_txb_free(struct ieee80211_txb *txb) {
kfree(txb);
}

struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
gfp_t gfp_mask)
static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
gfp_t gfp_mask)
{
struct ieee80211_txb *txb;
int i;
Expand Down
85 changes: 43 additions & 42 deletions drivers/staging/rtl8187se/r8180_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,18 +275,18 @@ static int proc_get_stats_tx(struct seq_file *m, void *v)
return 0;
}

void rtl8180_proc_module_init(void)
static void rtl8180_proc_module_init(void)
{
DMESG("Initializing proc filesystem");
rtl8180_proc = proc_mkdir(RTL8180_MODULE_NAME, init_net.proc_net);
}

void rtl8180_proc_module_remove(void)
static void rtl8180_proc_module_remove(void)
{
remove_proc_entry(RTL8180_MODULE_NAME, init_net.proc_net);
}

void rtl8180_proc_remove_one(struct net_device *dev)
static void rtl8180_proc_remove_one(struct net_device *dev)
{
remove_proc_subtree(dev->name, rtl8180_proc);
}
Expand Down Expand Up @@ -325,7 +325,7 @@ static const struct rtl8180_proc_file rtl8180_proc_files[] = {
{ "" }
};

void rtl8180_proc_init_one(struct net_device *dev)
static void rtl8180_proc_init_one(struct net_device *dev)
{
const struct rtl8180_proc_file *f;
struct proc_dir_entry *dir;
Expand All @@ -351,8 +351,8 @@ void rtl8180_proc_init_one(struct net_device *dev)
data type+functions in kernel
*/

short buffer_add(struct buffer **buffer, u32 *buf, dma_addr_t dma,
struct buffer **bufferhead)
static short buffer_add(struct buffer **buffer, u32 *buf, dma_addr_t dma,
struct buffer **bufferhead)
{
struct buffer *tmp;

Expand Down Expand Up @@ -463,7 +463,7 @@ int get_curr_tx_free_desc(struct net_device *dev, int priority)
return ret;
}

short check_nic_enought_desc(struct net_device *dev, int priority)
static short check_nic_enought_desc(struct net_device *dev, int priority)
{
struct r8180_priv *priv = ieee80211_priv(dev);
struct ieee80211_device *ieee = netdev_priv(dev);
Expand Down Expand Up @@ -589,7 +589,7 @@ void fix_rx_fifo(struct net_device *dev)
set_nic_rxring(dev);
}

void rtl8180_irq_disable(struct net_device *dev)
static void rtl8180_irq_disable(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);

Expand Down Expand Up @@ -705,8 +705,8 @@ void rtl8180_rtx_disable(struct net_device *dev)
dev_kfree_skb_any(priv->rx_skb);
}

short alloc_tx_desc_ring(struct net_device *dev, int bufsize, int count,
int addr)
static short alloc_tx_desc_ring(struct net_device *dev, int bufsize, int count,
int addr)
{
int i;
u32 *desc;
Expand Down Expand Up @@ -830,7 +830,7 @@ short alloc_tx_desc_ring(struct net_device *dev, int bufsize, int count,
return 0;
}

void free_tx_desc_rings(struct net_device *dev)
static void free_tx_desc_rings(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
struct pci_dev *pdev = priv->pdev;
Expand Down Expand Up @@ -866,7 +866,7 @@ void free_tx_desc_rings(struct net_device *dev)
buffer_free(dev, &(priv->txbeaconbufs), priv->txbuffsize, 1);
}

void free_rx_desc_ring(struct net_device *dev)
static void free_rx_desc_ring(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
struct pci_dev *pdev = priv->pdev;
Expand All @@ -878,7 +878,7 @@ void free_rx_desc_ring(struct net_device *dev)
buffer_free(dev, &(priv->rxbuffer), priv->rxbuffersize, 0);
}

short alloc_rx_desc_ring(struct net_device *dev, u16 bufsize, int count)
static short alloc_rx_desc_ring(struct net_device *dev, u16 bufsize, int count)
{
int i;
u32 *desc;
Expand Down Expand Up @@ -1092,7 +1092,7 @@ u16 N_DBPSOfRate(u16 DataRate)
/*
* For Netgear case, they want good-looking signal strength.
*/
long NetgearSignalStrengthTranslate(long LastSS, long CurrSS)
static long NetgearSignalStrengthTranslate(long LastSS, long CurrSS)
{
long RetSS;

Expand Down Expand Up @@ -1128,7 +1128,7 @@ long NetgearSignalStrengthTranslate(long LastSS, long CurrSS)
/*
* Translate 0-100 signal strength index into dBm.
*/
long TranslateToDbm8185(u8 SignalStrengthIndex)
static long TranslateToDbm8185(u8 SignalStrengthIndex)
{
long SignalPower;

Expand All @@ -1145,8 +1145,8 @@ long TranslateToDbm8185(u8 SignalStrengthIndex)
* No dramatic adjustion is apply because dynamic mechanism need some degree
* of correctness. Ported from 8187B.
*/
void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv,
bool bCckRate)
static void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv,
bool bCckRate)
{
/* Determin the current packet is CCK rate. */
priv->bCurCCKPkt = bCckRate;
Expand All @@ -1170,7 +1170,7 @@ void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv,
/*
* This is rough RX isr handling routine
*/
void rtl8180_rx(struct net_device *dev)
static void rtl8180_rx(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
struct sk_buff *tmp_skb;
Expand Down Expand Up @@ -1496,7 +1496,7 @@ void rtl8180_rx(struct net_device *dev)
}


void rtl8180_dma_kick(struct net_device *dev, int priority)
static void rtl8180_dma_kick(struct net_device *dev, int priority)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);

Expand All @@ -1508,7 +1508,7 @@ void rtl8180_dma_kick(struct net_device *dev, int priority)
force_pci_posting(dev);
}

void rtl8180_data_hard_stop(struct net_device *dev)
static void rtl8180_data_hard_stop(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);

Expand All @@ -1518,7 +1518,7 @@ void rtl8180_data_hard_stop(struct net_device *dev)
rtl8180_set_mode(dev, EPROM_CMD_NORMAL);
}

void rtl8180_data_hard_resume(struct net_device *dev)
static void rtl8180_data_hard_resume(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);

Expand All @@ -1532,8 +1532,9 @@ void rtl8180_data_hard_resume(struct net_device *dev)
* This function TX data frames when the ieee80211 stack requires this.
* It checks also if we need to stop the ieee tx queue, eventually do it
*/
void rtl8180_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int
rate) {
static void rtl8180_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
int rate)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
int mode;
struct ieee80211_hdr_3addr *h = (struct ieee80211_hdr_3addr *) skb->data;
Expand Down Expand Up @@ -1584,7 +1585,7 @@ rate) {
* might use a different lock than tx_lock (for example mgmt_tx_lock)
*/
/* these function may loop if invoked with 0 descriptors or 0 len buffer */
int rtl8180_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
static int rtl8180_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
unsigned long flags;
Expand Down Expand Up @@ -1660,7 +1661,7 @@ u16 rtl8180_len2duration(u32 len, short rate, short *ext)
return duration;
}

void rtl8180_prepare_beacon(struct net_device *dev)
static void rtl8180_prepare_beacon(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
struct sk_buff *skb;
Expand Down Expand Up @@ -1953,7 +1954,7 @@ short rtl8180_tx(struct net_device *dev, u8 *txbuf, int len, int priority,

void rtl8180_irq_rx_tasklet(struct r8180_priv *priv);

void rtl8180_link_change(struct net_device *dev)
static void rtl8180_link_change(struct net_device *dev)
{
struct r8180_priv *priv = ieee80211_priv(dev);
u16 beacon_interval;
Expand All @@ -1976,7 +1977,7 @@ void rtl8180_link_change(struct net_device *dev)
rtl8180_set_chan(dev, priv->chan);
}

void rtl8180_rq_tx_ack(struct net_device *dev)
static void rtl8180_rq_tx_ack(struct net_device *dev)
{

struct r8180_priv *priv = ieee80211_priv(dev);
Expand All @@ -1985,7 +1986,7 @@ void rtl8180_rq_tx_ack(struct net_device *dev)
priv->ack_tx_to_ieee = 1;
}

short rtl8180_is_tx_queue_empty(struct net_device *dev)
static short rtl8180_is_tx_queue_empty(struct net_device *dev)
{

struct r8180_priv *priv = ieee80211_priv(dev);
Expand Down Expand Up @@ -2023,7 +2024,7 @@ short rtl8180_is_tx_queue_empty(struct net_device *dev)
return 1;
}

void rtl8180_hw_wakeup(struct net_device *dev)
static void rtl8180_hw_wakeup(struct net_device *dev)
{
unsigned long flags;
struct r8180_priv *priv = ieee80211_priv(dev);
Expand All @@ -2035,7 +2036,7 @@ void rtl8180_hw_wakeup(struct net_device *dev)
spin_unlock_irqrestore(&priv->ps_lock, flags);
}

void rtl8180_hw_sleep_down(struct net_device *dev)
static void rtl8180_hw_sleep_down(struct net_device *dev)
{
unsigned long flags;
struct r8180_priv *priv = ieee80211_priv(dev);
Expand All @@ -2046,7 +2047,7 @@ void rtl8180_hw_sleep_down(struct net_device *dev)
spin_unlock_irqrestore(&priv->ps_lock, flags);
}

void rtl8180_hw_sleep(struct net_device *dev, u32 th, u32 tl)
static void rtl8180_hw_sleep(struct net_device *dev, u32 th, u32 tl)
{
struct r8180_priv *priv = ieee80211_priv(dev);
u32 rb = jiffies;
Expand Down Expand Up @@ -2093,7 +2094,7 @@ void rtl8180_hw_sleep(struct net_device *dev, u32 th, u32 tl)
spin_unlock_irqrestore(&priv->ps_lock, flags);
}

void rtl8180_wmm_param_update(struct work_struct *work)
static void rtl8180_wmm_param_update(struct work_struct *work)
{
struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, wmm_param_update_wq);
struct net_device *dev = ieee->dev;
Expand Down Expand Up @@ -2195,7 +2196,7 @@ void rtl8180_hw_sleep_wq(struct work_struct *work);
void rtl8180_sw_antenna_wq(struct work_struct *work);
void rtl8180_watch_dog(struct net_device *dev);

void watch_dog_adaptive(unsigned long data)
static void watch_dog_adaptive(unsigned long data)
{
struct r8180_priv *priv = ieee80211_priv((struct net_device *)data);

Expand Down Expand Up @@ -2757,7 +2758,7 @@ void rtl8185_tx_antenna(struct net_device *dev, u8 ant)
mdelay(1);
}

void rtl8185_write_phy(struct net_device *dev, u8 adr, u32 data)
static void rtl8185_write_phy(struct net_device *dev, u8 adr, u32 data)
{
u32 phyw;

Expand Down Expand Up @@ -2969,7 +2970,7 @@ void rtl8180_watch_dog(struct net_device *dev)
priv->ieee80211->NumRxBcnInPeriod = 0;
}

int _rtl8180_up(struct net_device *dev)
static int _rtl8180_up(struct net_device *dev)
{
struct r8180_priv *priv = ieee80211_priv(dev);

Expand All @@ -2991,7 +2992,7 @@ int _rtl8180_up(struct net_device *dev)
return 0;
}

int rtl8180_open(struct net_device *dev)
static int rtl8180_open(struct net_device *dev)
{
struct r8180_priv *priv = ieee80211_priv(dev);
int ret;
Expand All @@ -3012,7 +3013,7 @@ int rtl8180_up(struct net_device *dev)
return _rtl8180_up(dev);
}

int rtl8180_close(struct net_device *dev)
static int rtl8180_close(struct net_device *dev)
{
struct r8180_priv *priv = ieee80211_priv(dev);
int ret;
Expand Down Expand Up @@ -3065,7 +3066,7 @@ void rtl8180_restart_wq(struct work_struct *work)
up(&priv->wx_sem);
}

void rtl8180_restart(struct net_device *dev)
static void rtl8180_restart(struct net_device *dev)
{
struct r8180_priv *priv = ieee80211_priv(dev);

Expand Down Expand Up @@ -3106,7 +3107,7 @@ static void r8180_set_multicast(struct net_device *dev)
priv->promisc = promisc;
}

int r8180_set_mac_adr(struct net_device *dev, void *mac)
static int r8180_set_mac_adr(struct net_device *dev, void *mac)
{
struct r8180_priv *priv = ieee80211_priv(dev);
struct sockaddr *addr = mac;
Expand All @@ -3129,7 +3130,7 @@ int r8180_set_mac_adr(struct net_device *dev, void *mac)
}

/* based on ipw2200 driver */
int rtl8180_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
static int rtl8180_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
struct iwreq *wrq = (struct iwreq *) rq;
Expand Down Expand Up @@ -3368,7 +3369,7 @@ static void __exit rtl8180_pci_module_exit(void)
DMESG("Exiting");
}

void rtl8180_try_wake_queue(struct net_device *dev, int pri)
static void rtl8180_try_wake_queue(struct net_device *dev, int pri)
{
unsigned long flags;
short enough_desc;
Expand All @@ -3382,7 +3383,7 @@ void rtl8180_try_wake_queue(struct net_device *dev, int pri)
ieee80211_rtl_wake_queue(priv->ieee80211);
}

void rtl8180_tx_isr(struct net_device *dev, int pri, short error)
static void rtl8180_tx_isr(struct net_device *dev, int pri, short error)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
u32 *tail; /* tail virtual addr */
Expand Down
Loading

0 comments on commit 17ab33e

Please sign in to comment.