public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Weihang Li <liweihang@hisilicon.com>
To: Leon Romanovsky <leon@kernel.org>
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: Sat, 2 Nov 2019 10:37:50 +0800	[thread overview]
Message-ID: <c38ec00b-2d39-afe4-cbd8-c6d1f9c315fd@hisilicon.com> (raw)
In-Reply-To: <20191101094444.GF8713@unreal>



On 2019/11/1 17:44, Leon Romanovsky wrote:
> 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
> 
> .

Hi Leon,
Thanks for your advice, I will use debug file for printings like other providers and send a new PR.

Weihang




  reply	other threads:[~2019-11-02  2:38 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
2019-11-02  2:37   ` Weihang Li [this message]
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=c38ec00b-2d39-afe4-cbd8-c6d1f9c315fd@hisilicon.com \
    --to=liweihang@hisilicon.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@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