Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp959891pxb; Fri, 13 Aug 2021 10:05:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyL2mjHvTYagLlVp16TugiiKKwOXpG7nSjgNGXi6BhtmgdFmxkrtgvnw6044Der1PJV1/a5 X-Received: by 2002:a05:6e02:190e:: with SMTP id w14mr2387456ilu.61.1628874320583; Fri, 13 Aug 2021 10:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628874320; cv=none; d=google.com; s=arc-20160816; b=kuJrQeNQVDdx3x9QS358TNeFdQZkyzVQU/W3Vfgg2Q00AwlQq+N/tFH5CREbIssCtr mNdLM0IEQGrWisC9Bji4Lndzh+X+rwIEA1cABVIOpw/+U2OXNSMwom8HlZGEbtvlx6nm GZPq5Rlt2nxO7051b5Sl8SYCh0Wpcw3NO87O+KQJrr6LplmgDQX871Xhy6x5a9fOjYQ+ 4zBb27XpQxDaNAtzEynJCDp5dFrWmV2m9mu1neFTqkUM29/deY5me1wG2D0I+zSAU7qc oeBsbSgiXFptV2ZB4NwrNj/zYaojAeCkAsBDjM7BZVgsNuIB7/FbdUjEc85ppQx1V2w8 Udaw== 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=V5vqhjeJwhM7E6Pt089X9QON5NrjkvFV308x6a56U3o=; b=lR9z3KGsKIMZsyymzzpTI+EkCQPwLV3g6k1na2UGUphs4QXhHQkVZkQnCOIkBqNL9y uFfCof+M4dVgBhvkq0dhxZRmA+IsfUDGpH1CUnbol5AmtNkqQaSQVvW18hTG6NenWlWb EXDPMCowsQRuLhiiHA1tA3ISFCH1quQSTAFvbziEDygbGHTnvCl7x5j2HunZkRD3nzhX /C6t9GU4dQEPCUkGCjpwPDnY/HJ9lGHb+QZ+q78nL++sOkIkSqN9oZsRQKsSmmXanS5X rh4lDpx63dr+0GmVcw/CV2H8S8TsV402IxcymgDEa39Xjian1u0or+lyjLLZ9PYdk0C9 4uHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LZ3AdMIX; 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 n9si1998264jam.54.2021.08.13.10.05.09; Fri, 13 Aug 2021 10:05:20 -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=LZ3AdMIX; 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 S243381AbhHMPZB (ORCPT + 99 others); Fri, 13 Aug 2021 11:25:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243586AbhHMPYa (ORCPT ); Fri, 13 Aug 2021 11:24:30 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A63F8C061149 for ; Fri, 13 Aug 2021 08:19:28 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id b7so4686036iob.4 for ; Fri, 13 Aug 2021 08:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=V5vqhjeJwhM7E6Pt089X9QON5NrjkvFV308x6a56U3o=; b=LZ3AdMIXcu2n0pYTkkI/+pU36yI/lhsT0TyHbsxCyXCSaMdoqclAGgPt2iibcVEGrp D+J/gZiijusoQpBycq24BNPOLXXHU3YjbQ3HyJbVms4DuEXsFiGZrmnbaNmNHiqiy67X FJT7Y4WNF+GW9DP7eMxc0QxuJxbI5AFcSGCd3umuI9KAInUBkK/oV9rAuZt6MetbIWPi 6ocQw22suiG8DUF3MNRgACSisMxUbEWS54XZCY5ZWzutC/8ZHTtd9xu/DAfttGqM9mGz EU3I6KV8S9s43spU5E5XG9Ft2UM9MR0OAQOxAUdXaeW8f4nMTwz/bbd4IubAbe5q+us7 Rvew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=V5vqhjeJwhM7E6Pt089X9QON5NrjkvFV308x6a56U3o=; b=TzmniVp72o7jVmSkNUKG/necZKC5k9hEJFm3eDPHCuJnMaL0wPfYHuxQNCpg6TuCsq zkvyfcwqYbV95K+G8spHl/5BeF6vJeZmAPY5KjhFN3dIuyESUDW9ju19GS+zCMSnLtgD aExTwAEjWh8QOaAWJlFSbRz1j5xu5vUaktynzlV8C6wnkQVDk3ls8ILSx7tfcpPFdxgR jb5r00WdOEawpSL6prnRp37no8BsLd/wI+jzPjYsWAqRhHz8SzIkM+s7gGCAKBV+xj7G tEcOpfZw8vvLlyMp5D4Hv1X/h+vOaVlcFsC/MXZDUiW+/VObJrVL6iNSLP3aDIOnWPwj IjAA== X-Gm-Message-State: AOAM533SOpx3u3ZVG7d9pTZHF5D5WJt0SOQHKa8Bt/RM38iJP236ygfk 5q7N/IByCn+Bego+TGbEBC4= X-Received: by 2002:a05:6638:618:: with SMTP id g24mr2839556jar.94.1628867967978; Fri, 13 Aug 2021 08:19:27 -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 d4sm921145ilo.29.2021.08.13.08.19.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Aug 2021 08:19:27 -0700 (PDT) From: Jim Cromie To: gregkh@linuxfoundation.org, seanpaul@chromium.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , Harry Wentland , Leo Li , Zhenyu Wang , Zhi Wang , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Jason Baron , Hawking Zhang , Tao Zhou , Huang Rui , Chengming Gui , Likun Gao , Dennis Li , Jim Cromie , John Clements , Kevin Wang , Ashley Thomas , Qingqing Zhuo , Wyatt Wood , Aurabindo Pillai , Johan Hovold , Jessica Yu , Miguel Ojeda , Joe Perches , Nick Desaulniers , Andrew Morton , Masahiro Yamada , Peter Zijlstra , Andy Shevchenko , "Paul E. McKenney" , Tetsuo Handa , Thomas Gleixner , Vitor Massaru Iha , Sedat Dilek , Julian Braha , Marco Elver , Jarkko Sakkinen , Andrey Konovalov , Alexander Potapenko , Johannes Berg , Richard Fitzgerald , Arvind Sankar , Patricia Alfonso , Palmer Dabbelt , Arnd Bergmann , Jiri Olsa , 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 Subject: [PATCH v5 4/9] i915/gvt: remove spaces in pr_debug "gvt: core:" etc prefixes Date: Fri, 13 Aug 2021 09:17:12 -0600 Message-Id: <20210813151734.1236324-5-jim.cromie@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210813151734.1236324-1-jim.cromie@gmail.com> References: <20210813151734.1236324-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