From bb967468875f967c9463afb19c3fbd27cfdf0688 Mon Sep 17 00:00:00 2001 From: Arshad Hussain Date: Thu, 27 Dec 2018 07:26:17 -0500 Subject: [PATCH] LU-9010 lnet: Change static defines to use macro for module.c This patch replaces mutex which are defined statically in file lnet/lnet/module.c with kernel provided macro. Signed-off-by: Arshad Hussain Change-Id: I59de4514dc332c3c59e0d816720a81394521881c Reviewed-on: https://review.whamcloud.com/33932 Reviewed-by: Andreas Dilger Reviewed-by: Ben Evans Reviewed-by: James Simmons Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lnet/lnet/module.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lnet/lnet/module.c b/lnet/lnet/module.c index 676f734..9b43c20 100644 --- a/lnet/lnet/module.c +++ b/lnet/lnet/module.c @@ -39,7 +39,7 @@ static int config_on_load = 0; module_param(config_on_load, int, 0444); MODULE_PARM_DESC(config_on_load, "configure network at module load"); -static struct mutex lnet_config_mutex; +static DEFINE_MUTEX(lnet_config_mutex); static int lnet_configure(void *arg) @@ -235,8 +235,6 @@ static int __init lnet_init(void) int rc; ENTRY; - mutex_init(&lnet_config_mutex); - rc = lnet_lib_init(); if (rc != 0) { CERROR("lnet_lib_init: error %d\n", rc); -- 1.8.3.1