Skip to contentSkip to conversation

staging: vc04_services: interface: vchi: Fix longline comments

PATCH In review R Veera Kumar 3 participants 4 messages Mar 14, 2020 – Mar 18, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: vc04_services: interface: vchi: Fix longline comments

Fixes long line comments in C header file.
Found using checkpatch.pl.

---
 .../interface/vchi/vchi_common.h              | 37 ++++++++++++-------
 1 file changed, 23 insertions(+), 14 deletions(-)
drivers/staging/vc04_services/interface/vchi/vchi_common.h +23 -14
index 141af16ce031..e0f349b05e22 100644
@@ -7,9 +7,13 @@
 //flags used when sending messages (must be bitmapped)
 enum vchi_flags {
 	VCHI_FLAGS_NONE                      = 0x0,
-	VCHI_FLAGS_BLOCK_UNTIL_OP_COMPLETE   = 0x1,   // waits for message to be received, or sent (NB. not the same as being seen on other side)
-	VCHI_FLAGS_CALLBACK_WHEN_OP_COMPLETE = 0x2,   // run a callback when message sent
-	VCHI_FLAGS_BLOCK_UNTIL_QUEUED        = 0x4,   // return once the transfer is in a queue ready to go
+	VCHI_FLAGS_BLOCK_UNTIL_OP_COMPLETE   = 0x1,
+		// waits for message to be received, or sent (NB. not the
+		// same as being seen on other side)
+	VCHI_FLAGS_CALLBACK_WHEN_OP_COMPLETE = 0x2,
+		// run a callback when message sent
+	VCHI_FLAGS_BLOCK_UNTIL_QUEUED        = 0x4,
+		// return once the transfer is in a queue ready to go
 	VCHI_FLAGS_ALLOW_PARTIAL             = 0x8,
 	VCHI_FLAGS_BLOCK_UNTIL_DATA_READ     = 0x10,
 	VCHI_FLAGS_CALLBACK_WHEN_DATA_READ   = 0x20,
@@ -35,8 +39,10 @@ enum vchi_callback_reason {
 
 	//This indicates that there is data available
 	//handle is the msg id that was transmitted with the data
-	//    When a message is received and there was no FULL message available previously, send callback
-	//    Tasks get kicked by the callback, reset their event and try and read from the fifo until it fails
+	//    When a message is received and there was no FULL message
+	//     available previously, send callback
+	//    Tasks get kicked by the callback, reset their event and
+	//     try and read from the fifo until it fails
 	VCHI_CALLBACK_MSG_AVAILABLE,
 	VCHI_CALLBACK_MSG_SENT,
 	VCHI_CALLBACK_MSG_SPACE_AVAILABLE, // XXX not yet implemented
@@ -51,9 +57,10 @@ enum vchi_callback_reason {
 
 	VCHI_CALLBACK_SERVICE_CLOSED,
 
-	// this side has sent XOFF to peer due to lack of data consumption by service
-	// (suggests the service may need to take some recovery action if it has
-	// been deliberately holding off consuming data)
+	// this side has sent XOFF to peer due to lack of data consumption
+	//  by service
+	// (suggests the service may need to take some recovery action if it
+	//  has been deliberately holding off consuming data)
 	VCHI_CALLBACK_SENT_XOFF,
 	VCHI_CALLBACK_SENT_XON,
 
@@ -112,12 +119,14 @@ struct vchi_msg_vector {
 	int32_t vec_len;
 };
 
-// Iterator structure for reading ahead through received message queue. Allocated by client,
-// initialised by vchi_msg_look_ahead. Fields are for internal VCHI use only.
-// Iterates over messages in queue at the instant of the call to vchi_msg_lookahead -
-// will not proceed to messages received since. Behaviour is undefined if an iterator
-// is used again after messages for that service are removed/dequeued by any
-// means other than vchi_msg_iter_... calls on the iterator itself.
+// Iterator structure for reading ahead through received message queue.
+// Allocated by client, initialised by vchi_msg_look_ahead. Fields are
+//   for internal VCHI use only.
+// Iterates over messages in queue at the instant of the call to
+//  vchi_msg_lookahead - will not proceed to messages received since.
+// Behaviour is undefined if an iterator is used again after messages for
+//  that service are removed/dequeued by any means other than
+//  vchi_msg_iter_... calls on the iterator itself.
 struct vchi_msg_iter {
 	struct opaque_vchi_service_t *service;
 	void *last;
Signature · 1 line
2.20.1
#1 lore raw
Quoted 2 lines · On Sat, 14 Mar 2020 10:40:07 +0530 R Veera Kumar <[email protected]> wrote:

Fixes long line comments in C header file.
Found using checkpatch.pl.

Same as Julia's comments for your:
[PATCH] staging: rts5208: Fix long line in C func call argument

Also, C99/C++ comments (//) are not allowed by the coding style. As you are rewriting all those lines anyway, you should fix that as well.

Please re-send.

Signature · 1 line
Stefano
#2 lore raw
Quoted 12 lines · Stefano Brivio
Quoted 2 lines · On Sat, 14 Mar 2020 10:40:07 +0530 R Veera Kumar <[email protected]> wrote:

Fixes long line comments in C header file.
Found using checkpatch.pl.

Same as Julia's comments for your:
[PATCH] staging: rts5208: Fix long line in C func call argument

Also, C99/C++ comments (//) are not allowed by the coding style. As you are rewriting all those lines anyway, you should fix that as well.

One thing, I read somewhere perhaps in Documentation/process that C headers should use // comments, else breaks with some compiler / preprocessor. Correct me if am wrong.

Veera

Quoted 5 lines

Please re-send.

Signature · 1 line
Stefano
#3 lore raw
Quoted 10 lines · R Veera Kumar
Quoted 9 lines · Stefano Brivio
Quoted 2 lines · On Sat, 14 Mar 2020 10:40:07 +0530 R Veera Kumar <[email protected]> wrote:

Fixes long line comments in C header file.
Found using checkpatch.pl.

Same as Julia's comments for your:
[PATCH] staging: rts5208: Fix long line in C func call argument

Quoted 7 lines
Quoted 3 lines

Also, C99/C++ comments (//) are not allowed by the coding style. As you are rewriting all those lines anyway, you should fix that as well.

One thing, I read somewhere perhaps in Documentation/process that C headers should use // comments, else breaks with some compiler / preprocessor. Correct me if am wrong.

Only use // for the first SPDX line, in .h files. Not in .c files.

thanks,

greg k-h