From patchwork Fri Aug 5 21:53:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Cromie X-Patchwork-Id: 12937786 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C6078C25B08 for ; Fri, 5 Aug 2022 21:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6eBHBKf03LKnIHhWzmu0GCKbnoSCp48XpAfuN9mN2BE=; b=QnS5+30BeRk8gA dHfulTUCrH0WO0CkIR59egw82OiRsOQ6K5/zN77CSrdIggjm41KwfSvrZNKbr8JNmbvLJuF7V52uH bEnK5JHKDsojStCmhX0E4MLm1TmopfRrIo7G+ywa6FM3HcQ4iLXfK89kQrwsGTXT8hnxbWQ+ZObWJ Ikl5G1UN0EO2aZ8igMt/3Zn1SJpFsbMtihmgH6AjD3/J2Rz3pLfxRz86XX9l1OItSowXq1f7iT3OO O32RybwaDlhsezBplRlSOKg0PFlqcW7w7abPZ1zm7+Jy3MSxQo7TRcHCwsmXij+8MOtvJMZd/G3Mj 00a0bM27BVJZLn0vEKzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oK5K6-000zxu-Ji; Fri, 05 Aug 2022 21:57:39 +0000 Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oK5H6-000yC5-H0 for linux-arm-kernel@lists.infradead.org; Fri, 05 Aug 2022 21:54:37 +0000 Received: by mail-il1-x132.google.com with SMTP id p10so1981684ile.5 for ; Fri, 05 Aug 2022 14:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=5COrt8+UBE4dlO0UmlrrMAl6VEmhHXEe2GHU1HbZD24=; b=L043JNA8z+12v91PFQd8hIfM8uLiFmV8nj9LHoJBfI1kLPvGkDEWdC8Wd4p2KZld9S 0zgoUdIOwejHnh294RaTF25kbIywgsTuWesIWEnfzflxvdXVQIAddSszCjlNNai4Gx1q aELRYlSetyNwLJ5JVno+H1ojMessgxxdhaeujBNZAqFX86C5Jlnp2Yar7EKLEJZAJXQe LmE5+fFjVKQ88KmWSEcy8Z5jBLBebC2GIYPGeOBqprLtN2V97uCEmS6KH7wQli+TWOG4 ReT8K1fFGIxKxlacyunZgm/oj5Aa5dKOX7xqDbqNIYwO60YKAUqFdODkz5xKVK64LxEo FUoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=5COrt8+UBE4dlO0UmlrrMAl6VEmhHXEe2GHU1HbZD24=; b=1JXEtJq1z97dVOVCJpShTp3XDIfWHe5m8VFFO96jHaBjyri4oFHuGKGvTWymTb4fEl 8xD0NoiBQkMRuclSr3kCccWzi7REdGNN6XJ1NOzxQMuMpWsHNd2eCggjh4kB8drzuS9W Lg9J5jrBQ4hl/3mZg6gNZBW+qS3e80IXKmdFAM3vC4sM6TZOIvutJ12vmldrvapJcP4Q tdwbDPjoDUa5D6r287dnw7F9ZEPbS5d8aqh8/NY74L5A03JipG/35IduWtq7bDgFYFzg 95tat+OgZpidolpkpcnSewGWalZVfx2WdRCeLewwKqfXL+Ot/aw1o6+fxJ6d9Uw2p88H 1l2Q== X-Gm-Message-State: ACgBeo3XvoqsiREGyfH0e01Hy/VFdwIWNB0GT87ZBtJmrHvFNng6d2iI ToguFI1Bx0Hw/3XzGRbPcI4= X-Google-Smtp-Source: AA6agR7Up2wCnebNs4iDSz5YId5lNZX4AQVQrMH/DVsNi85YXM9aZ5Sbsa3AlT3EPXU6THVv5XJyNA== X-Received: by 2002:a92:cc04:0:b0:2de:1abf:7414 with SMTP id s4-20020a92cc04000000b002de1abf7414mr3982054ilp.119.1659736470528; Fri, 05 Aug 2022 14:54:30 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id e12-20020a056602044c00b0067c09fd0b53sm1765532iov.21.2022.08.05.14.54.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 14:54:30 -0700 (PDT) From: Jim Cromie To: linux-kernel@vger.kernel.org, jbaron@akamai.com, gregkh@linuxfoundation.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org Cc: daniel.vetter@ffwll.ch, seanpaul@chromium.org, robdclark@gmail.com, Jim Cromie Subject: [PATCH v5 09/33] dyndbg: drop EXPORTed dynamic_debug_exec_queries Date: Fri, 5 Aug 2022 15:53:31 -0600 Message-Id: <20220805215355.3509287-10-jim.cromie@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220805215355.3509287-1-jim.cromie@gmail.com> References: <20220805215355.3509287-1-jim.cromie@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220805_145432_673602_381FB8D9 X-CRM114-Status: GOOD ( 12.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This exported fn is unused, and will not be needed. Lets dump it. The export was added to let drm control pr_debugs, as part of using them to avoid drm_debug_enabled overheads. But its better to just implement the drm.debug bitmap interface, then its available for everyone. Fixes: a2d375eda771 ("dyndbg: refine export, rename to dynamic_debug_exec_queries()") Fixes: 4c0d77828d4f ("dyndbg: export ddebug_exec_queries") Signed-off-by: Jim Cromie Acked-by: Jason Baron --- include/linux/dynamic_debug.h | 9 --------- lib/dynamic_debug.c | 29 ----------------------------- 2 files changed, 38 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index f30b01aa9fa4..8d9eec5f6d8b 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -55,9 +55,6 @@ struct _ddebug { #if defined(CONFIG_DYNAMIC_DEBUG_CORE) -/* exported for module authors to exercise >control */ -int dynamic_debug_exec_queries(const char *query, const char *modname); - int ddebug_add_module(struct _ddebug *tab, unsigned int n, const char *modname); extern int ddebug_remove_module(const char *mod_name); @@ -221,12 +218,6 @@ static inline int ddebug_dyndbg_module_param_cb(char *param, char *val, rowsize, groupsize, buf, len, ascii); \ } while (0) -static inline int dynamic_debug_exec_queries(const char *query, const char *modname) -{ - pr_warn("kernel not built with CONFIG_DYNAMIC_DEBUG_CORE\n"); - return 0; -} - #endif /* !CONFIG_DYNAMIC_DEBUG_CORE */ #endif diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 5a849716220a..e96dc216463b 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -558,35 +558,6 @@ static int ddebug_exec_queries(char *query, const char *modname) return nfound; } -/** - * dynamic_debug_exec_queries - select and change dynamic-debug prints - * @query: query-string described in admin-guide/dynamic-debug-howto - * @modname: string containing module name, usually &module.mod_name - * - * This uses the >/proc/dynamic_debug/control reader, allowing module - * authors to modify their dynamic-debug callsites. The modname is - * canonically struct module.mod_name, but can also be null or a - * module-wildcard, for example: "drm*". - */ -int dynamic_debug_exec_queries(const char *query, const char *modname) -{ - int rc; - char *qry; /* writable copy of query */ - - if (!query) { - pr_err("non-null query/command string expected\n"); - return -EINVAL; - } - qry = kstrndup(query, PAGE_SIZE, GFP_KERNEL); - if (!qry) - return -ENOMEM; - - rc = ddebug_exec_queries(qry, modname); - kfree(qry); - return rc; -} -EXPORT_SYMBOL_GPL(dynamic_debug_exec_queries); - #define PREFIX_SIZE 64 static int remaining(int wrote)