From: Pavel Skripkin <paskripkin@gmail.com>
To: Adam Kandur <sys.arch.adam@gmail.com>, linux-staging@lists.linux.dev
Subject: Re: [PATCH] qlge: refactor qlge_change_rx_buffers() in qlge_main.c
Date: Tue, 28 Dec 2021 17:45:09 +0300 [thread overview]
Message-ID: <8e4cd620-282a-8a1f-27c7-94f05a7e0f4f@gmail.com> (raw)
In-Reply-To: <20211228135756.7343-1-sys.arch.adam@gmail.com>
Hi, Adam!
Looks like you have missed all maintainers in your CC list :) Please,
use ./script/get_mainainer.pl to get list of people who are responsible
for reviewing your code
On 12/28/21 16:57, Adam Kandur wrote:
> Greetings. As I understand, qlge_change_rx_buffers() waits 4 times for
> an outstanding reset to complete. And if it cannot, reports about
> timeout. I assume this can be written using for loop instead of while,
> wich looks nicer for me. Hope my guess was right.
>
Commit message should only explain why you do this change. You can leave
your unrelated thoughts/questions below ---, since this part won't be
visible in gitlog
> Signed-off-by: Adam Kandur <sys.arch.adam@gmail.com>
> ---
<--- here
> drivers/staging/qlge/qlge_main.c | 15 ++++++---------
> 1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
> index 9873bb2a9ee4..f36e43a85038 100644
> --- a/drivers/staging/qlge/qlge_main.c
> +++ b/drivers/staging/qlge/qlge_main.c
> @@ -4012,19 +4012,16 @@ static int qlge_change_rx_buffers(struct qlge_adapter *qdev)
>
> /* Wait for an outstanding reset to complete. */
> if (!test_bit(QL_ADAPTER_UP, &qdev->flags)) {
Aren't there 5 checks actually? It seems unlikely that this bit will be
set after 3-4 instructions
> - int i = 4;
> -
> - while (--i && !test_bit(QL_ADAPTER_UP, &qdev->flags)) {
> + for (int i = 4; !test_bit(QL_ADAPTER_UP, &qdev->flags); i--) {
Have you compiled this patch? Compiler should have warn you about mixed
declaration and code.
With regards,
Pavel Skripkin
next prev parent reply other threads:[~2021-12-28 14:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-28 13:57 [PATCH] qlge: refactor qlge_change_rx_buffers() in qlge_main.c Adam Kandur
2021-12-28 14:45 ` Pavel Skripkin [this message]
2022-01-06 8:35 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2021-12-28 12:17 Adam Kandur
2021-12-28 13:05 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8e4cd620-282a-8a1f-27c7-94f05a7e0f4f@gmail.com \
--to=paskripkin@gmail.com \
--cc=linux-staging@lists.linux.dev \
--cc=sys.arch.adam@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).