From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19FD9C433E0 for ; Tue, 16 Feb 2021 14:25:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C5F0A64E04 for ; Tue, 16 Feb 2021 14:25:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230142AbhBPOYu (ORCPT ); Tue, 16 Feb 2021 09:24:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:33194 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229787AbhBPOYq (ORCPT ); Tue, 16 Feb 2021 09:24:46 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 319DD64E00; Tue, 16 Feb 2021 14:24:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613485444; bh=KhFrGCYbZDRKAR2axO+NqWgtltVFh8zY277dTTLlf08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fIW1JfW7rNGbWjZt7mfMJ+KYDXuvOq/ONObhIsdAb35zZ+N9ITLc+SH9Or8hf1n1q dQ2YTJ9Cym8jrOZ/nCOD/OCzAWX0M4alZzHktTc+/UwMEWYkF8RoRHAuWEZebnCn/t k2p3nEKuMAhn4e8bJCWu0Gp5JMpMSre/+h7wuu3M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: [PATCH 2/2] driver core: dd: remove deferred_devices variable Date: Tue, 16 Feb 2021 15:24:00 +0100 Message-Id: <20210216142400.3759099-2-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210216142400.3759099-1-gregkh@linuxfoundation.org> References: <20210216142400.3759099-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No need to save the debugfs dentry for the "devices_deferred" debugfs file (gotta love the juxtaposition), if we need to remove it we can look it up from debugfs itself. Cc: "Rafael J. Wysocki" Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/base/dd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 9179825ff646..66c31cda5462 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -55,7 +55,6 @@ static DEFINE_MUTEX(deferred_probe_mutex); static LIST_HEAD(deferred_probe_pending_list); static LIST_HEAD(deferred_probe_active_list); static atomic_t deferred_trigger_count = ATOMIC_INIT(0); -static struct dentry *deferred_devices; static bool initcalls_done; /* Save the async probe drivers' name from kernel cmdline */ @@ -310,8 +309,8 @@ static DECLARE_DELAYED_WORK(deferred_probe_timeout_work, deferred_probe_timeout_ */ static int deferred_probe_initcall(void) { - deferred_devices = debugfs_create_file("devices_deferred", 0444, NULL, - NULL, &deferred_devs_fops); + debugfs_create_file("devices_deferred", 0444, NULL, NULL, + &deferred_devs_fops); driver_deferred_probe_enable = true; driver_deferred_probe_trigger(); @@ -336,7 +335,7 @@ late_initcall(deferred_probe_initcall); static void __exit deferred_probe_exit(void) { - debugfs_remove_recursive(deferred_devices); + debugfs_remove_recursive(debugfs_lookup("devices_deferred", NULL)); } __exitcall(deferred_probe_exit); -- 2.30.1