Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: YueHaibing <yuehaibing@huawei.com>
Cc: bmt@zurich.ibm.com, dledford@redhat.com, jgg@ziepe.ca,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/siw: Print error code while kthread_create failed
Date: Wed, 10 Jul 2019 07:35:54 +0300	[thread overview]
Message-ID: <20190710043554.GA7034@mtr-leonro.mtl.com> (raw)
In-Reply-To: <20190710015009.57120-1-yuehaibing@huawei.com>

On Wed, Jul 10, 2019 at 09:50:09AM +0800, YueHaibing wrote:
> 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);

Delete this print together with variable, failure to create kthread
is basic failure, which affect performance only. The whole kthread
creation spam in this driver looked suspicious during submission
and it continues to be.

Thanks

>  			continue;
>  		}
>  		kthread_bind(siw_tx_thread[cpu], cpu);
> --
> 2.7.4
>
>

  reply	other threads:[~2019-07-10  4:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10  1:50 [PATCH] RDMA/siw: Print error code while kthread_create failed YueHaibing
2019-07-10  4:35 ` Leon Romanovsky [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190710043554.GA7034@mtr-leonro.mtl.com \
    --to=leon@kernel.org \
    --cc=bmt@zurich.ibm.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox