staging: greybus: definitions with comments
PATCH 1/1 staging: greybus: definitions with comments
Code can be better understand by comments. Comments given to definition of mutex and spinlock_t
--- drivers/staging/greybus/connection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/greybus/connection.h +2 -2
@@ -46,8 +46,8 @@ struct gb_connection {gb_request_handler_t handler;unsigned long flags; -struct mutex mutex; -spinlock_t lock; +struct mutex mutex;/* a mutex object */ +spinlock_t lock;/* lock to perform a busy wait */ enum gb_connection_state state;struct list_head operations;
Signature · 1 line
2.7.4
Quoted 13 lines · Payal Kshirsagar
Code can be better understand by comments. Comments given to definition of mutex and
spinlock_tSigned-off-by Payal Kshirsagar <[email protected]>--- drivers/staging/greybus/connection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/greybus/connection.h +0
-0
drivers/staging/greybus/connection.h struct gb_connection { · line 50
Quoted 7 lines
drivers/staging/greybus/connection.h +2
-2@@ -46,8 +46,8 @@ struct gb_connection {gb_request_handler_t handler;unsigned long flags; -struct mutex mutex; -spinlock_t lock; +struct mutex mutex;/* a mutex object */ +spinlock_t lock;/* lock to perform a busy wait */
These comments are not helpful to someone reading the code. The idea is to figure out what data these locks are actually protecting.
julia
Quoted 13 lines
drivers/staging/greybus/connection.h +0
-1enum gb_connection_state state;struct list_head operations; --2.7.4
--
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/1552746866-11000-1-git-send-email-payal.s.kshirsagar.98%40gmail.com.
For more options, visit https://groups.google.com/d/optout.