* [PATCH] b43: Replace mdelay with msleep in b43_radio_2057_init_post
@ 2017-12-24 4:03 Jia-Ju Bai
0 siblings, 0 replies; 8+ messages in thread
From: Jia-Ju Bai @ 2017-12-24 4:03 UTC (permalink / raw)
To: kvalo, colin.king, johannes.berg, tiwai, kstewart, gregkh,
andrew.zaborowski
Cc: linux-wireless, b43-dev, netdev, linux-kernel, Jia-Ju Bai
b43_radio_2057_init_post is not called in an interrupt handler
nor holding a spinlock.
The function mdelay in it can be replaced with msleep, to reduce busy wait.
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
---
drivers/net/wireless/broadcom/b43/phy_n.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/b43/phy_n.c b/drivers/net/wireless/broadcom/b43/phy_n.c
index a5557d7..5bc838e 100644
--- a/drivers/net/wireless/broadcom/b43/phy_n.c
+++ b/drivers/net/wireless/broadcom/b43/phy_n.c
@@ -1031,7 +1031,7 @@ static void b43_radio_2057_init_post(struct b43_wldev *dev)
b43_radio_set(dev, R2057_RFPLL_MISC_CAL_RESETN, 0x78);
b43_radio_set(dev, R2057_XTAL_CONFIG2, 0x80);
- mdelay(2);
+ msleep(2);
b43_radio_mask(dev, R2057_RFPLL_MISC_CAL_RESETN, ~0x78);
b43_radio_mask(dev, R2057_XTAL_CONFIG2, ~0x80);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] b43: Replace mdelay with msleep in b43_radio_2057_init_post
@ 2017-12-30 11:08 Jia-Ju Bai
2017-12-30 18:49 ` Larry Finger
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Jia-Ju Bai @ 2017-12-30 11:08 UTC (permalink / raw)
To: kvalo, colin.king, johannes.berg, tiwai, kstewart, gregkh,
andrew.zaborowski
Cc: linux-wireless, b43-dev, netdev, linux-kernel, Jia-Ju Bai
b43_radio_2057_init_post is not called in an interrupt handler
nor holding a spinlock.
The function mdelay in it can be replaced with msleep, to reduce busy wait.
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
---
drivers/net/wireless/broadcom/b43/phy_n.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/b43/phy_n.c b/drivers/net/wireless/broadcom/b43/phy_n.c
index a5557d7..5bc838e 100644
--- a/drivers/net/wireless/broadcom/b43/phy_n.c
+++ b/drivers/net/wireless/broadcom/b43/phy_n.c
@@ -1031,7 +1031,7 @@ static void b43_radio_2057_init_post(struct b43_wldev *dev)
b43_radio_set(dev, R2057_RFPLL_MISC_CAL_RESETN, 0x78);
b43_radio_set(dev, R2057_XTAL_CONFIG2, 0x80);
- mdelay(2);
+ msleep(2);
b43_radio_mask(dev, R2057_RFPLL_MISC_CAL_RESETN, ~0x78);
b43_radio_mask(dev, R2057_XTAL_CONFIG2, ~0x80);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] b43: Replace mdelay with msleep in b43_radio_2057_init_post
2017-12-30 11:08 [PATCH] b43: Replace mdelay with msleep in b43_radio_2057_init_post Jia-Ju Bai
@ 2017-12-30 18:49 ` Larry Finger
2018-01-08 16:21 ` Kalle Valo
[not found] ` <1514632107-14698-1-git-send-email-baijiaju1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2 siblings, 0 replies; 8+ messages in thread
From: Larry Finger @ 2017-12-30 18:49 UTC (permalink / raw)
To: Jia-Ju Bai, kvalo, colin.king, johannes.berg, tiwai, kstewart,
gregkh, andrew.zaborowski
Cc: linux-wireless, b43-dev, netdev, linux-kernel
On 12/30/2017 05:08 AM, Jia-Ju Bai wrote:
> b43_radio_2057_init_post is not called in an interrupt handler
> nor holding a spinlock.
> The function mdelay in it can be replaced with msleep, to reduce busy wait.
>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
checkpatch.pl reports the following warning for this patch:
WARNING: msleep < 20ms can sleep for up to 20ms; see
Documentation/timers/timers-howto.txt
#26: FILE: drivers/net/wireless/broadcom/b43/phy_n.c:1034:
+ msleep(2);
total: 0 errors, 1 warnings, 0 checks, 8 lines checked
Have you tested to verify that a sleep as long as 20 ms will not cause problems?
The referenced document suggests a usleep_range() call.
In general, delay changes should never be proposed without testing.
Larry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: b43: Replace mdelay with msleep in b43_radio_2057_init_post
[not found] ` <1514632107-14698-1-git-send-email-baijiaju1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2018-01-08 16:21 ` Kalle Valo
2018-01-08 16:31 ` Larry Finger
0 siblings, 1 reply; 8+ messages in thread
From: Kalle Valo @ 2018-01-08 16:21 UTC (permalink / raw)
To: Jia-Ju Bai
Cc: kstewart-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
johannes.berg-ral2JQCrhuEAvxtiuMwx3w, tiwai-l3A5Bk7waGM,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
andrew.zaborowski-ral2JQCrhuEAvxtiuMwx3w, Jia-Ju Bai,
b43-dev-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
netdev-u79uwXL29TY76Z2rM5mHXA, colin.king-Z7WLFzj8eWMS+FvcfC7Uqw
Jia-Ju Bai <baijiaju1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> b43_radio_2057_init_post is not called in an interrupt handler
> nor holding a spinlock.
> The function mdelay in it can be replaced with msleep, to reduce busy wait.
>
> Signed-off-by: Jia-Ju Bai <baijiaju1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
You submitted an identical patch a week earlier:
https://patchwork.kernel.org/patch/10137671/
How is this different? Also always add version number to the patch so that the
maintainers can follow the changes easily:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#patch_version_missing
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#changelog_missing
--
https://patchwork.kernel.org/patch/10137671/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: b43: Replace mdelay with msleep in b43_radio_2057_init_post
2017-12-30 11:08 [PATCH] b43: Replace mdelay with msleep in b43_radio_2057_init_post Jia-Ju Bai
2017-12-30 18:49 ` Larry Finger
@ 2018-01-08 16:21 ` Kalle Valo
[not found] ` <1514632107-14698-1-git-send-email-baijiaju1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2018-01-08 16:21 UTC (permalink / raw)
To: Jia-Ju Bai
Cc: colin.king, johannes.berg, tiwai, kstewart, gregkh,
andrew.zaborowski, linux-wireless, b43-dev, netdev, linux-kernel,
Jia-Ju Bai
Jia-Ju Bai <baijiaju1990@gmail.com> wrote:
> b43_radio_2057_init_post is not called in an interrupt handler
> nor holding a spinlock.
> The function mdelay in it can be replaced with msleep, to reduce busy wait.
>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
You submitted an identical patch a week earlier:
https://patchwork.kernel.org/patch/10137671/
How is this different? Also always add version number to the patch so that the
maintainers can follow the changes easily:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#patch_version_missing
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#changelog_missing
--
https://patchwork.kernel.org/patch/10137671/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: b43: Replace mdelay with msleep in b43_radio_2057_init_post
2018-01-08 16:21 ` Kalle Valo
@ 2018-01-08 16:31 ` Larry Finger
[not found] ` <fc3e2558-c31f-289d-8413-33fef4f5ca64-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2018-01-09 1:36 ` Jia-Ju Bai
0 siblings, 2 replies; 8+ messages in thread
From: Larry Finger @ 2018-01-08 16:31 UTC (permalink / raw)
To: Kalle Valo, Jia-Ju Bai
Cc: kstewart, johannes.berg, tiwai, gregkh, linux-wireless,
linux-kernel, andrew.zaborowski, b43-dev, netdev, colin.king
On 01/08/2018 10:21 AM, Kalle Valo wrote:
> Jia-Ju Bai <baijiaju1990@gmail.com> wrote:
>
>> b43_radio_2057_init_post is not called in an interrupt handler
>> nor holding a spinlock.
>> The function mdelay in it can be replaced with msleep, to reduce busy wait.
>>
>> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
>
> You submitted an identical patch a week earlier:
>
> https://patchwork.kernel.org/patch/10137671/
>
> How is this different? Also always add version number to the patch so that the
> maintainers can follow the changes easily:
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#patch_version_missing
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#changelog_missing
I had negative comments on one of those due to the possibility of msleep(2)
extending as long as 20 msec. Until the author, or someone else, can test that
this is OK, then the mdelay(2) can only be replaced with usleep_range(2000, 3000).
NACK for both.
Larry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: b43: Replace mdelay with msleep in b43_radio_2057_init_post
[not found] ` <fc3e2558-c31f-289d-8413-33fef4f5ca64-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
@ 2018-01-08 17:06 ` Kalle Valo
0 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2018-01-08 17:06 UTC (permalink / raw)
To: Larry Finger
Cc: kstewart-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
johannes.berg-ral2JQCrhuEAvxtiuMwx3w, tiwai-l3A5Bk7waGM,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
andrew.zaborowski-ral2JQCrhuEAvxtiuMwx3w, Jia-Ju Bai,
b43-dev-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
netdev-u79uwXL29TY76Z2rM5mHXA, colin.king-Z7WLFzj8eWMS+FvcfC7Uqw
Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org> writes:
> On 01/08/2018 10:21 AM, Kalle Valo wrote:
>> Jia-Ju Bai <baijiaju1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>>> b43_radio_2057_init_post is not called in an interrupt handler
>>> nor holding a spinlock.
>>> The function mdelay in it can be replaced with msleep, to reduce busy wait.
>>>
>>> Signed-off-by: Jia-Ju Bai <baijiaju1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>
>> You submitted an identical patch a week earlier:
>>
>> https://patchwork.kernel.org/patch/10137671/
>>
>> How is this different? Also always add version number to the patch so that the
>> maintainers can follow the changes easily:
>>
>> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#patch_version_missing
>>
>> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#changelog_missing
>
> I had negative comments on one of those due to the possibility of
> msleep(2) extending as long as 20 msec. Until the author, or someone
> else, can test that this is OK, then the mdelay(2) can only be
> replaced with usleep_range(2000, 3000).
>
> NACK for both.
Ok, patches dropped.
--
Kalle Valo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: b43: Replace mdelay with msleep in b43_radio_2057_init_post
2018-01-08 16:31 ` Larry Finger
[not found] ` <fc3e2558-c31f-289d-8413-33fef4f5ca64-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
@ 2018-01-09 1:36 ` Jia-Ju Bai
1 sibling, 0 replies; 8+ messages in thread
From: Jia-Ju Bai @ 2018-01-09 1:36 UTC (permalink / raw)
To: Larry Finger, Kalle Valo
Cc: kstewart, johannes.berg, tiwai, gregkh, linux-wireless,
linux-kernel, andrew.zaborowski, b43-dev, netdev, colin.king
On 2018/1/9 0:31, Larry Finger wrote:
> On 01/08/2018 10:21 AM, Kalle Valo wrote:
>> Jia-Ju Bai <baijiaju1990@gmail.com> wrote:
>>
>>> b43_radio_2057_init_post is not called in an interrupt handler
>>> nor holding a spinlock.
>>> The function mdelay in it can be replaced with msleep, to reduce
>>> busy wait.
>>>
>>> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
>>
>> You submitted an identical patch a week earlier:
>>
>> https://patchwork.kernel.org/patch/10137671/
>>
>> How is this different? Also always add version number to the patch so
>> that the
>> maintainers can follow the changes easily:
>>
>> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#patch_version_missing
>>
>>
>> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#changelog_missing
>>
>
> I had negative comments on one of those due to the possibility of
> msleep(2) extending as long as 20 msec. Until the author, or someone
> else, can test that this is OK, then the mdelay(2) can only be
> replaced with usleep_range(2000, 3000).
>
> NACK for both.
>
> Larry
>
Sorry for my mistake.
I have sent a patch v2 using usleep_range(2000, 3000), and you can have
a look :)
Thanks,
Jia-Ju Bai
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-01-09 1:36 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-30 11:08 [PATCH] b43: Replace mdelay with msleep in b43_radio_2057_init_post Jia-Ju Bai
2017-12-30 18:49 ` Larry Finger
2018-01-08 16:21 ` Kalle Valo
[not found] ` <1514632107-14698-1-git-send-email-baijiaju1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-08 16:21 ` Kalle Valo
2018-01-08 16:31 ` Larry Finger
[not found] ` <fc3e2558-c31f-289d-8413-33fef4f5ca64-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2018-01-08 17:06 ` Kalle Valo
2018-01-09 1:36 ` Jia-Ju Bai
-- strict thread matches above, loose matches on Subject: below --
2017-12-24 4:03 [PATCH] " Jia-Ju Bai
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).