lkml.org 
[lkml]   [2015]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 1/2] tee: generic TEE subsystem
On Sat, Apr 18, 2015 at 08:47:13PM +0200, Greg Kroah-Hartman wrote:
> On Sat, Apr 18, 2015 at 10:04:20AM +0100, Russell King - ARM Linux wrote:
> > On Sat, Apr 18, 2015 at 10:57:12AM +0200, Greg Kroah-Hartman wrote:
> > > On Fri, Apr 17, 2015 at 09:50:56AM +0200, Jens Wiklander wrote:
> > > > +struct tee_device {
> > > > + char name[TEE_MAX_DEV_NAME_LEN];
> > > > + const struct tee_desc *desc;
> > > > + struct device *dev;
> > >
> > > No, please embed the device in your structure, don't have a pointer to
> > > it.
> >
> > Greg, "dev" here is not a locally allocated device, but the parent device.
> > It's actually the same as struct tee_device.miscdev.parent, which could be
> > used instead and this member deleted.
>
> A miscdev doesn't need to have a "parent", it's just there to provide a
> character device node to userspace, not to represent a "device that you
> can do things with in the heirachy".
>
> If you really want that, then use a real 'struct device' as should be
> done here. Have just a pointer to a misc device, that is meant to be
> dynamic.

Let's rewind.

You are saying that "struct device *dev;" should be "struct device dev;"

I'm saying that you are mis-interpreting in your review what _that_ is.

--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.


\
 
 \ /
  Last update: 2015-04-18 21:41    [W:0.059 / U:2.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site