All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: axi_ethernet: Add driver to u-boot
Date: Tue, 1 Mar 2011 03:58:46 -0500	[thread overview]
Message-ID: <201103010358.47089.vapier@gentoo.org> (raw)
In-Reply-To: <4D6CB04A.1040002@monstr.eu>

On Tuesday, March 01, 2011 03:37:30 Michal Simek wrote:
> Mike Frysinger wrote:
> > On Monday, February 28, 2011 13:50:55 Michal Simek wrote:
> >> Mike Frysinger wrote:
> >>> On Monday, February 28, 2011 04:40:33 Michal Simek wrote:
> >>>> +	return 1;
> >>> 
> >>> a bunch of these funcs return 1 when i'm pretty sure they should be 0
> >> 
> >> init function is called from eth.c:eth_init(). From the code below you
> >> see that return can be >=0.
> > 
> > funny enough, that func in your patch is returning 0 when it should be 1.
> >  it doesnt explain why your recv/send are returning 1 when it should be
> > 0.
> 
> BTW: blackin emac recv functions return 0, -1 and length values.
> Is it correct?

looking at net/eth.c, -1 is an error return value.  add in current docs which 
says 0 is a success return value.  that leaves all other values as currently 
undocumented.  if a driver survey suggested that returning the length was 
useful info, then perhaps the documentation could be updated.  but as you 
noted, that return value isnt currently checked.

so for now, you could change the recv func to return the length rather than 0 
and i wouldnt complain, but always returning 1 is wrong.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110301/64a56b5f/attachment.pgp 

  reply	other threads:[~2011-03-01  8:58 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28  9:40 [U-Boot] [PATCH] net: axi_ethernet: Add driver to u-boot Michal Simek
2011-02-28 17:36 ` Mike Frysinger
2011-02-28 18:50   ` Michal Simek
2011-02-28 19:29     ` Mike Frysinger
2011-03-01  8:00       ` Michal Simek
2011-03-01  8:18         ` Mike Frysinger
2011-03-01  8:34           ` Michal Simek
2011-03-01  8:48             ` Mike Frysinger
2011-03-01  9:29               ` Michal Simek
2011-03-03 21:51                 ` Mike Frysinger
2011-03-04 10:09                   ` Michal Simek
2011-03-09  7:34                     ` Mike Frysinger
2011-03-09  7:38                     ` Mike Frysinger
2011-03-01  8:37       ` Michal Simek
2011-03-01  8:58         ` Mike Frysinger [this message]
2011-03-01  8:19   ` Michal Simek
2011-03-01  8:28     ` Mike Frysinger
2011-03-01  8:46       ` Michal Simek
2011-03-01  9:10         ` Mike Frysinger
2011-08-30 12:05 [U-Boot] [PATCH v2] net: ll_temac: Add LL TEMAC " Michal Simek
2011-08-30 12:05 ` [U-Boot] [PATCH] net: axi_ethernet: Add " Michal Simek
2011-08-31 12:19   ` Marek Vasut
2011-08-31 14:46     ` Michal Simek
2011-08-31 15:19       ` Marek Vasut
2011-09-01  7:17         ` Michal Simek
2011-09-01  8:18           ` Marek Vasut
2011-09-01  8:55             ` Michal Simek
2011-09-01 10:07               ` Marek Vasut
2011-09-01 11:04                 ` Michal Simek
2011-09-01 12:47               ` Wolfgang Denk
2011-08-31 20:13       ` Wolfgang Denk
2011-08-31 19:24   ` Mike Frysinger
2011-09-01  6:52     ` Michal Simek

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=201103010358.47089.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.