<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">&lt;<a href="mailto:joe@perches.com" target="_blank">joe@perches.com</a>&gt;</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>
&gt; On Thu, 08 Jan 2015 12:37:15 -0800, shirish gajera said:<br>
&gt;<br>
&gt; &gt; That&#39;s hwy I just fix one warning.<br>
&gt;<br>
&gt; That means &quot;don&#39;t fix a warning about indentation *and* a  warning<br>
&gt; about trailing blanks in the same patch&quot;.<br>
&gt;<br>
&gt; Also, if you&#39;re fixing a style issue, you should actually *review* the<br>
&gt; code, and make sure you fix the issue everywhere, *even if the other ones<br>
&gt; didn&#39;t prompt a warning*.<br>
&gt;<br>
&gt; It&#39;s interesting that the warning only popped on the one case where the<br>
&gt; &quot;/* looping version */&quot; is on a separate line, not on the #else line.<br>
&gt;<br>
&gt; Am cc&#39;ing Joe Perches for that question. Joe - to get you up to speed,<br>
&gt; checkpatch was run against drivers/staging/skein/skein_block.c, and it<br>
&gt; flagged one definition of the macro R256, but not the other one, or the<br>
&gt; 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>