From: David Brownell <david-b@pacbell.net>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-kernel@vger.kernel.org, hcegtvedt@atmel.com, akpm@osdl.org
Subject: Re: [PATCH 2.6.20-rc5] SPI: alternative fix for spi_busnum_to_master
Date: Tue, 23 Jan 2007 07:42:15 -0800 [thread overview]
Message-ID: <200701230742.15531.david-b@pacbell.net> (raw)
In-Reply-To: <20070123.101011.25910575.nemoto@toshiba-tops.co.jp>
On Monday 22 January 2007 5:10 pm, Atsushi Nemoto wrote:
> On Mon, 22 Jan 2007 14:12:02 -0800, David Brownell <david-b@pacbell.net> wrote:
> > > Here is a revised version. The children list of spi_master_class
> > > contains only spi_master class so we can just compare bus_num member
> > > instead of class_id string.
> >
> > Looks just a bit iffy ... though, thanks for helping to finally
> > sort this out!
>
> Well, so previous patch (which was checking class_id string) would be
> preferred?
No, with this rename support lurking, checking names becomes risky.
> > > + cdev = class_device_get(cdev);
> > > + if (!cdev)
> > > + continue;
> >
> > That "continue" case doesn't seem like it should be possible... but
> > at any rate, the "get" can be deferred until the relevent class
> > device is known, since that _valid_ handle can't disappear so long
> > as that semaphore is held. And if you find the right device but
> > can't get a reference ... no point in continuing!
> >
> > Something like a class_find_device() would be the best way to solve
> > this sort of problem, IMO. But we don't have one of those. :(
>
> Indeed the check can be omitted. Should I send a new patch just
> moving class_device_get() into "if (master->bus_num == bus_num)"
> block?
Yes, please.
> The crashing with udev is 2.6.20 regression so I wish this fixed very
> soon. Thank you for review.
Agreed.
- Dave
> ---
> Atsushi Nemoto
>
next prev parent reply other threads:[~2007-01-23 15:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-18 11:28 [PATCH 2.6.20-rc5] SPI: alternative fix for spi_busnum_to_master Atsushi Nemoto
2007-01-22 2:25 ` Atsushi Nemoto
2007-01-22 22:12 ` David Brownell
2007-01-23 1:10 ` Atsushi Nemoto
2007-01-23 15:42 ` David Brownell [this message]
2007-01-23 16:07 ` Atsushi Nemoto
2007-01-23 23:43 ` David Brownell
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=200701230742.15531.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=akpm@osdl.org \
--cc=anemo@mba.ocn.ne.jp \
--cc=hcegtvedt@atmel.com \
--cc=linux-kernel@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