[U-Boot] [PATCH 17/28] net: Refactor to separate the UDP handler from the ARP handler
Mike Frysinger
vapier at gentoo.org
Thu Feb 9 04:35:18 CET 2012
On Wednesday 08 February 2012 17:52:54 Joe Hershberger wrote:
> On Fri, Feb 3, 2012 at 6:21 AM, Mike Frysinger wrote:
> > On Thursday 19 January 2012 19:53:20 Joe Hershberger wrote:
> >> Only call the handlers if one was registered... don't require
> >> protocols to register a handler (eliminating dummies)
> >> NetConsole now uses the ARP handler when waiting on arp (instead of
> >> needing a #define hack in arp.c)
> >> Clear handlers at the end of net loop
> >
> > what if the SetHandler funcs took care of setting to a dummy func when it
> > was given NULL ? then calling code need not worry about creating their
> > own dummies, and you don't have to add NULL pointer checking.
>
> The calling code doesn't create dummies any longer. That is the point
> of the NULL checking. Do you prefer the set method register a dummy
> instead of a NULL check?
yes, i like that fringe code need not setup dummies anymore themselves.
however, i think the core code should take take on setting up dummies so that
the rest of the code need not have to do NULL checking everywhere.
-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/20120208/74d0d379/attachment.pgp>
More information about the U-Boot
mailing list