[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190710015009.57120-1-yuehaibing@huawei.com>
Date:   Wed, 10 Jul 2019 09:50:09 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     <bmt@...ich.ibm.com>, <dledford@...hat.com>, <jgg@...pe.ca>
CC:     <linux-kernel@...r.kernel.org>, <linux-rdma@...r.kernel.org>,
        YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH] RDMA/siw: Print error code while kthread_create failed
In iw_create_tx_threads(), if we failed to create kthread,
we should print the 'rv', this fix gcc warning:
drivers/infiniband/sw/siw/siw_main.c: In function 'siw_create_tx_threads':
drivers/infiniband/sw/siw/siw_main.c:91:11: warning:
 variable 'rv' set but not used [-Wunused-but-set-variable]
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
 drivers/infiniband/sw/siw/siw_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/sw/siw/siw_main.c b/drivers/infiniband/sw/siw/siw_main.c
index fd2552a..2a70830d 100644
--- a/drivers/infiniband/sw/siw/siw_main.c
+++ b/drivers/infiniband/sw/siw/siw_main.c
@@ -101,7 +101,8 @@ static int siw_create_tx_threads(void)
 		if (IS_ERR(siw_tx_thread[cpu])) {
 			rv = PTR_ERR(siw_tx_thread[cpu]);
 			siw_tx_thread[cpu] = NULL;
-			pr_info("Creating TX thread for CPU %d failed", cpu);
+			pr_info("Creating TX thread for CPU%d failed %d\n",
+				cpu, rv);
 			continue;
 		}
 		kthread_bind(siw_tx_thread[cpu], cpu);
-- 
2.7.4
Powered by blists - more mailing lists