* [PATCH] qlge: rewrite qlge_change_rx_buffers()
@ 2021-12-27 13:19 Adam Kandur
2021-12-27 13:34 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Adam Kandur @ 2021-12-27 13:19 UTC (permalink / raw)
To: netdev, linux-staging
I replaced while loop with for. It looks nicer to me.
Signed-off-by: Adam Kandur <sys.arch.adam@gmail.com>
---
drivers/staging/qlge/qlge_main.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index 9873bb2a9ee4..69d57c2e199a 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -4012,19 +4012,17 @@ 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)) {
- int i = 4;
+ for (int i = 4; !test_bit(QL_ADAPTER_UP, &qdev->flags); i--) {
+ if (!i) {
+ netif_err(qdev, ifup, qdev->ndev,
+ "Timed out waiting for adapter UP\n");
+ return -ETIMEDOUT;
+ }
- while (--i && !test_bit(QL_ADAPTER_UP, &qdev->flags)) {
netif_err(qdev, ifup, qdev->ndev,
"Waiting for adapter UP...\n");
ssleep(1);
}
-
- if (!i) {
- netif_err(qdev, ifup, qdev->ndev,
- "Timed out waiting for adapter UP\n");
- return -ETIMEDOUT;
- }
}
status = qlge_adapter_down(qdev);
--
2.34.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] qlge: rewrite qlge_change_rx_buffers()
2021-12-27 13:19 [PATCH] qlge: rewrite qlge_change_rx_buffers() Adam Kandur
@ 2021-12-27 13:34 ` Greg KH
2021-12-27 14:15 ` Slade Watkins
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2021-12-27 13:34 UTC (permalink / raw)
To: Adam Kandur; +Cc: netdev, linux-staging
On Mon, Dec 27, 2021 at 04:19:10PM +0300, Adam Kandur wrote:
> I replaced while loop with for. It looks nicer to me.
>
> Signed-off-by: Adam Kandur <sys.arch.adam@gmail.com>
>
> ---
> drivers/staging/qlge/qlge_main.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
> index 9873bb2a9ee4..69d57c2e199a 100644
> --- a/drivers/staging/qlge/qlge_main.c
> +++ b/drivers/staging/qlge/qlge_main.c
> @@ -4012,19 +4012,17 @@ 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)) {
> - int i = 4;
> + for (int i = 4; !test_bit(QL_ADAPTER_UP, &qdev->flags); i--) {
> + if (!i) {
> + netif_err(qdev, ifup, qdev->ndev,
> + "Timed out waiting for adapter UP\n");
> + return -ETIMEDOUT;
> + }
>
> - while (--i && !test_bit(QL_ADAPTER_UP, &qdev->flags)) {
> netif_err(qdev, ifup, qdev->ndev,
> "Waiting for adapter UP...\n");
> ssleep(1);
> }
> -
> - if (!i) {
> - netif_err(qdev, ifup, qdev->ndev,
> - "Timed out waiting for adapter UP\n");
> - return -ETIMEDOUT;
> - }
> }
>
> status = qlge_adapter_down(qdev);
> --
> 2.34.0
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- Your patch is malformed (tabs converted to spaces, linewrapped, etc.)
and can not be applied. Please read the file,
Documentation/email-clients.txt in order to fix this.
- You did not specify a description of why the patch is needed, or
possibly, any description at all, in the email body. Please read the
section entitled "The canonical patch format" in the kernel file,
Documentation/SubmittingPatches for what is needed in order to
properly describe the change.
- You did not write a descriptive Subject: for the patch, allowing Greg,
and everyone else, to know what this patch is all about. Please read
the section entitled "The canonical patch format" in the kernel file,
Documentation/SubmittingPatches for what a proper Subject: line should
look like.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] qlge: rewrite qlge_change_rx_buffers()
2021-12-27 13:34 ` Greg KH
@ 2021-12-27 14:15 ` Slade Watkins
2021-12-27 14:45 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Slade Watkins @ 2021-12-27 14:15 UTC (permalink / raw)
To: Adam Kandur; +Cc: netdev, linux-staging
On 12/27/2021 8:34 AM, Greg KH wrote:
>
> - You did not specify a description of why the patch is needed, or
> possibly, any description at all, in the email body. Please read the
> section entitled "The canonical patch format" in the kernel file,
> Documentation/SubmittingPatches for what is needed in order to
> properly describe the change.
>
hey Adam,
this would likely be it for both of the patches you submitted.
cheers,
slade
--
This email message may contain sensitive or otherwise confidential
information and is intended for the addressee(s) only. If you believe
to have received this message in error, please let the sender know
*immediately* and delete the message. Thank you for your cooperation!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] qlge: rewrite qlge_change_rx_buffers()
2021-12-27 14:15 ` Slade Watkins
@ 2021-12-27 14:45 ` Greg KH
2021-12-27 20:41 ` Slade Watkins
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2021-12-27 14:45 UTC (permalink / raw)
To: Slade Watkins; +Cc: Adam Kandur, netdev, linux-staging
On Mon, Dec 27, 2021 at 09:15:36AM -0500, Slade Watkins wrote:
> --
> This email message may contain sensitive or otherwise confidential
> information and is intended for the addressee(s) only. If you believe
> to have received this message in error, please let the sender know
> *immediately* and delete the message. Thank you for your cooperation!
>
Now deleted.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] qlge: rewrite qlge_change_rx_buffers()
2021-12-27 14:45 ` Greg KH
@ 2021-12-27 20:41 ` Slade Watkins
0 siblings, 0 replies; 5+ messages in thread
From: Slade Watkins @ 2021-12-27 20:41 UTC (permalink / raw)
To: Greg KH; +Cc: Adam Kandur, netdev, linux-staging
On 12/27/2021 9:45 AM, Greg KH wrote:
> On Mon, Dec 27, 2021 at 09:15:36AM -0500, Slade Watkins wrote:
>> --
>> This email message may contain sensitive or otherwise confidential
>> information and is intended for the addressee(s) only. If you believe
>> to have received this message in error, please let the sender know
>> *immediately* and delete the message. Thank you for your cooperation!
>>
>
> Now deleted.
my bad! I have separate signatures set for mailing lists but for some
reason it didn't remove that blurb.
it's fixed for the future.
sorry about that.
slade
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-27 20:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-27 13:19 [PATCH] qlge: rewrite qlge_change_rx_buffers() Adam Kandur
2021-12-27 13:34 ` Greg KH
2021-12-27 14:15 ` Slade Watkins
2021-12-27 14:45 ` Greg KH
2021-12-27 20:41 ` Slade Watkins
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).