From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CFF8CA9ECF for ; Sat, 2 Nov 2019 02:38:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A97A208E3 for ; Sat, 2 Nov 2019 02:38:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727151AbfKBCiH (ORCPT ); Fri, 1 Nov 2019 22:38:07 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:34538 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727067AbfKBCiH (ORCPT ); Fri, 1 Nov 2019 22:38:07 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 56F74C09AD8682A4CCBD; Sat, 2 Nov 2019 10:38:01 +0800 (CST) Received: from [127.0.0.1] (10.40.168.149) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Sat, 2 Nov 2019 10:37:50 +0800 Subject: Re: [PATCH rdma-core] libhns: Use syslog for debugging while no print by default To: Leon Romanovsky CC: , , , References: <1572574425-41927-1-git-send-email-liweihang@hisilicon.com> <20191101094444.GF8713@unreal> From: Weihang Li Message-ID: Date: Sat, 2 Nov 2019 10:37:50 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191101094444.GF8713@unreal> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.40.168.149] X-CFilter-Loop: Reflected Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 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 >> >> 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 >> Signed-off-by: Weihang Li >> --- >> 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