netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: error handling for dev_mc_sync (__dev_addr_add)
Date: Tue, 09 Jun 2009 19:10:55 +0200	[thread overview]
Message-ID: <4A2E979F.9090407@trash.net> (raw)
In-Reply-To: <1244567063.18481.13.camel@johannes.local>

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.


  reply	other threads:[~2009-06-09 17:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09 14:11 error handling for dev_mc_sync (__dev_addr_add) Johannes Berg
2009-06-09 14:36 ` Patrick McHardy
2009-06-09 14:43   ` Johannes Berg
2009-06-09 15:00     ` Patrick McHardy
2009-06-09 17:04       ` Johannes Berg
2009-06-09 17:10         ` Patrick McHardy [this message]
2009-06-09 17:19           ` Johannes Berg

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=4A2E979F.9090407@trash.net \
    --to=kaber@trash.net \
    --cc=johannes@sipsolutions.net \
    --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).