staging:cxd2099:Add struct mutex definition
Subsystems (2)
PATCH v2 3/5 staging:cxd2099:Add struct mutex definition
Added the struct mutex definition (A mutex is a mutual exclusion lock used to protect data from concurrent access) to fix the following checkpath.pl issue: CHECK: struct mutex definition without comment.
--- drivers/staging/media/cxd2099/cxd2099.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/media/cxd2099/cxd2099.c +1 -0
@@ -54,6 +54,7 @@ struct cxd {int amem_read;int cammode; +/* use a mutex to protect data from concurrent access */ struct mutex lock; };
Signature · 1 line
2.9.3
Quoted 14 lines · Tamara Diaconita
Added the struct mutex definition (A mutex is a mutual exclusion lock used to protect data from concurrent access) to fix the following checkpath.pl issue: CHECK: struct mutex definition without comment.
Signed-off-by Tamara Diaconita <[email protected]>--- drivers/staging/media/cxd2099/cxd2099.c | 1 + 1 file changed, 1 insertion(+)drivers/staging/media/cxd2099/cxd2099.c +0
-0
drivers/staging/media/cxd2099/cxd2099.c struct cxd { · line 57
Quoted 4 lines
drivers/staging/media/cxd2099/cxd2099.c +1
-0@@ -54,6 +54,7 @@ struct cxd {int amem_read;int cammode; +/* use a mutex to protect data from concurrent access */
This is the definition of what a mutex does. What data in particular needs to be protected? The comment could be just protect XXX. It should be possible to put the comment to the right of the declaration. You can see other examples of such comments by searching for spinlock_t or mutex in the kernel.
julia
Quoted 13 lines
drivers/staging/media/cxd2099/cxd2099.c +0
-1struct mutex lock; }; --2.9.3
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170302184231.3428-1-diaconita.tamara%40gmail.com.
For more options, visit https://groups.google.com/d/optout.