<div dir="ltr"><div>I will make necessary and try to re- submit the patch.<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 8, 2015 at 1:14 PM, Joe Perches <span dir="ltr"><<a href="mailto:joe@perches.com" target="_blank">joe@perches.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Thu, 2015-01-08 at 15:49 -0500, <a href="mailto:Valdis.Kletnieks@vt.edu">Valdis.Kletnieks@vt.edu</a> wrote:<br>
> On Thu, 08 Jan 2015 12:37:15 -0800, shirish gajera said:<br>
><br>
> > That's hwy I just fix one warning.<br>
><br>
> That means "don't fix a warning about indentation *and* a warning<br>
> about trailing blanks in the same patch".<br>
><br>
> Also, if you're fixing a style issue, you should actually *review* the<br>
> code, and make sure you fix the issue everywhere, *even if the other ones<br>
> didn't prompt a warning*.<br>
><br>
> It's interesting that the warning only popped on the one case where the<br>
> "/* looping version */" is on a separate line, not on the #else line.<br>
><br>
> Am cc'ing Joe Perches for that question. Joe - to get you up to speed,<br>
> checkpatch was run against drivers/staging/skein/skein_block.c, and it<br>
> flagged one definition of the macro R256, but not the other one, or the<br>
> two definitions each for R512 and R1024. Any idea why?<br>
<br>
</div></div>I believe the comment in the macro interferes with<br>
the perl regex.<br>
<br>
#if SKEIN_UNROLL_256 == 0<br>
#define R256(p0, p1, p2, p3, ROT, r_num) /* fully unrolled */ \<br>
do { \<br>
ROUND256(p0, p1, p2, p3, ROT, r_num); \<br>
} while (0)<br>
<br>
With the latest version in -next I get:<br>
<br>
$ ./scripts/<a href="http://checkpatch.pl" target="_blank">checkpatch.pl</a> -f --strict drivers/staging/skein/skein_block.c --types=SINGLE_STATEMENT_DO_WHILE_MACRO<br>
<span class="">WARNING: Single statement macros should not use a do {} while (0) loop<br>
</span>#85: FILE: drivers/staging/skein/skein_block.c:85:<br>
<span class="">+#define R256(p0, p1, p2, p3, ROT, r_num) \<br>
</span>+do { \<br>
+ ROUND256(p0, p1, p2, p3, ROT, r_num); \<br>
+} while (0)<br>
<span class=""><br>
WARNING: Single statement macros should not use a do {} while (0) loop<br>
</span>#176: FILE: drivers/staging/skein/skein_block.c:176:<br>
+#define R512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num) \<br>
+do { \<br>
+ ROUND512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num); \<br>
+} while (0)<br>
<span class=""><br>
WARNING: Single statement macros should not use a do {} while (0) loop<br>
</span>#264: FILE: drivers/staging/skein/skein_block.c:264:<br>
+#define R1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, pF, \<br>
+ ROT, rn) \<br>
+do { \<br>
+ ROUND1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, \<br>
+ pF, ROT, rn); \<br>
+} while (0)<br>
<span class=""><br>
WARNING: Single statement macros should not use a do {} while (0) loop<br>
</span>#292: FILE: drivers/staging/skein/skein_block.c:292:<br>
+#define R1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, pF, \<br>
+ ROT, rn) \<br>
+do { \<br>
+ ROUND1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, \<br>
+ pF, ROT, rn); \<br>
+} while (0)<br>
<br>
total: 0 errors, 4 warnings, 0 checks, 795 lines checked<br>
<br>
NOTE: Used message types: SINGLE_STATEMENT_DO_WHILE_MACRO<br>
<br>
drivers/staging/skein/skein_block.c has style problems, please review.<br>
<br>
If any of these errors are false positives, please report<br>
them to the maintainer, see CHECKPATCH in MAINTAINERS.<br>
<br>
<br>
</blockquote></div><br></div>