Whamcloud - gitweb
LU-9119 lnet: remove "struct' from generated comment 07/55507/2
authorOlaf Weber <olaf@sgi.com>
Fri, 27 Jan 2017 15:17:01 +0000 (16:17 +0100)
committerOleg Drokin <green@whamcloud.com>
Sat, 13 Jul 2024 20:54:25 +0000 (20:54 +0000)
The CHECK_STRUCT() generates a comment saying
"Checks for struct " followed by the type name.
If the type name is 'struct mumble' the result
is "Checks for struct struct mumble". Drop the
extra "struct".

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Olaf Weber <olaf@sgi.com>
Signed-off-by: Olaf Weber <olaf.weber@hpe.com>
Change-Id: I90b13a2c500c63accb90ef567b197defd5521dea
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55507
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/api-ni.c
lnet/utils/wirecheck.c

index 0825c0b..cf96e8e 100644 (file)
@@ -823,7 +823,7 @@ static void lnet_assert_wire_constants(void)
                                   wh_object_cookie) != 8);
        BUILD_BUG_ON((int)sizeof(((struct lnet_handle_wire *)0)->wh_object_cookie) != 8);
 
-       /* Checks for struct struct lnet_magicversion */
+       /* Checks for lnet_magicversion */
        BUILD_BUG_ON((int)sizeof(struct lnet_magicversion) != 8);
        BUILD_BUG_ON((int)offsetof(struct lnet_magicversion, magic) != 0);
        BUILD_BUG_ON((int)sizeof(((struct lnet_magicversion *)0)->magic) != 4);
@@ -833,7 +833,7 @@ static void lnet_assert_wire_constants(void)
                                   version_minor) != 6);
        BUILD_BUG_ON((int)sizeof(((struct lnet_magicversion *)0)->version_minor) != 2);
 
-       /* Checks for struct _lnet_hdr_nid4 */
+       /* Checks for _lnet_hdr_nid4 */
        BUILD_BUG_ON((int)sizeof(struct _lnet_hdr_nid4) != 72);
        BUILD_BUG_ON((int)offsetof(struct _lnet_hdr_nid4, dest_nid) != 0);
        BUILD_BUG_ON((int)sizeof(((struct _lnet_hdr_nid4 *)0)->dest_nid) != 8);
index c431bf3..af61b1f 100644 (file)
@@ -61,7 +61,7 @@ do {                                                                  \
 #define CHECK_STRUCT(s)                                                        \
 do {                                                                   \
        BLANK_LINE();                                                   \
-       COMMENT("Checks for struct "#s);                                \
+       COMMENT("Checks for "#s);                                       \
        CHECK_VALUE((int)sizeof(s));                                    \
 } while (0)