[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YcnA8LBwH1X/xqKt@kroah.com>
Date: Mon, 27 Dec 2021 14:34:40 +0100
From: Greg KH <greg@...ah.com>
To: Adam Kandur <sys.arch.adam@...il.com>
Cc: netdev@...r.kernel.org, linux-staging@...ts.linux.dev
Subject: Re: [PATCH] qlge: rewrite qlge_change_rx_buffers()
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@...il.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
Powered by blists - more mailing lists