On Wed, 17 Dec 2014 19:10:24 +0000, karthik nayak said:

> The only reason I didn't do that is cause the file is too large to
> manually have a look at, even the diff tends to be very huge.

[/usr/src/linux-next] grep '//' drivers/staging/rtl8192u/r8192U_dm.c | wc -l
373

And why use lex when sed is up to the task?

 [/usr/src/linux-next] sed 's?//(.*)$?/* \1 */?' 
drivers/staging/rtl8192u/r8192U_dm.c >| /tmp/z99
sed: -e expression #1, char 19: invalid reference \1 on `s' command's RHS
1 [/usr/src/linux-next] sed 's?//\(.*\)$?/* \1 */?' 
drivers/staging/rtl8192u/r8192U_dm.c >| /tmp/z99
0 [/usr/src/linux-next] diff -u drivers/staging/rtl8192u/r8192U_dm.c /tmp/z99 | 
head -20
--- drivers/staging/rtl8192u/r8192U_dm.c        2014-11-20 16:18:35.941071156 
-0500
+++ /tmp/z99    2014-12-17 16:22:42.831566630 -0500
@@ -21,9 +21,9 @@
 #include "r8190_rtl8256.h"
 #include "r819xU_cmdpkt.h"
 /*---------------------------Define Local Constant---------------------------*/
-//
-// Indicate different AP vendor for IOT issue.
-//
+/*  */
+/*  Indicate different AP vendor for IOT issue. */
+/*  */
 static u32 edca_setting_DL[HT_IOT_PEER_MAX] =
                { 0x5e4322,     0x5e4322,       0x5e4322,       0x604322,       
0xa44f,         0x5ea44f};
 static u32 edca_setting_UL[HT_IOT_PEER_MAX] =
@@ -36,11 +36,11 @@


 /*------------------------Define global variable-----------------------------*/
-// Debug variable ?
0 [/usr/src/linux-next] diff -u drivers/staging/rtl8192u/r8192U_dm.c /tmp/z99 | 
wc -l
1960

2K lines isn't that hard to review, if the *only* thing you do is fix c99
comments.  I'd recommend it as *two* patches - one to do basically what your
lex code does and convert '// foo bar baz' to '/* foo bar baz */'

And then a *second* patch to fix block comments to   /*    *     */ form.

Attachment: pgptCF0QlEJwB.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to