staging: wilc1000: Modify tcp_process to return void rather than int
PATCH 1/1 staging: wilc1000: Modify tcp_process to return void rather than int
tcp_process() returns int, which is not used anywhere. So, change function header to return void instead of int and remove all uses of the local variable ret, which is used as a return variable in the function.
--- drivers/staging/wilc1000/wilc_wlan.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/staging/wilc1000/wilc_wlan.c +2 -7
@@ -207,9 +207,8 @@ static inline int add_tcp_pending_ack(u32 ack, u32 session_index,return 0 ; } -static inline int tcp_process (struct net_device *dev,struct txq_entry_t *tqe) +static inline void tcp_process (struct net_device *dev,struct txq_entry_t *tqe) { -int ret;u8 *eth_hdr_ptr;u8 *buffer = tqe->buffer;unsigned short h_proto;
@@ -267,14 +266,10 @@ static inline int tcp_process(struct net_device *dev, struct txq_entry_t *tqe)add_tcp_pending_ack (ack_no, i, tqe); } - }else { - ret =0 ; } - }else { - ret =0 ; + }spin_unlock_irqrestore (&wilc->txq_spinlock, flags); -return ret; }static int wilc_wlan_txq_filter_dup_tcp_ack (struct net_device *dev)
Signature · 1 line
2.5.0
Quoted 5 lines · Janani Ravichandran
tcp_process()returns int, which is not used anywhere. So, change function header to return void instead of int and remove all uses of the local variable ret, which is used as a return variable in the function.Signed-off-by Janani Ravichandran <[email protected]>
One more step.
Quoted 20 lines
--- drivers/staging/wilc1000/wilc_wlan.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)drivers/staging/wilc1000/wilc_wlan.c +1
-2@@ -207,9 +207,8 @@ static inline int add_tcp_pending_ack(u32 ack, u32 session_index,return 0 ; } -static inline int tcp_process (struct net_device *dev,struct txq_entry_t *tqe) +static inline void tcp_process (struct net_device *dev,struct txq_entry_t *tqe) { -int ret;u8 *eth_hdr_ptr;u8 *buffer = tqe->buffer;unsigned short h_proto;
drivers/staging/wilc1000/wilc_wlan.c static inline int tcp_process(struct net_device *dev, struct txq_entry_t *tqe) · line 268
Quoted 3 lines
drivers/staging/wilc1000/wilc_wlan.c +0
-0@@ -267,14 +266,10 @@ static inline int tcp_process(struct net_device *dev, struct txq_entry_t *tqe)add_tcp_pending_ack (ack_no, i, tqe); }
Remove new line here.
drivers/staging/wilc1000/wilc_wlan.c static inline int tcp_process(struct net_device *dev, struct txq_entry_t *tqe) · line 270
Quoted 6 lines
drivers/staging/wilc1000/wilc_wlan.c +1
-4- }else { - ret =0 ; } - }else { - ret =0 ; +
Don't add new line here.
Quoted 7 lines
drivers/staging/wilc1000/wilc_wlan.c +0
-2}spin_unlock_irqrestore (&wilc->txq_spinlock, flags); -return ret; }static int wilc_wlan_txq_filter_dup_tcp_ack (struct net_device *dev) --