From patchwork Sat Oct 22 07:24:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7486 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1104726wrr; Sat, 22 Oct 2022 01:33:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5f78s1vE5IJHGx57D3KGxS8lDJEMWz+SLIxf3Ds/dy4U1FcUBrRt5U9kmA5Gm5qbZlIrMy X-Received: by 2002:a17:90a:c90c:b0:20a:7179:b14f with SMTP id v12-20020a17090ac90c00b0020a7179b14fmr26555381pjt.58.1666427593805; Sat, 22 Oct 2022 01:33:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666427593; cv=none; d=google.com; s=arc-20160816; b=IQ+Oc9f/uxMxFf0bH1b5l2DWMtPkvgaNQHKMAUahQWwLEHc6XzXfhdrW1OjIwyrJVx YYlu3joarajp70xinWo4XWqGDvKy/mWxLuSskt6jjQijoetAamUSnzRL2L+cT6678MYz BHoByaf+Ad8w3Q8HYHzrgAn/EhuWJPsxIk8VX95GQtWNkjdzL4INu7nYt4e8XrsKrPL7 lpzE0jI4CdzBO28aueGtu0kp0valqWatysn/3X29SSNL1G//Q/64u8u6RDkNWKxAXWv9 nHWQ/8TZyg3KHTe4XTXmXnIB/GYqBLeLzd++Qnn4CjX6sKrRV4tG70wbzn0G8F1KXACZ KU2A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RtCrQnx+KRSJl80kUbtRA+Q1YCgUyTG8MdhYOwkNRpw=; b=mHq56xHcO4yJ0kmxcqdvanyTxjDWzOLE9SIX/wZ8lBLytVLOewEpQ+MNtqLmUNPDBJ EwcTl4EbKZ17nkjXCWfKc07toNC0Hlb+UwkkYZeiVDF2nRUVZUpELDV99gt87MiiyKnr q7oI1WI5YBzxKPi5ZvDcbM45xwNsbDgAu8oj1Cry3PCJ1sbRVwrVg9AZq1ZI+5ilmFA6 0tnWuE4GHWA2R8WJysHqwF/e+5vVSabSUgjbCXzn/iZD4WxZ/8Ow75TeJbnxKkbLh+Rp 96MrmJimdf+lw34Y5xMbo7s6xRhO8r1qi22CDjdqMm96PeKDs1M/EY4/4hQ0G3jAgh1O NCsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qBe62dGd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mw16-20020a17090b4d1000b0021071bf8d26si10716855pjb.29.2022.10.22.01.33.01; Sat, 22 Oct 2022 01:33:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=qBe62dGd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233366AbiJVIQo (ORCPT + 99 others); Sat, 22 Oct 2022 04:16:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233564AbiJVIOR (ORCPT ); Sat, 22 Oct 2022 04:14:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8DDF2591D1; Sat, 22 Oct 2022 00:55:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9169AB82DF0; Sat, 22 Oct 2022 07:53:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F416BC433D7; Sat, 22 Oct 2022 07:53:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425192; bh=rRdn83gaQeaNkPFVcGa5S1CTqcpCTQhYS+1Lvk4tkVM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qBe62dGd5zHDpTfERNQnAWN+Y7ndLpwpg54pqY6nI4mL88VqdRBKaMgQN/PbCQzI5 TsJoLIgU8cHk4Y8K4ahlZ2QeWcNH6Rsbt4oIPtwcpp1QgLqUeHNnITQY5tG2mwYhIZ ziqW1EU/X1K9gRSC6g8c/P8Lt1umQ0TlEybs2RMg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jason Baron , Daniel Vetter , Jim Cromie , Sasha Levin Subject: [PATCH 5.19 420/717] dyndbg: drop EXPORTed dynamic_debug_exec_queries Date: Sat, 22 Oct 2022 09:24:59 +0200 Message-Id: <20221022072516.923693262@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747375980583302632?= X-GMAIL-MSGID: =?utf-8?q?1747375980583302632?= From: Jim Cromie [ Upstream commit e26ef3af964acfea311403126acee8c56c89e26b ] 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") Acked-by: Jason Baron Acked-by: Daniel Vetter Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20220904214134.408619-10-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- 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 4d168efcf779..c9b3d9e5d470 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -557,35 +557,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)