From mboxrd@z Thu Jan 1 00:00:00 1970 From: Logan Gunthorpe Subject: Re: [PATCH v2 01/16] chardev: add helper function to register char devs with a struct device Date: Mon, 27 Feb 2017 20:27:44 -0700 Message-ID: <7df6e57b-531c-1b23-05bf-c368df2d20f3@deltatee.com> References: <1488091097-12328-1-git-send-email-logang@deltatee.com> <1488091097-12328-2-git-send-email-logang@deltatee.com> <20170227165618.GE5891@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170227165618.GE5891-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" To: Jason Gunthorpe , Dan Williams Cc: Alessandro Zummo , Jan Kara , linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linus Walleij , Jarkko Sakkinen , Alexandre Bounine , Alexandre Belloni , Peter Meerwald-Stadler , linux-scsi , Peter Huewe , Parav Pandit , Sean Hefty , Alexandre Courbot , Lars-Peter Clausen , "James E.J. Bottomley" , rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, Leon Romanovsky , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Richard Weinberger , Marek Vasut , Doug Ledford , Hans Verkuil , Matt List-Id: linux-input@vger.kernel.org On 27/02/17 09:56 AM, Jason Gunthorpe wrote: > Yes please, that is way too subtle. Suggest: > > NOTE: Callers must assume that userspace was able to open the cdev and > can call cdev fops callbacks at any time, even if this function fails. > > I would also add a note to cdev_device_del: > > NOTE: This guarantees that associated sysfs callbacks are not running > or runnable, however any open cdevs will remain and their fops remain > callable even after this returns. > > Since I have seen a lot of confusion on that point as well.. Sure, I'll add that verbiage to a v3 sometime after rc1. Logan