@@ -84,8 +84,9 @@ static DEFINE_MUTEX(hwspinlock_tree_lock);
8484 * should decide between spin_trylock, spin_trylock_irq and
8585 * spin_trylock_irqsave.
8686 *
87- * Returns 0 if we successfully locked the hwspinlock or -EBUSY if
87+ * Returns: % 0 if we successfully locked the hwspinlock or -EBUSY if
8888 * the hwspinlock was already taken.
89+ *
8990 * This function will never sleep.
9091 */
9192int __hwspin_trylock (struct hwspinlock * hwlock , int mode , unsigned long * flags )
@@ -171,7 +172,7 @@ EXPORT_SYMBOL_GPL(__hwspin_trylock);
171172/**
172173 * __hwspin_lock_timeout() - lock an hwspinlock with timeout limit
173174 * @hwlock: the hwspinlock to be locked
174- * @timeout : timeout value in msecs
175+ * @to : timeout value in msecs
175176 * @mode: mode which controls whether local interrupts are disabled or not
176177 * @flags: a pointer to where the caller's interrupt state will be saved at (if
177178 * requested)
@@ -199,9 +200,11 @@ EXPORT_SYMBOL_GPL(__hwspin_trylock);
199200 * to choose the appropriate @mode of operation, exactly the same way users
200201 * should decide between spin_lock, spin_lock_irq and spin_lock_irqsave.
201202 *
202- * Returns 0 when the @hwlock was successfully taken, and an appropriate
203+ * Returns: % 0 when the @hwlock was successfully taken, and an appropriate
203204 * error code otherwise (most notably -ETIMEDOUT if the @hwlock is still
204- * busy after @timeout msecs). The function will never sleep.
205+ * busy after @timeout msecs).
206+ *
207+ * The function will never sleep.
205208 */
206209int __hwspin_lock_timeout (struct hwspinlock * hwlock , unsigned int to ,
207210 int mode , unsigned long * flags )
@@ -304,13 +307,12 @@ EXPORT_SYMBOL_GPL(__hwspin_unlock);
304307
305308/**
306309 * of_hwspin_lock_simple_xlate - translate hwlock_spec to return a lock id
307- * @bank: the hwspinlock device bank
308310 * @hwlock_spec: hwlock specifier as found in the device tree
309311 *
310312 * This is a simple translation function, suitable for hwspinlock platform
311313 * drivers that only has a lock specifier length of 1.
312314 *
313- * Returns a relative index of the lock within a specified bank on success,
315+ * Returns: a relative index of the lock within a specified bank on success,
314316 * or -EINVAL on invalid specifier cell count.
315317 */
316318static inline int
@@ -332,9 +334,10 @@ of_hwspin_lock_simple_xlate(const struct of_phandle_args *hwlock_spec)
332334 * hwspinlock device, so that it can be requested using the normal
333335 * hwspin_lock_request_specific() API.
334336 *
335- * Returns the global lock id number on success, -EPROBE_DEFER if the hwspinlock
336- * device is not yet registered, -EINVAL on invalid args specifier value or an
337- * appropriate error as returned from the OF parsing of the DT client node.
337+ * Returns: the global lock id number on success, -EPROBE_DEFER if the
338+ * hwspinlock device is not yet registered, -EINVAL on invalid args
339+ * specifier value or an appropriate error as returned from the OF parsing
340+ * of the DT client node.
338341 */
339342int of_hwspin_lock_get_id (struct device_node * np , int index )
340343{
@@ -399,9 +402,10 @@ EXPORT_SYMBOL_GPL(of_hwspin_lock_get_id);
399402 * the hwspinlock device, so that it can be requested using the normal
400403 * hwspin_lock_request_specific() API.
401404 *
402- * Returns the global lock id number on success, -EPROBE_DEFER if the hwspinlock
403- * device is not yet registered, -EINVAL on invalid args specifier value or an
404- * appropriate error as returned from the OF parsing of the DT client node.
405+ * Returns: the global lock id number on success, -EPROBE_DEFER if the
406+ * hwspinlock device is not yet registered, -EINVAL on invalid args
407+ * specifier value or an appropriate error as returned from the OF parsing
408+ * of the DT client node.
405409 */
406410int of_hwspin_lock_get_id_byname (struct device_node * np , const char * name )
407411{
@@ -481,7 +485,7 @@ static struct hwspinlock *hwspin_lock_unregister_single(unsigned int id)
481485 *
482486 * Should be called from a process context (might sleep)
483487 *
484- * Returns 0 on success, or an appropriate error code on failure
488+ * Returns: % 0 on success, or an appropriate error code on failure
485489 */
486490int hwspin_lock_register (struct hwspinlock_device * bank , struct device * dev ,
487491 const struct hwspinlock_ops * ops , int base_id , int num_locks )
@@ -529,7 +533,7 @@ EXPORT_SYMBOL_GPL(hwspin_lock_register);
529533 *
530534 * Should be called from a process context (might sleep)
531535 *
532- * Returns 0 on success, or an appropriate error code on failure
536+ * Returns: % 0 on success, or an appropriate error code on failure
533537 */
534538int hwspin_lock_unregister (struct hwspinlock_device * bank )
535539{
@@ -578,7 +582,7 @@ static int devm_hwspin_lock_device_match(struct device *dev, void *res,
578582 *
579583 * Should be called from a process context (might sleep)
580584 *
581- * Returns 0 on success, or an appropriate error code on failure
585+ * Returns: % 0 on success, or an appropriate error code on failure
582586 */
583587int devm_hwspin_lock_unregister (struct device * dev ,
584588 struct hwspinlock_device * bank )
@@ -607,7 +611,7 @@ EXPORT_SYMBOL_GPL(devm_hwspin_lock_unregister);
607611 *
608612 * Should be called from a process context (might sleep)
609613 *
610- * Returns 0 on success, or an appropriate error code on failure
614+ * Returns: % 0 on success, or an appropriate error code on failure
611615 */
612616int devm_hwspin_lock_register (struct device * dev ,
613617 struct hwspinlock_device * bank ,
@@ -635,12 +639,13 @@ EXPORT_SYMBOL_GPL(devm_hwspin_lock_register);
635639
636640/**
637641 * __hwspin_lock_request() - tag an hwspinlock as used and power it up
642+ * @hwlock: the target hwspinlock
638643 *
639644 * This is an internal function that prepares an hwspinlock instance
640645 * before it is given to the user. The function assumes that
641646 * hwspinlock_tree_lock is taken.
642647 *
643- * Returns 0 or positive to indicate success, and a negative value to
648+ * Returns: % 0 or positive to indicate success, and a negative value to
644649 * indicate an error (with the appropriate error code)
645650 */
646651static int __hwspin_lock_request (struct hwspinlock * hwlock )
@@ -680,7 +685,7 @@ static int __hwspin_lock_request(struct hwspinlock *hwlock)
680685 * hwspin_lock_get_id() - retrieve id number of a given hwspinlock
681686 * @hwlock: a valid hwspinlock instance
682687 *
683- * Returns the id number of a given @hwlock, or -EINVAL if @hwlock is invalid.
688+ * Returns: the id number of a given @hwlock, or -EINVAL if @hwlock is invalid.
684689 */
685690int hwspin_lock_get_id (struct hwspinlock * hwlock )
686691{
@@ -704,7 +709,7 @@ EXPORT_SYMBOL_GPL(hwspin_lock_get_id);
704709 *
705710 * Should be called from a process context (might sleep)
706711 *
707- * Returns the address of the assigned hwspinlock, or NULL on error
712+ * Returns: the address of the assigned hwspinlock, or % NULL on error
708713 */
709714struct hwspinlock * hwspin_lock_request (void )
710715{
@@ -747,7 +752,7 @@ EXPORT_SYMBOL_GPL(hwspin_lock_request);
747752 *
748753 * Should be called from a process context (might sleep)
749754 *
750- * Returns the address of the assigned hwspinlock, or NULL on error
755+ * Returns: the address of the assigned hwspinlock, or % NULL on error
751756 */
752757struct hwspinlock * hwspin_lock_request_specific (unsigned int id )
753758{
@@ -795,7 +800,7 @@ EXPORT_SYMBOL_GPL(hwspin_lock_request_specific);
795800 *
796801 * Should be called from a process context (might sleep)
797802 *
798- * Returns 0 on success, or an appropriate error code on failure
803+ * Returns: % 0 on success, or an appropriate error code on failure
799804 */
800805int hwspin_lock_free (struct hwspinlock * hwlock )
801806{
@@ -865,7 +870,7 @@ static void devm_hwspin_lock_release(struct device *dev, void *res)
865870 *
866871 * Should be called from a process context (might sleep)
867872 *
868- * Returns 0 on success, or an appropriate error code on failure
873+ * Returns: % 0 on success, or an appropriate error code on failure
869874 */
870875int devm_hwspin_lock_free (struct device * dev , struct hwspinlock * hwlock )
871876{
@@ -891,7 +896,7 @@ EXPORT_SYMBOL_GPL(devm_hwspin_lock_free);
891896 *
892897 * Should be called from a process context (might sleep)
893898 *
894- * Returns the address of the assigned hwspinlock, or NULL on error
899+ * Returns: the address of the assigned hwspinlock, or % NULL on error
895900 */
896901struct hwspinlock * devm_hwspin_lock_request (struct device * dev )
897902{
@@ -926,7 +931,7 @@ EXPORT_SYMBOL_GPL(devm_hwspin_lock_request);
926931 *
927932 * Should be called from a process context (might sleep)
928933 *
929- * Returns the address of the assigned hwspinlock, or NULL on error
934+ * Returns: the address of the assigned hwspinlock, or % NULL on error
930935 */
931936struct hwspinlock * devm_hwspin_lock_request_specific (struct device * dev ,
932937 unsigned int id )
0 commit comments