[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A2E979F.9090407@trash.net>
Date: Tue, 09 Jun 2009 19:10:55 +0200
From: Patrick McHardy <kaber@...sh.net>
To: Johannes Berg <johannes@...solutions.net>
CC: netdev <netdev@...r.kernel.org>
Subject: Re: error handling for dev_mc_sync (__dev_addr_add)
Johannes Berg wrote:
> On Tue, 2009-06-09 at 17:00 +0200, Patrick McHardy wrote:
>
>>> Regular drivers should need to be changed,
>>> would they, except for adding changing 'return' to 'return 0;' and
>>> adding a 'return 0;' at the end which is a quite simple spatch I'd
>>> think.
>> Right.
>
> Yeah, so this spatch should be sufficient:
>
> ----- >% -----
> @ ndomatch @
> identifier ndo, sml;
> @@
> struct net_device_ops ndo = {
> .ndo_set_multicast_list = sml,
> };
> @forall@
> identifier dev;
> identifier ndomatch.sml;
> @@
> void sml(struct net_device *dev)
- void
+ int
> {
> ...
> -return;
> +return 0;
> ...
> }
> ----- %< -----
>
> Haven't really tested it though but it seems to do the correct thing for
> all drivers I looked at.
In case this also adds a return statement at the end if none is
there already, it looks fine.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists