From: Michael Ellerman <michael@ellerman.id.au>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
viro@zeniv.linux.org.uk
Subject: Re: [PATCH] Store the relevant miscdevice in file->private_data in misc_open()
Date: Fri, 14 Nov 2008 13:50:52 +1100 [thread overview]
Message-ID: <1226631052.8066.25.camel@localhost> (raw)
In-Reply-To: <20081114001818.GB20023@kroah.com>
[-- Attachment #1: Type: text/plain, Size: 2125 bytes --]
On Thu, 2008-11-13 at 16:18 -0800, Greg KH wrote:
> On Fri, Nov 14, 2008 at 10:54:41AM +1100, Michael Ellerman wrote:
> > On Thu, 2008-11-13 at 09:31 -0800, Greg KH wrote:
> > > On Thu, Nov 13, 2008 at 03:49:50PM +1100, Michael Ellerman wrote:
> > > > Currently it's not easy to share file_operations between multiple
> > > > instances of a miscdevice. In order to do this, the device code needs to
> > > > store a list of all it's miscdevice instances, and when fops->open() is
> > > > called, search the list and find the right device based on the minor
> > > > number.
> > > >
> > > > However the generic miscdevice code already has a list of miscdevices,
> > > > and uses this to find the right device in misc_open(). If misc_open()
> > > > would store the miscdevice it found in file->private_data, then the
> > > > device code wouldn't need to worry about storing it's own separate list
> > > > and searching that as well.
> > > >
> > > > The rest of the miscdevice code does not use file->private_data, so the
> > > > device code is still free to use file->private_data for something else
> > > > if it wants to.
> > > >
> > > > Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> > >
> > > Do you have a follow-on patch for some misc device using code that would
> > > take advantage of this change?
> >
> > Ah, good point. I do, but not for upstream :/
>
> Hm, then I have to ask why should we take this change?
Because it's seems like a good idea.
If that's your only objection I'll find some in-tree drivers that can
use it, drivers/char/tpm/tpm.c looks like it could use it for starters.
It's a bit hard to tell but there might be some others.
> And why would the driver not be availble for upstream to take?
Because it's a hacky pile of crud, and it's for unreleased and
non-existent hardware.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2008-11-14 2:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-13 4:49 [PATCH] Store the relevant miscdevice in file->private_data in misc_open() Michael Ellerman
2008-11-13 17:31 ` Greg KH
2008-11-13 23:54 ` Michael Ellerman
2008-11-14 0:18 ` Greg KH
2008-11-14 2:50 ` Michael Ellerman [this message]
2008-11-14 3:23 ` Greg KH
2008-11-14 4:01 ` Randy Dunlap
2008-11-14 4:15 ` Greg KH
2008-11-14 4:58 ` Michael Ellerman
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=1226631052.8066.25.camel@localhost \
--to=michael@ellerman.id.au \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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