Whamcloud - gitweb
LU-6210 ptlrpc: Use C99 initializer in ptlrpc_register_rqbd() 79/28479/3
authorSteve Guminski <stephenx.guminski@intel.com>
Mon, 7 Aug 2017 18:01:32 +0000 (14:01 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 28 Aug 2017 06:26:53 +0000 (06:26 +0000)
This patch makes no functional changes.  The struct initializer in
ptlrpc_register_rqbd() is updated to C99 syntax.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I7c24bac3ba6be6732b206406cd74b0d4f8a1f9c2
Reviewed-on: https://review.whamcloud.com/28479
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/niobuf.c

index 9998690..ee7163c 100644 (file)
@@ -944,7 +944,10 @@ EXPORT_SYMBOL(ptl_send_rpc);
 int ptlrpc_register_rqbd(struct ptlrpc_request_buffer_desc *rqbd)
 {
        struct ptlrpc_service *service = rqbd->rqbd_svcpt->scp_service;
 int ptlrpc_register_rqbd(struct ptlrpc_request_buffer_desc *rqbd)
 {
        struct ptlrpc_service *service = rqbd->rqbd_svcpt->scp_service;
-       static struct lnet_process_id match_id = {LNET_NID_ANY, LNET_PID_ANY};
+       static struct lnet_process_id match_id = {
+               .nid = LNET_NID_ANY,
+               .pid = LNET_PID_ANY
+       };
        int rc;
        struct lnet_md md;
        struct lnet_handle_me me_h;
        int rc;
        struct lnet_md md;
        struct lnet_handle_me me_h;