[PATCH] brcm80211: brcmsmac: dma: Remove some unused functions

Subsystems: networking drivers (wireless), the rest

STALE4243d

3 messages, 2 authors, 2015-01-04 · open the first message on its own page

[PATCH] brcm80211: brcmsmac: dma: Remove some unused functions

From: Rickard Strandqvist <hidden>
Date: 2015-01-04 00:44:57

Removes some functions that are not used anywhere:
dma_txflush() dma_txsuspended()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <redacted>
---
 drivers/net/wireless/brcm80211/brcmsmac/dma.c |   19 -------------------
 drivers/net/wireless/brcm80211/brcmsmac/dma.h |    2 --
 2 files changed, 21 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/dma.c b/drivers/net/wireless/brcm80211/brcmsmac/dma.c
index 796f5f9..bca233a 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/dma.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/dma.c
@@ -1192,16 +1192,6 @@ void dma_txresume(struct dma_pub *pub)
 	bcma_mask32(di->core, DMA64TXREGOFFS(di, control), ~D64_XC_SE);
 }
 
-bool dma_txsuspended(struct dma_pub *pub)
-{
-	struct dma_info *di = container_of(pub, struct dma_info, dma);
-
-	return (di->ntxd == 0) ||
-	       ((bcma_read32(di->core,
-			     DMA64TXREGOFFS(di, control)) & D64_XC_SE) ==
-		D64_XC_SE);
-}
-
 void dma_txreclaim(struct dma_pub *pub, enum txd_range range)
 {
 	struct dma_info *di = container_of(pub, struct dma_info, dma);
@@ -1425,15 +1415,6 @@ int dma_txfast(struct brcms_c_info *wlc, struct dma_pub *pub,
 	return -ENOSPC;
 }
 
-void dma_txflush(struct dma_pub *pub)
-{
-	struct dma_info *di = container_of(pub, struct dma_info, dma);
-	struct brcms_ampdu_session *session = &di->ampdu_session;
-
-	if (!skb_queue_empty(&session->skb_list))
-		ampdu_finalize(di);
-}
-
 int dma_txpending(struct dma_pub *pub)
 {
 	struct dma_info *di = container_of(pub, struct dma_info, dma);
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/dma.h b/drivers/net/wireless/brcm80211/brcmsmac/dma.h
index ff5b80b..210ec72 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/dma.h
+++ b/drivers/net/wireless/brcm80211/brcmsmac/dma.h
@@ -88,11 +88,9 @@ bool dma_txreset(struct dma_pub *pub);
 void dma_txinit(struct dma_pub *pub);
 int dma_txfast(struct brcms_c_info *wlc, struct dma_pub *pub,
 	       struct sk_buff *p0);
-void dma_txflush(struct dma_pub *pub);
 int dma_txpending(struct dma_pub *pub);
 void dma_kick_tx(struct dma_pub *pub);
 void dma_txsuspend(struct dma_pub *pub);
-bool dma_txsuspended(struct dma_pub *pub);
 void dma_txresume(struct dma_pub *pub);
 void dma_txreclaim(struct dma_pub *pub, enum txd_range range);
 void dma_rxreclaim(struct dma_pub *pub);
-- 
1.7.10.4

Re: [PATCH] brcm80211: brcmsmac: dma: Remove some unused functions

From: Larry Finger <hidden>
Date: 2015-01-04 06:21:45

On 01/03/2015 06:47 PM, Rickard Strandqvist wrote:
Removes some functions that are not used anywhere:
dma_txflush() dma_txsuspended()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <redacted>
---
  drivers/net/wireless/brcm80211/brcmsmac/dma.c |   19 -------------------
  drivers/net/wireless/brcm80211/brcmsmac/dma.h |    2 --
  2 files changed, 21 deletions(-)
Just because file dma.c is involved, it does not need to be, nor should it be in 
the subject line. You could specify the driver names in the file tree after 
wireless. In this instance, one possible subject would be "brcm80211: brcmsmac: 
Remove some unused functions". On the other hand, if you look at "git log" to 
see past patches, the driver maintainers even leave off the brcm80211 part, thus 
to match them, the subject should be "brcmsmac: Remove some unused functions".

As was suggested earlier, you need to look at the precedents. Keeping a uniform 
method of patch naming helps when looking for patches in the git log.

Larry


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] brcm80211: brcmsmac: dma: Remove some unused functions

From: Rickard Strandqvist <hidden>
Date: 2015-01-04 12:44:04

2015-01-04 7:21 GMT+01:00 Larry Finger [off-list ref]:
On 01/03/2015 06:47 PM, Rickard Strandqvist wrote:
quoted
Removes some functions that are not used anywhere:
dma_txflush() dma_txsuspended()

This was partially found by using a static code analysis program called
cppcheck.

Signed-off-by: Rickard Strandqvist
[off-list ref]
---
  drivers/net/wireless/brcm80211/brcmsmac/dma.c |   19 -------------------
  drivers/net/wireless/brcm80211/brcmsmac/dma.h |    2 --
  2 files changed, 21 deletions(-)

Just because file dma.c is involved, it does not need to be, nor should it
be in the subject line. You could specify the driver names in the file tree
after wireless. In this instance, one possible subject would be "brcm80211:
brcmsmac: Remove some unused functions". On the other hand, if you look at
"git log" to see past patches, the driver maintainers even leave off the
brcm80211 part, thus to match them, the subject should be "brcmsmac: Remove
some unused functions".

As was suggested earlier, you need to look at the precedents. Keeping a
uniform method of patch naming helps when looking for patches in the git
log.

Larry

Hi Larry

As I hope you can see I have made some changes regarding the
subject-line. Thought it was an advantage to be able to see which file
I actually removed something from.
There seems to be a big focus on getting right on subject-line right
in recent weeks.

I wonder why there is a script that takes a file name, and respond
with an appropriate subject line?

But ok, I change my script accordingly. Should I submit the patch again?


Kind regards
Rickard Strandqvist
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help