lkml.org 
[lkml]   [2017]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] staging: irda: annotate irlan_seq_start() and irlan_seq_stop() for sparse
Date
Annotate rcu_read_lock in irlan_seq_start() and rcu_read_unlock in 
irlan_seq_stop() for sparse

Signed-off-by: Andrii Vladyka <tulup@mail.ru
<https://e.mail.ru/compose?To=tulup@mail.ru>>

diff --git a/drivers/staging/irda/net/irlan/irlan_common.c b/drivers/staging/irda/net/irlan/irlan_common.c
index fdcd714..832df11 100644
--- a/drivers/staging/irda/net/irlan/irlan_common.c
+++ b/drivers/staging/irda/net/irlan/irlan_common.c
@@ -1090,6 +1090,7 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len)
* or NULL if end of file
*/
static void *irlan_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(RCU)
{
rcu_read_lock();
return seq_list_start_head(&irlans, *pos);
@@ -1103,6 +1104,7 @@ static void *irlan_seq_next(struct seq_file *seq, void *v, loff_t *pos)

/* End of reading /proc file */
static void irlan_seq_stop(struct seq_file *seq, void *v)
+ __releases(RCU)
{
rcu_read_unlock();
}
\
 
 \ /
  Last update: 2017-11-28 13:47    [W:0.026 / U:2.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site