linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] brcmfmac: btcoex: replace init_timer with setup_timer
@ 2017-05-12  9:32 Xie Qirong
  2017-05-22 15:19 ` [v4] " Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Xie Qirong @ 2017-05-12  9:32 UTC (permalink / raw)
  To: Arend van Spriel, Franky Lin, Hante Meuleman, Kalle Valo
  Cc: linux-wireless, brcm80211-dev-list.pdl, netdev, linux-kernel, Xie Qirong

setup_timer.cocci suggested the following improvement:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Use
setup_timer function for function on line 384.

Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Xie Qirong <cheerx1994@gmail.com>
---

 The combination of init_timer and setting up the data and function field
 manually is equivalent to calling setup_timer(). This is an api
 consolidation only and improves readability.

 Patch was compile checked with: x86_64_defconfig + CONFIG_BRCMFMAC=y +
 CONFIG_BRCMFMAC_USB=y + CONFIG_BRCMFMAC_PCIE=y + CONFIG_BRCM_TRACING=y +
 CONFIG_BRCMDBG=y

 Kernel version: 4.11.0 (localversion-next is next-20170512)

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c
index 14a70d4b4e86..3559fb5b8fb0 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c
@@ -380,9 +380,7 @@ int brcmf_btcoex_attach(struct brcmf_cfg80211_info *cfg)
 	/* Set up timer for BT  */
 	btci->timer_on = false;
 	btci->timeout = BRCMF_BTCOEX_OPPR_WIN_TIME;
-	init_timer(&btci->timer);
-	btci->timer.data = (ulong)btci;
-	btci->timer.function = brcmf_btcoex_timerfunc;
+	setup_timer(&btci->timer, brcmf_btcoex_timerfunc, (ulong)btci);
 	btci->cfg = cfg;
 	btci->saved_regs_part1 = false;
 	btci->saved_regs_part2 = false;
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [v4] brcmfmac: btcoex: replace init_timer with setup_timer
  2017-05-12  9:32 [PATCH v4] brcmfmac: btcoex: replace init_timer with setup_timer Xie Qirong
@ 2017-05-22 15:19 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2017-05-22 15:19 UTC (permalink / raw)
  To: Xie Qirong
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman, linux-wireless,
	brcm80211-dev-list.pdl, netdev, linux-kernel, Xie Qirong

Xie Qirong <cheerx1994@gmail.com> wrote:
> setup_timer.cocci suggested the following improvement:
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Use
> setup_timer function for function on line 384.
> 
> The combination of init_timer and setting up the data and function field
> manually is equivalent to calling setup_timer(). This is an api
> consolidation only and improves readability.
> 
> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Signed-off-by: Xie Qirong <cheerx1994@gmail.com>

Patch applied to wireless-drivers-next.git, thanks.

6572e5f72d01 brcmfmac: btcoex: replace init_timer with setup_timer

-- 
https://patchwork.kernel.org/patch/9723793/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-22 15:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-12  9:32 [PATCH v4] brcmfmac: btcoex: replace init_timer with setup_timer Xie Qirong
2017-05-22 15:19 ` [v4] " Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).