Skip to contentSkip to conversation

Staging: rtl8192u: Make function static

PATCH In review Vatika Harlalka 2 participants 3 messages Mar 26, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 Staging: rtl8192u: Make function static

This function is used in only one c file and so
its definition is removed from the header file
and it is declared as static.

---
 drivers/staging/rtl8192u/r8192U.h      | 1 -
 drivers/staging/rtl8192u/r8192U_core.c | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/staging/rtl8192u/r8192U.h +0 -1
index 6c2e438..221dbd7 100644
@@ -1153,7 +1153,6 @@ typedef enum {
 
 bool init_firmware(struct net_device *dev);
 short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb);
-short rtl8192_tx(struct net_device *dev, struct sk_buff *skb);
 
 u32 read_cam(struct net_device *dev, u8 addr);
 void write_cam(struct net_device *dev, u8 addr, u32 data);
drivers/staging/rtl8192u/r8192U_core.c +2 -2
index cbcdcf2..7e3671c 100644
@@ -942,7 +942,7 @@ static void rtl8192_data_hard_resume(struct net_device *dev)
 {
 	// FIXME !!
 }
-
+static short rtl8192_tx(struct net_device *dev, struct sk_buff *skb);
 /* 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
  */
@@ -1487,7 +1487,7 @@ static void tx_zero_isr(struct urb *tx_urb)
  * skb->cb will contain all the following information,
  * priority, morefrag, rate, &dev.
  * */
-short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
+static short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
Signature · 1 line
1.9.1
#1 lore raw
Quoted 9 lines · Vatika Harlalka

This function is used in only one c file and so
its definition is removed from the header file
and it is declared as static.

---
 drivers/staging/rtl8192u/r8192U.h      | 1 -
 drivers/staging/rtl8192u/r8192U_core.c | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

Hi,

Patches look OK, but you have to use a cover letter when you send multi-commit patch sets.

Jes

Quoted 35 lines
drivers/staging/rtl8192u/r8192U.h +0 -1
index 6c2e438..221dbd7 100644
@@ -1153,7 +1153,6 @@ typedef enum {
 
 bool init_firmware(struct net_device *dev);
 short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb);
-short rtl8192_tx(struct net_device *dev, struct sk_buff *skb);
 
 u32 read_cam(struct net_device *dev, u8 addr);
 void write_cam(struct net_device *dev, u8 addr, u32 data);
drivers/staging/rtl8192u/r8192U_core.c +2 -2
index cbcdcf2..7e3671c 100644
@@ -942,7 +942,7 @@ static void rtl8192_data_hard_resume(struct net_device *dev)
 {
 	// FIXME !!
 }
-
+static short rtl8192_tx(struct net_device *dev, struct sk_buff *skb);
 /* 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
  */
@@ -1487,7 +1487,7 @@ static void tx_zero_isr(struct urb *tx_urb)
  * skb->cb will contain all the following information,
  * priority, morefrag, rate, &dev.
  * */
-short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
+static short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
#2 lore raw

Hi Jes
I will send in a new patchset with a cover letter
for this.
Thanks :)