DriverDev-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Christian.Gromm@microchip.com
Cc: driverdev-devel@linuxdriverproject.org
Subject: Re: [PATCH v4 01/10] staging: most: remove device from interface structure
Date: Fri, 14 Feb 2020 08:17:06 -0800
Message-ID: <20200214161706.GA3964402@kroah.com> (raw)
In-Reply-To: <b8a77d5c7947dd4fb0f06f9938e15b1496f64cd4.camel@microchip.com>

On Thu, Feb 06, 2020 at 09:14:55AM +0000, Christian.Gromm@microchip.com wrote:
> On Fri, 2020-01-24 at 10:09 +0100, Greg KH wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you
> > know the content is safe
> > 
> > On Fri, Jan 24, 2020 at 08:56:56AM +0000, 
> > Christian.Gromm@microchip.com wrote:
> > > On Thu, 2020-01-23 at 19:18 +0100, Greg KH wrote:
> > > > EXTERNAL EMAIL: Do not click links or open attachments unless you
> > > > know the content is safe
> > > > 
> > > > On Thu, Jan 23, 2020 at 04:38:17PM +0100, Christian Gromm wrote:
> > > > > This patch makes the adapter drivers use their own device
> > > > > structures
> > > > > when registering a most interface with the core module.
> > > > > With this the module that actually operates the physical device
> > > > > is
> > > > > the
> > > > > owner of the device.
> > > > 
> > > > Ick, why?  The interface should be part of sysfs, right, and now
> > > > it
> > > > isn't?
> > > 
> > > It still is. What has changed is that the device that actually
> > > represents the attached hardware is used (see probe function of
> > > the USB adapter driver for instance).
> > 
> > Ah.  Ick.  odd...
> > 
> > > > Who handles the lifetime rules of these interfaces now?  Why
> > > > remove this?
> > > 
> > > The struct device that is allocated when attaching a MOST device is
> > > handling the lifetime and the struct most_interface is
> > > representing this device in the kernel. Hence, registered with
> > > sysfs.
> > > 
> > > This ensures that the device is present in the kernel until its
> > > physical stature is being detached from the system.
> > > The core driver is just the man in the middle that registers the
> > > bus and itself as the driver and organizes the configfs, sysfs and
> > > communication paths to user space.
> > > 
> > > > 
> > > > Why isn't the interface dynamically created properly?  That
> > > > should
> > > > solve
> > > > the lifetime rules here, right?
> > > 
> > > The interface is dynamically allocated. This happens inside the
> > > USB, DIM2, I2C etc. drivers. The struct most_interface is part of
> > > the container struct there.
> > 
> > Ok, I'll take the first 7 of these patches and see what the end
> > result
> > looks like after that, it will make reviewing the code easier...
> 
> Did you find some time for the review yet?

I haven't, sorry.  Can you resend the movement patch so that I can just
see it from that point?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply index

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 15:38 [PATCH v4 00/10] staging: most: move core module out of staging Christian Gromm
2020-01-23 15:38 ` [PATCH v4 01/10] staging: most: remove device from interface structure Christian Gromm
2020-01-23 18:18   ` Greg KH
2020-01-24  8:56     ` Christian.Gromm
2020-01-24  9:09       ` Greg KH
2020-02-06  9:14         ` Christian.Gromm
2020-02-14 16:17           ` Greg KH [this message]
2020-01-23 15:38 ` [PATCH v4 02/10] staging: most: core: drop device reference Christian Gromm
2020-01-23 15:38 ` [PATCH v4 03/10] staging: most: remove struct device core driver Christian Gromm
2020-01-23 15:38 ` [PATCH v4 04/10] staging: most: core: remove container struct Christian Gromm
2020-01-23 15:38 ` [PATCH v4 05/10] staging: most: core: fix logging messages Christian Gromm
2020-01-23 15:38 ` [PATCH v4 06/10] staging: next: configfs: fix release link Christian Gromm
2020-01-23 15:38 ` [PATCH v4 07/10] staging: most: usb: check for NULL device Christian Gromm
2020-01-23 15:38 ` [PATCH v4 08/10] staging: most: move core files out of the staging area Christian Gromm
2020-01-23 15:38 ` [PATCH v4 09/10] staging: most: Documentation: update ABI description Christian Gromm
2020-01-23 15:38 ` [PATCH v4 10/10] staging: most: Documentation: move ABI description files out of staging area Christian Gromm

Reply instructions:

You may reply publically 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=20200214161706.GA3964402@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Christian.Gromm@microchip.com \
    --cc=driverdev-devel@linuxdriverproject.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

DriverDev-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/driverdev-devel/0 driverdev-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 driverdev-devel driverdev-devel/ https://lore.kernel.org/driverdev-devel \
		driverdev-devel@linuxdriverproject.org devel@driverdev.osuosl.org
	public-inbox-index driverdev-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxdriverproject.driverdev-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git