Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1384604pxb; Sun, 22 Aug 2021 15:21:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/tS0nHknK2yszaVKY3pYQKHBLP0aewoE/ovtOu57O6cxbgMwa5u09ays5B4IT4TSpmx2C X-Received: by 2002:a5d:8a0e:: with SMTP id w14mr10766723iod.94.1629670909671; Sun, 22 Aug 2021 15:21:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629670909; cv=none; d=google.com; s=arc-20160816; b=N3r93GU6hkks6G/cM8joFYEHQk3nflSl/9zGTbxjJy/0shl19iQaAC8CTwqTVrGF/1 dmtQzS1atS/OoDq7OLgLl5g1TjrPutdm0MpPidcQNpJmkATInadG84YMBgV72jrHo9lO +UrUeZ3Zfk0xh/42I3hWFyBZvptrTOEWpxZnwYrtarScCwMULy7/dfcMgnewiOIrQzNC xytAXeKJV9PtQZU8AS99QKna/SsVk28gHvzZRxROZQVBbWe5Gm6pWYRt8S9Tm1dpXi+P FCiReNGh5h7c1LRpAkrnusBzxsjokGNXaJeBvNzLSm2cFAudpWzCG52cFpOJV4ZDRH7d BtbQ== 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:cc:to:from :dkim-signature; bh=V5vqhjeJwhM7E6Pt089X9QON5NrjkvFV308x6a56U3o=; b=iAua94KfBZmMHGZVipwgC0kI9WU2R+q0F8lxISQZsN6eYwNnu9rDC2wTF16dlZXBxK EuVJz3hz0EbckJw8WllQkHl/nm3puF/Khdyr+/WZD6l3i94zcMdJ0LGorbqlBygnDDI+ ng31IDhMTywtJlYTBwq7MgnnT8onb+rduLNBnkxCqvVu5Q+teKD3wz6CcCgl5Cp2fv4i QaTYIIcYLfMQZDeCGFm/GKYUKo3nGcfGAboefljuyRA/2rNA3MrOB9ZYS27St7gyzuN4 RTyJwDqhkHxj61jIYK4YwdG/0PahReeTGuy55epQQNlqnhev6gytrH2dFg4aGkwiRJsv 0iDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TQ7xu2Ip; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si13239874ili.30.2021.08.22.15.21.38; Sun, 22 Aug 2021 15:21:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TQ7xu2Ip; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S234067AbhHVWVf (ORCPT + 99 others); Sun, 22 Aug 2021 18:21:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229700AbhHVWVb (ORCPT ); Sun, 22 Aug 2021 18:21:31 -0400 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78F08C061575 for ; Sun, 22 Aug 2021 15:20:50 -0700 (PDT) Received: by mail-ot1-x32e.google.com with SMTP id x9-20020a056830278900b0051b8be1192fso10541153otu.7 for ; Sun, 22 Aug 2021 15:20:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V5vqhjeJwhM7E6Pt089X9QON5NrjkvFV308x6a56U3o=; b=TQ7xu2IpCflARc8FKk474nyH5tm12zi4tObsZCwfPlOFFS/LnC6EZsd4Q7FlNVTOLf zCj+kX2dOXM8dNEhSu9VMaxvyigkwfLB7U6TquFc/fMx8AKjHg5MsrugWDPWsvS+sIHg 8+Iu3rRzOUAaybZi3h95K+QtyfNAUNZ3zvHefmjva3DaJuhnSQEWm9lKs+dV/72tmPf/ nOaa0nUCC0nbDuFE9W5aFz2R/RAWfnHzl52cV46KL1yG6uCd6MtBiIudESWB0TPTLid+ 4tLlcJMKwSRciEg1Odw8RHrAkCfM7ZUXOuuDEUNwOTP4HB/Md/aqSIAnJ06xnFlODgKn J55A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=V5vqhjeJwhM7E6Pt089X9QON5NrjkvFV308x6a56U3o=; b=ONlVGG70adO/aLvJUmQKfFqF/9f9YsG8zx7h6HS/3EzQc6y2Q3HuDU12goUMrcCvtE MsAKJZJw5YvPbtDAZOOkLQBiyG36XJnH3cp+EnZTVQwwXzkoQrema3peWKssW6FDfkok SW8Hu+1q9s1uG+G07RHAPLR/jLLWzhG3azE0EPYYYZWAYbSA2BrufcJGolu5wLS+uufm JMxa9+ysZCB2GC1I5rkARekR9xiMrnh4CF4WyjAU5iwAsi7A1vnhxaGhY/HqOZemuG6h nT3crUdWi7FIhul3E/W0dvpEhCDiAtO/xaLG0UhkCTuFNtqff44ZU/wwMefeP11FQ2Ar 4N4Q== X-Gm-Message-State: AOAM532UQ3Rn58rnk6x+s3MmRbvNJFxobdbuKvGQraTRLnfzurpJ6fxu p1AkEDvasRodlThmGciiE9M= X-Received: by 2002:aca:c6ce:: with SMTP id w197mr9883707oif.6.1629670849838; Sun, 22 Aug 2021 15:20:49 -0700 (PDT) Received: from frodo.. (c-24-9-77-57.hsd1.co.comcast.net. [24.9.77.57]) by smtp.googlemail.com with ESMTPSA id x198sm2964122ooa.43.2021.08.22.15.20.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Aug 2021 15:20:49 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, gregkh@linuxfoundation.org, seanpaul@chromium.org, jeyu@kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: Jim Cromie Subject: [PATCH v6 03/11] i915/gvt: remove spaces in pr_debug "gvt: core:" etc prefixes Date: Sun, 22 Aug 2021 16:20:01 -0600 Message-Id: <20210822222009.2035788-4-jim.cromie@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210822222009.2035788-1-jim.cromie@gmail.com> References: <20210822222009.2035788-1-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Taking embedded spaces out of existing prefixes makes them better class-prefixes; simplifying the nested quoting needed otherwise: $> echo "format '^gvt: core:' +p" >control Dropping the internal spaces means any trailing space in a query will more clearly terminate the prefix being searched for. Consider a generic drm-debug example: # turn off ATOMIC reports echo format "^drm:atomic: " -p > control # turn off all ATOMIC:* reports, including any sub-categories echo format "^drm:atomic:" -p > control # turn on ATOMIC:FAIL: reports echo format "^drm:atomic:fail: " +p > control Removing embedded spaces in the class-prefixes simplifies the corresponding match-prefix. This means that "quoted" match-prefixes are only needed when the trailing space is desired, in order to exclude explicitly sub-categorized pr-debugs; in this example, "drm:atomic:fail:". RFC: maybe the prefix catenation should paste in the " " class-prefix terminator explicitly. A pr_debug_() flavor could exclude the " ", allowing ad-hoc sub-categorization by appending for example, "fail:" to "drm:atomic:". Signed-off-by: Jim Cromie --- drivers/gpu/drm/i915/gvt/debug.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/debug.h b/drivers/gpu/drm/i915/gvt/debug.h index c6027125c1ec..b4021f41c546 100644 --- a/drivers/gpu/drm/i915/gvt/debug.h +++ b/drivers/gpu/drm/i915/gvt/debug.h @@ -36,30 +36,30 @@ do { \ } while (0) #define gvt_dbg_core(fmt, args...) \ - pr_debug("gvt: core: "fmt, ##args) + pr_debug("gvt:core: "fmt, ##args) #define gvt_dbg_irq(fmt, args...) \ - pr_debug("gvt: irq: "fmt, ##args) + pr_debug("gvt:irq: "fmt, ##args) #define gvt_dbg_mm(fmt, args...) \ - pr_debug("gvt: mm: "fmt, ##args) + pr_debug("gvt:mm: "fmt, ##args) #define gvt_dbg_mmio(fmt, args...) \ - pr_debug("gvt: mmio: "fmt, ##args) + pr_debug("gvt:mmio: "fmt, ##args) #define gvt_dbg_dpy(fmt, args...) \ - pr_debug("gvt: dpy: "fmt, ##args) + pr_debug("gvt:dpy: "fmt, ##args) #define gvt_dbg_el(fmt, args...) \ - pr_debug("gvt: el: "fmt, ##args) + pr_debug("gvt:el: "fmt, ##args) #define gvt_dbg_sched(fmt, args...) \ - pr_debug("gvt: sched: "fmt, ##args) + pr_debug("gvt:sched: "fmt, ##args) #define gvt_dbg_render(fmt, args...) \ - pr_debug("gvt: render: "fmt, ##args) + pr_debug("gvt:render: "fmt, ##args) #define gvt_dbg_cmd(fmt, args...) \ - pr_debug("gvt: cmd: "fmt, ##args) + pr_debug("gvt:cmd: "fmt, ##args) #endif -- 2.31.1