Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3406959pxb; Fri, 5 Nov 2021 15:19:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGmAtZOr0jI9OXfyH6Db9RYexJNkV7PLo1O9m39FtmbDO3XdVhMW4sHHOX2+FP07UMSPa4 X-Received: by 2002:a92:de42:: with SMTP id e2mr40927630ilr.55.1636150777676; Fri, 05 Nov 2021 15:19:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636150777; cv=none; d=google.com; s=arc-20160816; b=GR+dT0eyZISyYtzie+Ma0xy61Fm2PuNhbfjdrRY4MEamwrAb+5eX2cmWqiM+2RqLdx rpVJMy2znQh7k8lGLp/OK9yUneLJabhMbRC8cDPMPH/RkIJhmLBtfkeBPvriTPQwcPio VbFBVwMkyv1LP0QIwnYJxtag+xZjgDVc9aSr1+MTBFZW7pGzmdpf/YgtRuG9thaTcFNk VIXRJJ7fCS5+b+7StWEut5bZQuqkaw76NMi4DP0syjpqfoTo7OM5wt2x3VefUkA9p8uu liKXAi2V4m/GPD3KBY8GpBut0r25Ml0ABFGrB3qpNNLIAafk3oyaXDMKBWzdeOgtSK9f IC4w== 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=RyfWj4lDBm5JLTztNtdXlP2pvw82NplVvLHkINaddHI=; b=KOVkzjLr/jyQrJvOptqDWc2tD5iQAQBQn6lQu0h/9juXJIzJ23FTtUhgB1mODEjGOQ aUWB7xLMRXdS4Fu8H/mQnejNfPxOEGwfORQGJ169HL0nYktvGtIfQHYJiX0FD1Ke5NUy RyXX0s30HF6q286Dz4RqkqSJAKhjkIdk7QJ7Dv9vVKHtOfd2L2X3Hk0CHechLb3WAxH+ MwmK4/YQmoGsOA5VK+xRx7Nv+pLxYFDO66bpodSBffOgHCl6VI+cHYiDBIR1D/lU8nYp xMkHVdG6TXPjnE+CTllA1DZPkDgRVlCwkQvn1Q6wU7sEBQ0flBylL1q4iezVNtXNItjv DIoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qVKTmYne; 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 y9si10123675ilv.58.2021.11.05.15.19.22; Fri, 05 Nov 2021 15:19:37 -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=20210112 header.b=qVKTmYne; 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 S233416AbhKET36 (ORCPT + 99 others); Fri, 5 Nov 2021 15:29:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233374AbhKET3v (ORCPT ); Fri, 5 Nov 2021 15:29:51 -0400 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBF76C061205 for ; Fri, 5 Nov 2021 12:27:11 -0700 (PDT) Received: by mail-io1-xd2c.google.com with SMTP id d70so10956060iof.7 for ; Fri, 05 Nov 2021 12:27:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RyfWj4lDBm5JLTztNtdXlP2pvw82NplVvLHkINaddHI=; b=qVKTmYneIDNEr7QHbl1uC6bSNBSf8Y05Zcal5qyh/Ge6l2rhQUhbuYh+2D2KYkKQ9G J4rFBTBNnyGKvVx5DJSfolblJfPOyh6MuDPssEL8LsJcHDvEZAQFFG3GfEiv4JuMQIGO N11V26vDqADX5L/RiolUjg1mhFkqc6mSXpuNts8eUt+JmZBOsyf+ifOZDYZ1JDhsALjG AmhAH3TqBi7pkekDpm6WmDvgNkGlsI3Kch9bjzyIGMN+l822ChvRmhJ3iwP9tmP5Svnx LUtBbi7JjRk4d4Mbfsq+a0d/ZU78j9Pw4zsajEcn1iz/djvfSF4sRfHCR7l4XUgVa3pn tqZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RyfWj4lDBm5JLTztNtdXlP2pvw82NplVvLHkINaddHI=; b=SBmiA5nMucJJqcNIkhjh4R36Mg6xrFMfsPy93Q5zU3uqKxjqn9fTxUIQalw9UMQFG4 ZEgNxlUnL2WDY12UXNGU4icQ9MAxsxF7n6ovLkCM99G6QTvlDRmQZxt+TSkfzHLVgmiL zc1hdI9M+wIW6NjoFv1juyNe24kOpfjuKAgWSyCISVndwMPfGe5CKztpZcw2KqBjkne3 EzSNcV1zoQr9qBjFemFkPfXuNHp1l3A39atY55v66wRVaSuLKB3xAhW92gmnqdGtK1bK OOPVQjF2JYDrnTLCMMMTRwt/y4/rQt666jPtt/RZY8uwIkFuI/dWJ0gMl9nBZ1ICq+rJ xY6g== X-Gm-Message-State: AOAM530XWYN0cFrH9L8/xVB5iw4ZpAXxM+h2T9/mR0CKBtyswruSzJvL 1BbK06HVtak52GwnXHPdEKg= X-Received: by 2002:a02:bb85:: with SMTP id g5mr10708401jan.130.1636140431271; Fri, 05 Nov 2021 12:27:11 -0700 (PDT) Received: from samwise.. (c-24-9-77-57.hsd1.co.comcast.net. [24.9.77.57]) by smtp.googlemail.com with ESMTPSA id l18sm4338617iob.17.2021.11.05.12.27.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 12:27:10 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, robdclark@gmail.com, sean@poorly.run, daniel.vetter@ffwll.ch, seanpaul@chromium.org, lyude@redhat.com, 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 v10 04/10] i915/gvt: trim spaces from pr_debug "gvt: core:" prefixes Date: Fri, 5 Nov 2021 13:26:31 -0600 Message-Id: <20211105192637.2370737-5-jim.cromie@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211105192637.2370737-1-jim.cromie@gmail.com> References: <20211105192637.2370737-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 more easily searchable; simplifying the extra 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 format prefixes simplifies the corresponding match string. 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:". 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..bbecc279e077 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