netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Ayaz Abdulla <aabdulla@nvidia.com>
Cc: Manfred Spraul <manfred@colorfullife.com>,
	Andrew Morton <akpm@osdl.org>, nedev <netdev@vger.kernel.org>
Subject: Re: [PATCH 1/3] forcedeth: fixed missing call in napi poll
Date: Tue, 20 Feb 2007 11:26:01 -0500	[thread overview]
Message-ID: <45DB2119.3030402@garzik.org> (raw)
In-Reply-To: <45D9B3E8.7030109@nvidia.com>

Ayaz Abdulla wrote:
> The napi poll routine was missing the call to the optimized rx process 
> routine. This patch adds the missing call for the optimized path.
> 
> Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>
> 
> 
> ------------------------------------------------------------------------
> 
> --- orig/drivers/net/forcedeth.c	2007-02-19 09:13:10.000000000 -0500
> +++ new/drivers/net/forcedeth.c	2007-02-19 09:13:46.000000000 -0500
> @@ -3104,13 +3104,17 @@
>  	struct fe_priv *np = netdev_priv(dev);
>  	u8 __iomem *base = get_hwbase(dev);
>  	unsigned long flags;
> +	u32 retcode;
>  
> -	if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2)
> +	if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) {
>  		pkts = nv_rx_process(dev, limit);
> -	else
> +		retcode = nv_alloc_rx(dev);
> +	} else {
>  		pkts = nv_rx_process_optimized(dev, limit);
> +		retcode = nv_alloc_rx_optimized(dev);
> +	}
>  
> -	if (nv_alloc_rx(dev)) {
> +	if (retcode) {

You should update this patch to change the return values of the above 
two functions from 'int' to 'u32', to match the code usage.  Both 
nv_rx_process() and nv_alloc_rx_optimized() return int, but you use them 
as if they return u32.

Or alternately, use the Linux kernel standard of negative values 
indicating failure, zero (or perhaps >=0) indicates success.

Otherwise, ACK.

	Jeff




  reply	other threads:[~2007-02-20 16:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-19 14:27 [PATCH 1/3] forcedeth: fixed missing call in napi poll Ayaz Abdulla
2007-02-20 16:26 ` Jeff Garzik [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-02-20  8:34 Ayaz Abdulla
2007-02-27  9:16 ` Jeff Garzik

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=45DB2119.3030402@garzik.org \
    --to=jeff@garzik.org \
    --cc=aabdulla@nvidia.com \
    --cc=akpm@osdl.org \
    --cc=manfred@colorfullife.com \
    --cc=netdev@vger.kernel.org \
    /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).