Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp464346pxb; Wed, 23 Mar 2022 23:53:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2iiYZpTjvQheF2DdIoqpNcVOjlSbYoys4rVieb+pqw4I0LgtWZCbyg6qyYs/XOKgFBQqO X-Received: by 2002:aa7:cb4b:0:b0:419:ddd:c9ad with SMTP id w11-20020aa7cb4b000000b004190dddc9admr4838156edt.377.1648104834016; Wed, 23 Mar 2022 23:53:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648104834; cv=none; d=google.com; s=arc-20160816; b=QYLqaDWjxHMcLYdn/y3ROu2f+48IxTp/nB+tGtWvM+QuJqlnhdzn3NA+vhjfTZWCgc JLE6BZjRGetXJLirzvuTkWzyKb4ugeHNdMmI23dPsvOoOXF8FhE8CuHA7NR+jarM5a6z onIO0Ja1FYKs9Lyl2kCD2oG53v7PKuOQqU6VpswsZMi2UJ5OjhRu1LhAmSE4TdYbKwsl +Gb+2MEJb3ZWJJuUzxwMfXTo0hlrUmwiRu85JkqO88T8Wjwdvv1k7crLAXio33OaLFG0 NblENYU1O2aPYL23gsd5jCL/NqeabisbfdK616UqVf5c5zlUUTlHriyAn8iZA1mDMs0R MWVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=FHmrDzWf34S+VIdONSZXDksFW5be3bZdPT1V47AMKuk=; b=B42w99qRDCoWD5gowwqlslG+pz9bxV7or0wpOxI300s0Rz88KMMx93WSjyvkO28Z50 MwUGgbljpf0YzrQdDgBtogboScNPd4GxXcuedbALGLUzX2yfGC/4HbX+JYJ9V9VPlOAm 4VvwKOPErdtdyRWnonSU47r4NCT7FMsI0PLO1eg67+a1qaa7YfmbqyWhcRLsqpMVkcLy ZVJzexUWU1bGP4XAZ2GOGngu/gREWThPqwMqGcf6ONmvx5uckj89RZXIRAsotArR5ULo g5Upc88woUobGT8y8Bn5b36cgJ3dImDCOwrYNQSoTlVplLaQlYcS/Qulz4AZSOqIEbm/ qGuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=U0+ijJyu; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y27-20020a170906519b00b006dfad257082si15015436ejk.489.2022.03.23.23.53.13; Wed, 23 Mar 2022 23:53:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=U0+ijJyu; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344861AbiCWWlh (ORCPT + 99 others); Wed, 23 Mar 2022 18:41:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234878AbiCWWlg (ORCPT ); Wed, 23 Mar 2022 18:41:36 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24A3D3631A for ; Wed, 23 Mar 2022 15:40:06 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id o6-20020a17090a9f8600b001c6562049d9so3286595pjp.3 for ; Wed, 23 Mar 2022 15:40:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=FHmrDzWf34S+VIdONSZXDksFW5be3bZdPT1V47AMKuk=; b=U0+ijJyuiwN/VsQM0kUvQ1kUQa4l+CrFTIKKdQezUq/d/snnt7xsZnPrl4UnKu5oCH uBJ3Xj2oO24jMbIHceYxtFUNeuhW0pkkKP31bkdw/qt+9wjUyZ6YL55+SsnV+ti0xy3X wFaTWssaYUjCLHQP83/f7DgetQCqc/QkG6gqZuOYhQLemfay3g5gog0hrEgO/p/kvILE gWoDzm+lsPlJ/sNNDETWp67pK0NqkUcMtI9Kx+SDC6WHI0PBkk4JI910nhDSoT0p0Psm gh3tBBCKA1cK4Sj4GZibV/uLLtEOEdUc0xc7XPIphUP611uFQrelbFd1bwRrrOx6jDZm q2sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FHmrDzWf34S+VIdONSZXDksFW5be3bZdPT1V47AMKuk=; b=ohG1DAV61RmY9JOIMI+UdkbSx4cAfhmAUmyL3LmbF6K65vY6cSk53rIQICCuJrnOJ4 JD5jAxn5KrAyO0aD7u7/11x65gC6BfHJBES4Lbxy/E3iO4sWRnHp5xvfiWCPfL6GGjFn 4pxaB05gtCmliKyE19Xc1YpYE5/UvrAfKpIVQ7z+uA6ky6fXRjJI7AKq9kpZM4Zo2xcI xC/14mha6Tv/zIvjQ2PWg7IjpOdCnNhMmvdCE/t90dIA34gKJflvDtn2W2V+YIorXTnf G19LOyaaGt/V5QPD5M6YWOHmMNG1OwHU40TAplJ/WnXVV7lLwoT5dy0G9q3AqD1GzVzh 0ohA== X-Gm-Message-State: AOAM5333AgP8flu+kxTEYKGhfyDf/xxgKz0o4b+fgidJeLTzeZbu0NqM obJYLrm80f+GZwV34lqXp2E35anoKLg= X-Received: by 2002:a17:90b:33d2:b0:1c6:f3c1:49c3 with SMTP id lk18-20020a17090b33d200b001c6f3c149c3mr2309990pjb.82.1648075205426; Wed, 23 Mar 2022 15:40:05 -0700 (PDT) Received: from lvondent-mobl4.intel.com (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id z14-20020aa7888e000000b004f79f59827asm825109pfe.139.2022.03.23.15.40.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 15:40:05 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v4 1/9] log: Don't log __FILE__ and __func__ with DBG_IDX Date: Wed, 23 Mar 2022 15:39:55 -0700 Message-Id: <20220323224003.3736525-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220323224003.3736525-1-luiz.dentz@gmail.com> References: <20220323224003.3736525-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Luiz Augusto von Dentz 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 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...) \ -- 2.35.1