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