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.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 DCEA8CA9EC7 for ; Sat, 2 Nov 2019 09:47:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AAEFB21726 for ; Sat, 2 Nov 2019 09:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572688038; bh=uqeMAHLTrkJ2kB3Cc8zJusDKIFROJtU3fg5KAGezERQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=kxeSF2H/UJW8GJpqaz+CGoG6FXcJTMxDxNK+P1Ou64SPy5V+ZyaaIgH3GO89FRFsw NTAGGcQbOEgwNI18ouaJ0golaw1k8wYR262T8/7iT+/ndSQbnQySJfadP0KGbO56uq esVvbzNwaNP0LwzFazGmGSckzvVo4qF1qutIDAXk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727067AbfKBJrR (ORCPT ); Sat, 2 Nov 2019 05:47:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:50220 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726670AbfKBJrR (ORCPT ); Sat, 2 Nov 2019 05:47:17 -0400 Received: from localhost (unknown [77.137.89.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3369620679; Sat, 2 Nov 2019 09:47:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572688036; bh=uqeMAHLTrkJ2kB3Cc8zJusDKIFROJtU3fg5KAGezERQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rzTlUJ9QZVkgJRmhiw3S+5ha60GSxNxdO3Dd68V08N3whLb/6CwnZ+iQAqyuWnDh+ ccyPeq85l0k0Lu7kNLZCYPDsri0U03RMJOl4dUIutj/HJmM1hnZVTOc+5EfmG3mDDq s3Z7upGouzbkdtwr3sRWOCwcZajAQUxphsIM6Qzw= Date: Sat, 2 Nov 2019 11:47:13 +0200 From: Leon Romanovsky To: Weihang Li 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 Message-ID: <20191102094713.GH8713@unreal> References: <1572574425-41927-1-git-send-email-liweihang@hisilicon.com> <20191101094444.GF8713@unreal> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Sat, Nov 02, 2019 at 10:37:50AM +0800, Weihang Li wrote: > > > 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. The solution shouldn't be copy/paste of other provides, but unified approach to see debug messages from rdma-core. Thanks > > Weihang > > >