Re: [PATCH rdma-core] libhns: Use syslog for debugging while no print by default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxx>
>>
>> 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@xxxxxxxxxx>
>> Signed-off-by: Weihang Li <liweihang@xxxxxxxxxxxxx>
>> ---
>>  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






[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux