All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, Jay Vosburgh <fubar@us.ibm.com>,
	"Eric W. Biederman" <ebiederm@aristanetworks.com>
Subject: Re: [PATCH 5/6] bond: Implement a basic set of rtnl link ops
Date: Fri, 30 Oct 2009 11:08:09 +0100	[thread overview]
Message-ID: <4AEABB09.10903@trash.net> (raw)
In-Reply-To: <m1skd1qjzb.fsf@fess.ebiederm.org>

Eric W. Biederman wrote:
> Patrick McHardy <kaber@trash.net> writes:
> 
>>> As for rtnl_link_register it always succeeds so let's just
>>> remove the return code and call it good.
>> You need unroll anyways for the other failure conditions, so
>> why not simply add an err1/2 and be safe for future changes?
> 
> Not a real problem.  I was just thinking of things like the
> dummy driver that have this same issue and the fact that since
> rtnl_link_register never fails we never test the error path.
> So it would be much less error prone and less code to remove
> the possibility of rtnl_link_register failing.

Mhh good point, I think I added the broken dummy code myself :)

The main reason for not returning void from rtnl_link_register()
was so new drivers that are written with rtnl_link in mind from
the beginning (and thus usually don't do anything like default
device creation, sysfs registrations etc.) can simply do
"return rtnl_link_register(&ops)" in their init function. But
that's admittedly not a very strong argument :)


  reply	other threads:[~2009-10-30 10:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-30  0:16 [PATCH 0/6] Bonding simplifications and netns support Eric W. Biederman
2009-10-30  0:18 ` [PATCH 1/6] net: Allow devices to specify a device specific sysfs group Eric W. Biederman
2009-10-30  0:18 ` [PATCH 2/6] bond: Simply bond sysfs group creation Eric W. Biederman
2009-10-30  0:18 ` [PATCH 3/6] bond: Simplify bond_create Eric W. Biederman
2009-10-30  0:18 ` [PATCH 4/6] bond: Simplify bond device destruction Eric W. Biederman
2009-10-30  0:18 ` [PATCH 5/6] bond: Implement a basic set of rtnl link ops Eric W. Biederman
2009-10-30  8:06   ` Patrick McHardy
2009-10-30  8:29   ` Patrick McHardy
2009-10-30  9:23     ` Eric W. Biederman
2009-10-30  9:33       ` Patrick McHardy
2009-10-30  9:58         ` [PATCH 7/6] bond: Get the rtnl_link_ops support correct Eric W. Biederman
2009-10-30 10:00         ` [PATCH 5/6] bond: Implement a basic set of rtnl link ops Eric W. Biederman
2009-10-30 10:08           ` Patrick McHardy [this message]
2009-10-30  0:18 ` [PATCH 6/6] bond: Add support for multiple network namespaces Eric W. Biederman
2009-10-30  6:25 ` [PATCH 0/6] Bonding simplifications and netns support David Miller
2009-10-30  6:38   ` Eric Dumazet
2009-10-30  6:40     ` David Miller
2009-10-30  7:50   ` Eric W. Biederman
2009-10-30 10:39     ` Eric W. Biederman
2009-10-30 19:41 ` David Miller
2009-10-30 21:12   ` Jay Vosburgh
2009-10-30 22:57     ` Eric W. Biederman
2009-10-31  0:10       ` Jay Vosburgh
2009-10-31  1:06         ` Eric W. Biederman
2009-10-31  1:45           ` Jay Vosburgh
2009-10-31  0:27     ` Eric W. Biederman

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=4AEABB09.10903@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=ebiederm@aristanetworks.com \
    --cc=ebiederm@xmission.com \
    --cc=fubar@us.ibm.com \
    --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 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.