From patchwork Fri Jun 1 11:10:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10443025 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C7B61602BD for ; Fri, 1 Jun 2018 11:21:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9B2F28A54 for ; Fri, 1 Jun 2018 11:21:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE42728ACE; Fri, 1 Jun 2018 11:21:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4377628A54 for ; Fri, 1 Jun 2018 11:21:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=kaJ4e00lyQC27utkeDQzsRd0kvuHtENHF2dXozHYMXs=; b=ihqACz6m9WCO8eYDRMrZJdwH2U f/d3NUZVUTQcMa3TQolKXEWkHkAmzAPTEblNfno3+fmb7like9ZPBkGKzneJrKGjBuTQKCNerCMQ7 KgTPFTJApVUN0g0oPK2bHY2RjSt5We9iYpHmhiOhnkox5hR386TgDCOG+zwqfTSMrLDDNJkmv1gYi YfyUHoyTHhDNgXdntu2HzyK1tD5yPMzJ4J33T1ZZpHOwYwDvqGLBy2CmWT4PkbGyy10fB4LDpwlPu P0CiVinmsclbJtM2xzur1xylJ8AYLgRpGyX7YqlcLGx3O+U2SiIknlxyldrjCfvBY1OH+Y26hhV64 xQ7wJcWQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOi7X-0003jB-Jp; Fri, 01 Jun 2018 11:21:23 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOhxB-0006Ch-H2; Fri, 01 Jun 2018 11:11:36 +0000 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9EBB0208B3; Fri, 1 Jun 2018 11:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527851441; bh=5WlWTHxy4l6ItcCMvOO2sAaA3JmGK8TqnsQ4p8dTD4E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RpbpN6EGiLCsVNlAupcznvneffYBwubJhH7iRLUZjzFJ4ycWSUuJeHfvTcQo8Ga83 igB05eiHSZuhPP53a2+1aU0u2MrXj8b+HFFSsVH2LgOZFmPzqMAwSRPHX9gjdguDPh tc8dh9CIhEOCkOjJX5jPCNsn5Cjr4M6Pfz84PlTU= From: Greg Kroah-Hartman To: devel@driverdev.osuosl.org Subject: [PATCH 3/6] staging: vc04_services: move client dbg directory into static variable Date: Fri, 1 Jun 2018 13:10:01 +0200 Message-Id: <20180601111004.1670-3-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180601111004.1670-1-gregkh@linuxfoundation.org> References: <20180601111004.1670-1-gregkh@linuxfoundation.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180601_041041_624624_63AC05DE X-CRM114-Status: GOOD ( 13.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , Kees Cook , Arnd Bergmann , Greg Kroah-Hartman , Keerthi Reddy , linux-rpi-kernel@lists.infradead.org, Dan Carpenter , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This does not need to be part of a wrapper function, or in a structure, just properly reference it directly as a single variable. The whole variable will be going away soon anyway, this is just a step toward that direction. Suggested-by: Eric Anholt Cc: Stefan Wahren Cc: Kees Cook Cc: Dan Carpenter Cc: Arnd Bergmann Cc: Keerthi Reddy Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Greg Kroah-Hartman --- .../interface/vchiq_arm/vchiq_debugfs.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c index 8b46256a97fc..12ed560c95a7 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c @@ -53,17 +53,15 @@ /* Top-level debug info */ struct vchiq_debugfs_info { - /* one entry per client process */ - struct dentry *clients; - /* log categories */ struct dentry *log_categories; }; static struct vchiq_debugfs_info debugfs_info; -/* Global 'vchiq' debugfs entry used by all instances */ +/* Global 'vchiq' debugfs and clients entry used by all instances */ struct dentry *vchiq_dbg_dir; +struct dentry *vchiq_dbg_clients; /* Log category debugfs entries */ struct vchiq_debugfs_log_entry { @@ -81,8 +79,6 @@ static struct vchiq_debugfs_log_entry vchiq_debugfs_log_entries[] = { }; static int n_log_entries = ARRAY_SIZE(vchiq_debugfs_log_entries); -static struct dentry *vchiq_clients_top(void); - static int debugfs_log_show(struct seq_file *f, void *offset) { int *levp = f->private; @@ -262,12 +258,11 @@ void vchiq_debugfs_add_instance(VCHIQ_INSTANCE_T instance) { char pidstr[16]; struct dentry *top; - struct dentry *clients = vchiq_clients_top(); snprintf(pidstr, sizeof(pidstr), "%d", vchiq_instance_get_pid(instance)); - top = debugfs_create_dir(pidstr, clients); + top = debugfs_create_dir(pidstr, vchiq_dbg_clients); debugfs_create_file("use_count", 0444, top, instance, &debugfs_usecount_fops); @@ -286,7 +281,7 @@ void vchiq_debugfs_remove_instance(VCHIQ_INSTANCE_T instance) void vchiq_debugfs_init(void) { vchiq_dbg_dir = debugfs_create_dir("vchiq", NULL); - debugfs_info.clients = debugfs_create_dir("clients", vchiq_dbg_dir); + vchiq_dbg_clients = debugfs_create_dir("clients", vchiq_dbg_dir); vchiq_debugfs_create_log_entries(vchiq_dbg_dir); } @@ -297,11 +292,6 @@ void vchiq_debugfs_deinit(void) debugfs_remove_recursive(vchiq_dbg_dir); } -static struct dentry *vchiq_clients_top(void) -{ - return debugfs_info.clients; -} - #else /* CONFIG_DEBUG_FS */ void vchiq_debugfs_init(void)