From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 20 Jan 2020 12:07:15 -0800 From: Bjorn Andersson Subject: Re: [PATCH v4 2/5] remoteproc: Add device-managed variants of rproc_alloc/rproc_add Message-ID: <20200120200711.GN1511@yoga> References: <20191210164014.50739-1-paul@crapouillou.net> <20191210164014.50739-2-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191210164014.50739-2-paul@crapouillou.net> To: Paul Cercueil Cc: Ohad Ben-Cohen , Rob Herring , Mark Rutland , od@zcrc.me, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org List-ID: On Tue 10 Dec 08:40 PST 2019, Paul Cercueil wrote: [..] > +/** > + * devm_rproc_add() - resource managed rproc_add() > + * @dev: the underlying device > + * @rproc: the remote processor handle to register > + * > + * This function performs like rproc_add() but the registered rproc device will > + * automatically be removed on driver detach. > + * > + * Returns 0 on success and an appropriate error code otherwise. The kerneldoc format is "Return: foo on bar...". So please update this to Return: 0 on success, negative errno on failure > + */ > +int devm_rproc_add(struct device *dev, struct rproc *rproc) > +{ [..] > +/** > + * devm_rproc_alloc() - resource managed rproc_alloc() > + * @dev: the underlying device > + * @name: name of this remote processor > + * @ops: platform-specific handlers (mainly start/stop) > + * @firmware: name of firmware file to load, can be NULL > + * @len: length of private data needed by the rproc driver (in bytes) > + * > + * This function performs like rproc_alloc() but the acuired rproc device will > + * automatically be released on driver detach. > + * > + * On success the new rproc is returned, and on failure, NULL. Return: new rproc instance, NULL on failure Regards, Bjorn