@@ -84,8 +84,9 @@ static DEFINE_MUTEX(hwspinlock_tree_lock);
84
84
* should decide between spin_trylock, spin_trylock_irq and
85
85
* spin_trylock_irqsave.
86
86
*
87
- * Returns 0 if we successfully locked the hwspinlock or -EBUSY if
87
+ * Returns: % 0 if we successfully locked the hwspinlock or -EBUSY if
88
88
* the hwspinlock was already taken.
89
+ *
89
90
* This function will never sleep.
90
91
*/
91
92
int __hwspin_trylock (struct hwspinlock * hwlock , int mode , unsigned long * flags )
@@ -171,7 +172,7 @@ EXPORT_SYMBOL_GPL(__hwspin_trylock);
171
172
/**
172
173
* __hwspin_lock_timeout() - lock an hwspinlock with timeout limit
173
174
* @hwlock: the hwspinlock to be locked
174
- * @timeout : timeout value in msecs
175
+ * @to : timeout value in msecs
175
176
* @mode: mode which controls whether local interrupts are disabled or not
176
177
* @flags: a pointer to where the caller's interrupt state will be saved at (if
177
178
* requested)
@@ -199,9 +200,11 @@ EXPORT_SYMBOL_GPL(__hwspin_trylock);
199
200
* to choose the appropriate @mode of operation, exactly the same way users
200
201
* should decide between spin_lock, spin_lock_irq and spin_lock_irqsave.
201
202
*
202
- * Returns 0 when the @hwlock was successfully taken, and an appropriate
203
+ * Returns: % 0 when the @hwlock was successfully taken, and an appropriate
203
204
* 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.
205
208
*/
206
209
int __hwspin_lock_timeout (struct hwspinlock * hwlock , unsigned int to ,
207
210
int mode , unsigned long * flags )
@@ -304,13 +307,12 @@ EXPORT_SYMBOL_GPL(__hwspin_unlock);
304
307
305
308
/**
306
309
* of_hwspin_lock_simple_xlate - translate hwlock_spec to return a lock id
307
- * @bank: the hwspinlock device bank
308
310
* @hwlock_spec: hwlock specifier as found in the device tree
309
311
*
310
312
* This is a simple translation function, suitable for hwspinlock platform
311
313
* drivers that only has a lock specifier length of 1.
312
314
*
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,
314
316
* or -EINVAL on invalid specifier cell count.
315
317
*/
316
318
static inline int
@@ -332,9 +334,10 @@ of_hwspin_lock_simple_xlate(const struct of_phandle_args *hwlock_spec)
332
334
* hwspinlock device, so that it can be requested using the normal
333
335
* hwspin_lock_request_specific() API.
334
336
*
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.
338
341
*/
339
342
int of_hwspin_lock_get_id (struct device_node * np , int index )
340
343
{
@@ -399,9 +402,10 @@ EXPORT_SYMBOL_GPL(of_hwspin_lock_get_id);
399
402
* the hwspinlock device, so that it can be requested using the normal
400
403
* hwspin_lock_request_specific() API.
401
404
*
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.
405
409
*/
406
410
int of_hwspin_lock_get_id_byname (struct device_node * np , const char * name )
407
411
{
@@ -481,7 +485,7 @@ static struct hwspinlock *hwspin_lock_unregister_single(unsigned int id)
481
485
*
482
486
* Should be called from a process context (might sleep)
483
487
*
484
- * Returns 0 on success, or an appropriate error code on failure
488
+ * Returns: % 0 on success, or an appropriate error code on failure
485
489
*/
486
490
int hwspin_lock_register (struct hwspinlock_device * bank , struct device * dev ,
487
491
const struct hwspinlock_ops * ops , int base_id , int num_locks )
@@ -529,7 +533,7 @@ EXPORT_SYMBOL_GPL(hwspin_lock_register);
529
533
*
530
534
* Should be called from a process context (might sleep)
531
535
*
532
- * Returns 0 on success, or an appropriate error code on failure
536
+ * Returns: % 0 on success, or an appropriate error code on failure
533
537
*/
534
538
int hwspin_lock_unregister (struct hwspinlock_device * bank )
535
539
{
@@ -578,7 +582,7 @@ static int devm_hwspin_lock_device_match(struct device *dev, void *res,
578
582
*
579
583
* Should be called from a process context (might sleep)
580
584
*
581
- * Returns 0 on success, or an appropriate error code on failure
585
+ * Returns: % 0 on success, or an appropriate error code on failure
582
586
*/
583
587
int devm_hwspin_lock_unregister (struct device * dev ,
584
588
struct hwspinlock_device * bank )
@@ -607,7 +611,7 @@ EXPORT_SYMBOL_GPL(devm_hwspin_lock_unregister);
607
611
*
608
612
* Should be called from a process context (might sleep)
609
613
*
610
- * Returns 0 on success, or an appropriate error code on failure
614
+ * Returns: % 0 on success, or an appropriate error code on failure
611
615
*/
612
616
int devm_hwspin_lock_register (struct device * dev ,
613
617
struct hwspinlock_device * bank ,
@@ -635,12 +639,13 @@ EXPORT_SYMBOL_GPL(devm_hwspin_lock_register);
635
639
636
640
/**
637
641
* __hwspin_lock_request() - tag an hwspinlock as used and power it up
642
+ * @hwlock: the target hwspinlock
638
643
*
639
644
* This is an internal function that prepares an hwspinlock instance
640
645
* before it is given to the user. The function assumes that
641
646
* hwspinlock_tree_lock is taken.
642
647
*
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
644
649
* indicate an error (with the appropriate error code)
645
650
*/
646
651
static int __hwspin_lock_request (struct hwspinlock * hwlock )
@@ -680,7 +685,7 @@ static int __hwspin_lock_request(struct hwspinlock *hwlock)
680
685
* hwspin_lock_get_id() - retrieve id number of a given hwspinlock
681
686
* @hwlock: a valid hwspinlock instance
682
687
*
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.
684
689
*/
685
690
int hwspin_lock_get_id (struct hwspinlock * hwlock )
686
691
{
@@ -704,7 +709,7 @@ EXPORT_SYMBOL_GPL(hwspin_lock_get_id);
704
709
*
705
710
* Should be called from a process context (might sleep)
706
711
*
707
- * Returns the address of the assigned hwspinlock, or NULL on error
712
+ * Returns: the address of the assigned hwspinlock, or % NULL on error
708
713
*/
709
714
struct hwspinlock * hwspin_lock_request (void )
710
715
{
@@ -747,7 +752,7 @@ EXPORT_SYMBOL_GPL(hwspin_lock_request);
747
752
*
748
753
* Should be called from a process context (might sleep)
749
754
*
750
- * Returns the address of the assigned hwspinlock, or NULL on error
755
+ * Returns: the address of the assigned hwspinlock, or % NULL on error
751
756
*/
752
757
struct hwspinlock * hwspin_lock_request_specific (unsigned int id )
753
758
{
@@ -795,7 +800,7 @@ EXPORT_SYMBOL_GPL(hwspin_lock_request_specific);
795
800
*
796
801
* Should be called from a process context (might sleep)
797
802
*
798
- * Returns 0 on success, or an appropriate error code on failure
803
+ * Returns: % 0 on success, or an appropriate error code on failure
799
804
*/
800
805
int hwspin_lock_free (struct hwspinlock * hwlock )
801
806
{
@@ -865,7 +870,7 @@ static void devm_hwspin_lock_release(struct device *dev, void *res)
865
870
*
866
871
* Should be called from a process context (might sleep)
867
872
*
868
- * Returns 0 on success, or an appropriate error code on failure
873
+ * Returns: % 0 on success, or an appropriate error code on failure
869
874
*/
870
875
int devm_hwspin_lock_free (struct device * dev , struct hwspinlock * hwlock )
871
876
{
@@ -891,7 +896,7 @@ EXPORT_SYMBOL_GPL(devm_hwspin_lock_free);
891
896
*
892
897
* Should be called from a process context (might sleep)
893
898
*
894
- * Returns the address of the assigned hwspinlock, or NULL on error
899
+ * Returns: the address of the assigned hwspinlock, or % NULL on error
895
900
*/
896
901
struct hwspinlock * devm_hwspin_lock_request (struct device * dev )
897
902
{
@@ -926,7 +931,7 @@ EXPORT_SYMBOL_GPL(devm_hwspin_lock_request);
926
931
*
927
932
* Should be called from a process context (might sleep)
928
933
*
929
- * Returns the address of the assigned hwspinlock, or NULL on error
934
+ * Returns: the address of the assigned hwspinlock, or % NULL on error
930
935
*/
931
936
struct hwspinlock * devm_hwspin_lock_request_specific (struct device * dev ,
932
937
unsigned int id )
0 commit comments