linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RDMA/siw: Print error code while kthread_create failed
@ 2019-07-10  1:50 YueHaibing
  2019-07-10  4:35 ` Leon Romanovsky
  2019-07-10  8:38 ` Re: [PATCH] RDMA/siw: Print error code while kthread_create failed Bernard Metzler
  0 siblings, 2 replies; 5+ messages in thread
From: YueHaibing @ 2019-07-10  1:50 UTC (permalink / raw)
  To: bmt, dledford, jgg; +Cc: linux-kernel, linux-rdma, YueHaibing

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@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-07-10 17:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-10  1:50 [PATCH] RDMA/siw: Print error code while kthread_create failed YueHaibing
2019-07-10  4:35 ` Leon Romanovsky
2019-07-10  6:15   ` [PATCH] RDMA/siw: remove unnecessary print in iw_create_tx_threads YueHaibing
2019-07-10  8:38 ` Re: [PATCH] RDMA/siw: Print error code while kthread_create failed Bernard Metzler
2019-07-10 17:31   ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).