All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Weihang Li <liweihang@hisilicon.com>
Cc: jgg@ziepe.ca, dledford@redhat.com, linux-rdma@vger.kernel.org,
	linuxarm@huawei.com
Subject: Re: [PATCH rdma-core] libhns: Use syslog for debugging while no print by default
Date: Fri, 1 Nov 2019 11:44:44 +0200	[thread overview]
Message-ID: <20191101094444.GF8713@unreal> (raw)
In-Reply-To: <1572574425-41927-1-git-send-email-liweihang@hisilicon.com>

On Fri, Nov 01, 2019 at 10:13:45AM +0800, Weihang Li wrote:
> From: Lang Cheng <chenglang@huawei.com>
>
> There should be no fprintf/printf in libraries by default unless
> debugging. So replace all fprintf/printf in libhns with a macro that is
> controlled by HNS_ROCE_DEBUG.
> This patch also standardizes all printtings to maintain a uniform style.
>
> Signed-off-by: Lang Cheng <chenglang@huawei.com>
> Signed-off-by: Weihang Li <liweihang@hisilicon.com>
> ---
>  providers/hns/hns_roce_u.c       | 12 +++++++-----
>  providers/hns/hns_roce_u.h       | 13 +++++++++++--
>  providers/hns/hns_roce_u_hw_v1.c | 28 ++++++++++++++--------------
>  providers/hns/hns_roce_u_hw_v2.c | 18 +++++++++---------
>  providers/hns/hns_roce_u_verbs.c | 36 ++++++++++++++++++------------------
>  5 files changed, 59 insertions(+), 48 deletions(-)

Thank you for pointing our attention that there are printf() in the library code.
Yes, to removal all fprintf/printf.
No, to introducing not-unified way to see debug messages.
Any solution should be applicable to all providers at least.

Thanks

  reply	other threads:[~2019-11-01  9:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-01  2:13 [PATCH rdma-core] libhns: Use syslog for debugging while no print by default Weihang Li
2019-11-01  9:44 ` Leon Romanovsky [this message]
2019-11-02  2:37   ` Weihang Li
2019-11-02  9:47     ` Leon Romanovsky
2019-11-04  2:42       ` Weihang Li

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=20191101094444.GF8713@unreal \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=liweihang@hisilicon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.