From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] tsec: fix the return value for tsec_eth_init()
Date: Fri, 04 Jun 2010 14:48:13 -0700 [thread overview]
Message-ID: <4C09749D.7070904@gmail.com> (raw)
In-Reply-To: <4C09732D.1050608@freescale.com>
On 6/4/2010 2:42 PM, Timur Tabi wrote:
> Andy Fleming wrote:
>
>> You just noted that tsec_eth_init should return the number of tsecs
>> initialized successfully. Therefore, the callers can check that number,
>> and respond accordingly. tsec_initialize() can report the error. If we
>> want more elaborate error handling, we can devise something. But with
>> the new scheme, an error in one tsec (like a riser card not being plugged
>> in) will cause all of the tsecs to not be initialized, which seems
>> silly.
>>
> Ok, so the rule is: a function which initializes one interface can return an
> error<0, but a function which initializes multiple interfaces should not.
> V2 coming right up.
>
Sorry for the confusion. The way we handle errors isn't through return
code but rather through printf()... In future, the return code may be
used to keep track of the number of properly initialized interfaces.
Looks like v2 should work.
regards,
Ben
prev parent reply other threads:[~2010-06-04 21:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 20:50 [U-Boot] [PATCH] tsec: fix the return value for tsec_eth_init() Timur Tabi
2010-06-04 20:57 ` Andy Fleming
2010-06-04 21:01 ` Timur Tabi
2010-06-04 21:39 ` Andy Fleming
2010-06-04 21:42 ` Timur Tabi
2010-06-04 21:48 ` Ben Warren [this message]
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=4C09749D.7070904@gmail.com \
--to=biggerbadderben@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox