brcmfmac: btcoex: replace init_timer with setup_timer
PATCH 1/1 brcmfmac: btcoex: replace init_timer with setup_timer
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.
---
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.
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(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c +1 -3
@@ -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;
Signature · 1 line
2.12.2
Quoted 12 lines · Xie Qirong
The combination of
init_timerand setting up the data and function field manually is equivalent to callingsetup_timer(). This is an api consolidation only and improves readability.Acked-by Arend van Spriel <[email protected]>Signed-off-by Xie Qirong <[email protected]>---
setup_timer.coccisuggested the following improvement:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Usesetup_timerfunction for function on line 384.
Quoted 5 lines
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=yKernel version: 4.11.0 (localversion-next is next-20170512)
How is this different from the first version?
https://patchwork.kernel.org/patch/9709467/
Always add patch version "[PATCH v2]" and a changelog. I added a section "Frequent problems" to the wiki to mention about these common problems:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#patch_version_missing
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#changelog_missing
Signature · 1 line
Kalle Valo
Arend van Spriel
maintainerQuoted 18 lines · Kalle Valo
Quoted 16 lines · Xie Qirong
The combination of
init_timerand setting up the data and function field manually is equivalent to callingsetup_timer(). This is an api consolidation only and improves readability.Acked-by Arend van Spriel <[email protected]>Signed-off-by Xie Qirong <[email protected]>---
setup_timer.coccisuggested the following improvement:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Usesetup_timerfunction for function on line 384.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
Quoted 5 lines
Quoted 1 line
Kernel version: 4.11.0 (localversion-next is next-20170512)
How is this different from the first version?
Hi Kalle,
This is actually the third version. You are referring to the not-specifically-named "v2" here, but how are you to know ;-) This third version is the same as v1 on which I commented to put the coccinelle output in the commit message. So I would still keep v2 if nothing else changed in v3 apart from my Acked-by: tag.
Regards,
Arend
Quoted 7 lines
Always add patch version "[PATCH v2]" and a changelog. I added a section "Frequent problems" to the wiki to mention about these common problems:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#patch_version_missing
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#changelog_missing
Quoted 21 lines · Arend van Spriel
Quoted 20 lines · Kalle Valo
Quoted 17 lines · Xie Qirong
The combination of
init_timerand setting up the data and function field manually is equivalent to callingsetup_timer(). This is an api consolidation only and improves readability.Acked-by Arend van Spriel <[email protected]>Signed-off-by Xie Qirong <[email protected]>---
setup_timer.coccisuggested the following improvement:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Usesetup_timerfunction for function on line 384.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=yKernel version: 4.11.0 (localversion-next is next-20170512)
Quoted 8 lines
Quoted 3 lines
How is this different from the first version?
Hi Kalle,
This is actually the third version. You are referring to the not-specifically-named "v2" here, but how are you to know ;-)
Exactly :)
Quoted 3 lines
This third version is the same as v1 on which I commented to put the coccinelle output in the commit message. So I would still keep v2 if nothing else changed in v3 apart from my Acked-by: tag.
Ok, but I can easily take v3 (ie. this one) so that you get credit ;)
Signature · 1 line
Kalle Valo
Arend van Spriel
maintainerQuoted 32 lines · Kalle Valo
Quoted 21 lines · Arend van Spriel
Quoted 20 lines · Kalle Valo
Quoted 17 lines · Xie Qirong
The combination of
init_timerand setting up the data and function field manually is equivalent to callingsetup_timer(). This is an api consolidation only and improves readability.Acked-by Arend van Spriel <[email protected]>Signed-off-by Xie Qirong <[email protected]>---
setup_timer.coccisuggested the following improvement:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Usesetup_timerfunction for function on line 384.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=yKernel version: 4.11.0 (localversion-next is next-20170512)Quoted 8 lines
Quoted 3 lines
How is this different from the first version?
Hi Kalle,
This is actually the third version. You are referring to the not-specifically-named "v2" here, but how are you to know ;-)
Quoted 7 lines
Exactly :)
Quoted 3 lines
This third version is the same as v1 on which I commented to put the coccinelle output in the commit message. So I would still keep v2 if nothing else changed in v3 apart from my Acked-by: tag.
Ok, but I can easily take v3 (ie. this one) so that you get credit ;)
If you add the coccinelle output in the commit message, ie. above the '---' that would be great. So for both you have to do additional stuff provided you find it useful to have the coccinelle output. :-p
Regards,
Arend
Quoted 9 lines · Arend van Spriel
Quoted 5 lines
Quoted 3 lines
This third version is the same as v1 on which I commented to put the coccinelle output in the commit message. So I would still keep v2 if nothing else changed in v3 apart from my Acked-by: tag.
Ok, but I can easily take v3 (ie. this one) so that you get credit ;)
If you add the coccinelle output in the commit message, ie. above the '---' that would be great. So for both you have to do additional stuff provided you find it useful to have the coccinelle output. :-p
Sure, I can add that. Thanks to my patchwork script it's actually pretty easy to edit commit logs before it commits them. If only I had time to implement a proper GTK interface for the script...
Signature · 1 line
Kalle Valo