* [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer
@ 2017-05-03 7:35 Xie Qirong
2017-05-03 8:05 ` Arend van Spriel
0 siblings, 1 reply; 9+ messages in thread
From: Xie Qirong @ 2017-05-03 7:35 UTC (permalink / raw)
To: Arend van Spriel, Franky Lin, Hante Meuleman, Kalle Valo
Cc: linux-wireless, brcm80211-dev-list.pdl, netdev, linux-kernel,
Piotr Haber, Xie Qirong
Signed-off-by: Xie Qirong <cheerx1994@gmail.com>
---
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: next-20170502 (localversion-next is next-20170502)
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 14a70d4..3559fb5 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.9.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer
2017-05-03 7:35 [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer Xie Qirong
@ 2017-05-03 8:05 ` Arend van Spriel
0 siblings, 0 replies; 9+ messages in thread
From: Arend van Spriel @ 2017-05-03 8:05 UTC (permalink / raw)
To: Xie Qirong, Franky Lin, Hante Meuleman, Kalle Valo
Cc: linux-wireless, brcm80211-dev-list.pdl, netdev, linux-kernel,
Piotr Haber
On 5/3/2017 9:35 AM, Xie Qirong wrote:
> Signed-off-by: Xie Qirong <cheerx1994@gmail.com>
> ---
>
> 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.
Move the text above before your sign-off so it will end up in the git
commit message.
When done you may also add my acknowledgement, ie.:
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Regards,
Arend
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer
2017-05-12 9:10 ` Arend van Spriel
@ 2017-05-12 9:16 ` Kalle Valo
0 siblings, 0 replies; 9+ messages in thread
From: Kalle Valo @ 2017-05-12 9:16 UTC (permalink / raw)
To: Arend van Spriel
Cc: Xie Qirong, Franky Lin, Hante Meuleman, linux-wireless,
brcm80211-dev-list.pdl, netdev, linux-kernel
Arend van Spriel <arend.vanspriel@broadcom.com> writes:
>>> 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...
--
Kalle Valo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer
2017-05-12 8:54 ` Kalle Valo
@ 2017-05-12 9:10 ` Arend van Spriel
2017-05-12 9:16 ` Kalle Valo
0 siblings, 1 reply; 9+ messages in thread
From: Arend van Spriel @ 2017-05-12 9:10 UTC (permalink / raw)
To: Kalle Valo
Cc: Xie Qirong, Franky Lin, Hante Meuleman, linux-wireless,
brcm80211-dev-list.pdl, netdev, linux-kernel
On 5/12/2017 10:54 AM, Kalle Valo wrote:
> Arend van Spriel <arend.vanspriel@broadcom.com> writes:
>
>> On 5/12/2017 10:19 AM, Kalle Valo wrote:
>>> Xie Qirong <cheerx1994@gmail.com> writes:
>>>
>>>> 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>
>>>> ---
>>>>
>>>> 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)
>>>
>>> How is this different from the first version?
>>>
>>> https://patchwork.kernel.org/patch/9709467/
>>
>> 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 :)
>
>> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer
2017-05-12 8:36 ` Arend van Spriel
@ 2017-05-12 8:54 ` Kalle Valo
2017-05-12 9:10 ` Arend van Spriel
0 siblings, 1 reply; 9+ messages in thread
From: Kalle Valo @ 2017-05-12 8:54 UTC (permalink / raw)
To: Arend van Spriel
Cc: Xie Qirong, Franky Lin, Hante Meuleman, linux-wireless,
brcm80211-dev-list.pdl, netdev, linux-kernel
Arend van Spriel <arend.vanspriel@broadcom.com> writes:
> On 5/12/2017 10:19 AM, Kalle Valo wrote:
>> Xie Qirong <cheerx1994@gmail.com> writes:
>>
>>> 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>
>>> ---
>>>
>>> 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)
>>
>> How is this different from the first version?
>>
>> https://patchwork.kernel.org/patch/9709467/
>
> 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 :)
> 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 ;)
--
Kalle Valo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer
2017-05-12 8:19 ` Kalle Valo
@ 2017-05-12 8:36 ` Arend van Spriel
2017-05-12 8:54 ` Kalle Valo
0 siblings, 1 reply; 9+ messages in thread
From: Arend van Spriel @ 2017-05-12 8:36 UTC (permalink / raw)
To: Kalle Valo, Xie Qirong
Cc: Franky Lin, Hante Meuleman, linux-wireless,
brcm80211-dev-list.pdl, netdev, linux-kernel
On 5/12/2017 10:19 AM, Kalle Valo wrote:
> Xie Qirong <cheerx1994@gmail.com> writes:
>
>> 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>
>> ---
>>
>> 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)
>
> How is this different from the first version?
>
> https://patchwork.kernel.org/patch/9709467/
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
> 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
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer
2017-05-12 7:35 Xie Qirong
@ 2017-05-12 8:19 ` Kalle Valo
2017-05-12 8:36 ` Arend van Spriel
0 siblings, 1 reply; 9+ messages in thread
From: Kalle Valo @ 2017-05-12 8: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 <cheerx1994@gmail.com> writes:
> 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>
> ---
>
> 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)
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
--
Kalle Valo
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer
@ 2017-05-12 7:35 Xie Qirong
2017-05-12 8:19 ` Kalle Valo
0 siblings, 1 reply; 9+ messages in thread
From: Xie Qirong @ 2017-05-12 7:35 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
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>
---
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(-)
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] 9+ messages in thread
* [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer
@ 2017-05-03 11:27 Xie Qirong
0 siblings, 0 replies; 9+ messages in thread
From: Xie Qirong @ 2017-05-03 11:27 UTC (permalink / raw)
To: Arend van Spriel, Franky Lin, Hante Meuleman, Kalle Valo
Cc: linux-wireless, brcm80211-dev-list.pdl, netdev, linux-kernel,
Piotr Haber, 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.
Signed-off-by: Xie Qirong <cheerx1994@gmail.com>
---
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: next-20170502 (localversion-next is next-20170502)
Thanks for Arend's advice
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 14a70d4..3559fb5 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.9.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-05-12 9:16 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-03 7:35 [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer Xie Qirong
2017-05-03 8:05 ` Arend van Spriel
2017-05-03 11:27 Xie Qirong
2017-05-12 7:35 Xie Qirong
2017-05-12 8:19 ` Kalle Valo
2017-05-12 8:36 ` Arend van Spriel
2017-05-12 8:54 ` Kalle Valo
2017-05-12 9:10 ` Arend van Spriel
2017-05-12 9:16 ` 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).