Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2200782pxb; Fri, 25 Mar 2022 12:56:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzP3EMD+4UwkS6PMQAEpJffMp7iZxTbFEcjkUlXZLs8+0KtGZ5+qch9HIvpW69kISjgfWYy X-Received: by 2002:a17:90b:3c0d:b0:1c7:ecae:e609 with SMTP id pb13-20020a17090b3c0d00b001c7ecaee609mr4671803pjb.61.1648238171460; Fri, 25 Mar 2022 12:56:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648238171; cv=none; d=google.com; s=arc-20160816; b=njFiStI28NyljwxOsJtWhCeSE0XZAJqZMVSdzqkJLZj5uv4AbhkRS3tdxqy4FEi5nU 0580LnwuGz4KOpSEXF6QC8o1ru4PzpIzcRWGfqc+956OLVp7/2NGK69o9mdTK+WH9lFi ExJqhD8TkAwoJIq5uqP44nUW7tb/RuT+BMNPAincge/YJbrKEJc2DOwA9xuuWMkXtcFq zjdwZmxvDq3bWwtHRF8G4VEHXL+UHK6PasdYQiruq3lEl91CluwZDbQ/LGEeI4MCq/+i Q+EJgOFyprELU73q28j34D1Jt6d5ic7x0GM4aUaePdG/zOizJrT4ygqTV0X+RxKoyGhS j7tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=fhaHraNoyhaubK/ZQEJ5dRZXEkFqSBK/GyVjPXaYo2Y=; b=pOMDxg35TDiV0RuPKAMAlcKv5/yA0Pb9TTVLagfUHP5QXN+JQ88KyDM7p2xb+B6nr6 8ANc8p5f39tX1Udzfw7YYVcUl6Xc82FCrJ9p8OK9mNTKU0RaA3pwzeOlvL9y/197z2ql OyhmXIQEdFQd7UmCMtjFW/ajmupmR5WktUj8qh3zkncwNQHI2oXMNP7qT76rMvsEqWq7 TlPuseZbuzL6jScXa+PeXmTOy7kdaynImXtQp8v/sz7lESRhT4l/16TuP34EJ5B7kNc3 cKSI90qJPEraPK3NenpKICUxOnyREj7S9NUfrvypyR9cH3dIT6gT0/IsrDmkcydPPjM5 K5+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n6-20020a6546c6000000b0038233e5c911si3384976pgr.88.2022.03.25.12.56.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:56:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2155E1FA79; Fri, 25 Mar 2022 11:45:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359410AbiCYO6l (ORCPT + 99 others); Fri, 25 Mar 2022 10:58:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355920AbiCYO6k (ORCPT ); Fri, 25 Mar 2022 10:58:40 -0400 Received: from mail.holtmann.org (coyote.holtmann.net [212.227.132.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ADF5852E4C for ; Fri, 25 Mar 2022 07:57:06 -0700 (PDT) Received: from smtpclient.apple (p4ff9fa3c.dip0.t-ipconnect.de [79.249.250.60]) by mail.holtmann.org (Postfix) with ESMTPSA id C50D8CECDE; Fri, 25 Mar 2022 15:57:05 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: [PATCH BlueZ v4 1/9] log: Don't log __FILE__ and __func__ with DBG_IDX From: Marcel Holtmann In-Reply-To: <20220323224003.3736525-2-luiz.dentz@gmail.com> Date: Fri, 25 Mar 2022 15:57:05 +0100 Cc: linux-bluetooth@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: <19D73FF4-059E-46D5-9FFA-570DEF6E960A@holtmann.org> References: <20220323224003.3736525-1-luiz.dentz@gmail.com> <20220323224003.3736525-2-luiz.dentz@gmail.com> To: Luiz Augusto von Dentz X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Luiz, > This removes __FILE__ and __func__ from DBG_IDX since users of it may > already contain such information embedded in the format. > --- > src/log.h | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/src/log.h b/src/log.h > index 74941beb2..1ed742a0d 100644 > --- a/src/log.h > +++ b/src/log.h > @@ -9,6 +9,7 @@ > */ > > #include > +#include seems to have nothing to do with the change here. > void info(const char *format, ...) __attribute__((format(printf, 1, 2))); > > @@ -52,10 +53,11 @@ void __btd_enable_debug(struct btd_debug_desc *start, > .file = __FILE__, .flags = BTD_DEBUG_FLAG_DEFAULT, \ > }; \ > if (__btd_debug_desc.flags & BTD_DEBUG_FLAG_PRINT) \ > - btd_debug(idx, "%s:%s() " fmt, __FILE__, __func__ , ## arg); \ > + btd_debug(idx, fmt, ## arg); \ > } while (0) > > -#define DBG(fmt, arg...) DBG_IDX(0xffff, fmt, ## arg) > +#define DBG(fmt, arg...) \ > + DBG_IDX(0xffff, "%s:%s() " fmt, __FILE__, __func__, ## arg) > #define error(fmt, arg...) \ > btd_error(0xffff, "%s:%s() " fmt, __FILE__, __func__, ## arg) > #define warn(fmt, arg...) \ I am still failing to see why this is better. Regards Marcel