From: Greg KH <greg@kroah.com>
To: Dave Jones <davej@redhat.com>, "Preston A. Elder" <prez@goth.net>,
linux-kernel@vger.kernel.org
Subject: Re: AGPGart / AMD K7
Date: Fri, 20 Apr 2007 16:26:51 -0700 [thread overview]
Message-ID: <20070420232651.GB10949@kroah.com> (raw)
In-Reply-To: <20070420190028.GF13939@redhat.com>
On Fri, Apr 20, 2007 at 03:00:28PM -0400, Dave Jones wrote:
> On Fri, Apr 20, 2007 at 11:29:52AM -0700, Greg Kroah-Hartman wrote:
> > On Fri, Apr 20, 2007 at 02:20:29PM -0400, Dave Jones wrote:
> > >
> > > btw Greg, wtf does driver_register return a 0 as 'success' if it
> > > completes the function, and 0 as 'failure' if !bus ?
> > > That seems doomed to failure.
> >
> > I don't know why the code does that, we should always have a bus
> > assigned to a driver. I'll change that and watch to see what breaks :)
>
> Maybe this?
>
> We should always have a bus in bus_add_driver()
> Instead of returning success when we don't, BUG().
Nah, I don't like adding BUG() calls to the kernel if it can be helped,
how about the version I copied you on a few hours ago, which is also
below?
thanks,
greg k-h
------
From: Greg Kroah-Hartman <gregkh@suse.de>
Subject: driver core: bus_add_driver should return an error if no bus
As pointed out by Dave Jones.
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/base/bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -601,7 +601,7 @@ int bus_add_driver(struct device_driver
int error = 0;
if (!bus)
- return 0;
+ return -EINVAL;
pr_debug("bus %s: add driver %s\n", bus->name, drv->name);
error = kobject_set_name(&drv->kobj, "%s", drv->name);
next prev parent reply other threads:[~2007-04-20 23:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-20 7:10 Preston A. Elder
2007-04-20 15:55 ` Dave Jones
2007-04-20 16:53 ` Preston A. Elder
2007-04-20 17:33 ` Dave Jones
2007-04-20 18:04 ` Preston A. Elder
2007-04-20 18:20 ` Dave Jones
2007-04-20 18:29 ` Greg KH
2007-04-20 19:00 ` Dave Jones
2007-04-20 23:26 ` Greg KH [this message]
2007-04-21 0:33 ` Dave Jones
2007-04-20 18:31 ` Preston A. Elder
2007-04-20 18:49 ` Dave Jones
2007-04-20 20:22 ` Preston A. Elder
2007-04-20 20:33 ` Dave Jones
2007-04-20 22:00 ` Preston A. Elder
2007-04-20 23:42 ` Preston A. Elder
2007-04-21 0:15 ` Greg KH
2007-04-20 23:25 ` Greg KH
[not found] <fa.asou3h2GKTshe+XpxGJ/K4Wjf2s@ifi.uio.no>
[not found] ` <fa.YcM0QJJYQHgI9i0mZF4z2OtPhr8@ifi.uio.no>
[not found] ` <fa.8rayS7oJHYA3XGzEX9anUebRoMM@ifi.uio.no>
[not found] ` <fa.2SB7j6GjGOW6vvgLY7nbvSnuM6I@ifi.uio.no>
[not found] ` <fa.v7TywLl5PsPHzpOETJp8xq50Gno@ifi.uio.no>
[not found] ` <fa.S5WSCyOavqOFWClpzzJKcKpj03M@ifi.uio.no>
2007-05-03 9:35 ` John Sigler
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=20070420232651.GB10949@kroah.com \
--to=greg@kroah.com \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=prez@goth.net \
/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
all inboxes | Powered by JetHome®