From patchwork Fri Jul 18 15:37:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dirk.brandewie@gmail.com X-Patchwork-Id: 4586261 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0BDF0C0514 for ; Fri, 18 Jul 2014 15:37:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 435C5201BA for ; Fri, 18 Jul 2014 15:37:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EBE7020176 for ; Fri, 18 Jul 2014 15:37:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422797AbaGRPhn (ORCPT ); Fri, 18 Jul 2014 11:37:43 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:61184 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422654AbaGRPhk (ORCPT ); Fri, 18 Jul 2014 11:37:40 -0400 Received: by mail-pa0-f50.google.com with SMTP id et14so5691122pad.9 for ; Fri, 18 Jul 2014 08:37:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=R0klhmXvHJCF+OR6wV+boaBpex/8H7qLkWsG2POXjm4=; b=afFLM8zWSGwu0/WdO8/q9eeu5JhMYUt8kE23SL6ZRQHmcLnyd8TajAPwDBlmXZoiEZ HxO9HPEisAbddb2d81jVzrlqq0ecIWb0YgWxLtDAEM3tLbIlY4eacSXrvMD0P7EJD7/Z pu+oWYho6Ejbt+4cDhafUlDb8mJO9NP23oz4fWSxwc3Hf0fVjt4zbgdOqAGEI95G0qzX Rdlp1j1vIG+zvSoD8yb5Jog0XCDMLJcs2LFW3YhIQn5VxPEHg4r51ljcQapU25DSmQy4 7K//qM5DzOs6bgnAFqbHfL3+QJU/k9bLcZCnIzMT/Hi+b40Bi2Q2DPADsLpUQ6Z/5CX8 feUg== X-Received: by 10.70.47.106 with SMTP id c10mr6136217pdn.7.1405697860013; Fri, 18 Jul 2014 08:37:40 -0700 (PDT) Received: from echolake.localdomain (static-50-43-41-81.bvtn.or.frontiernet.net. [50.43.41.81]) by mx.google.com with ESMTPSA id be7sm7894439pdb.37.2014.07.18.08.37.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jul 2014 08:37:38 -0700 (PDT) From: dirk.brandewie@gmail.com X-Google-Original-From: dirk.j.brandewie@intel.com To: linux-pm@vger.kernel.org Cc: rjw@rjwysocki.net, Stratos Karafotis , Dirk Brandewie Subject: [PATCH 01/11] cpufreq: intel_pstate: Make intel_pstate_kobject and debugfs_parent locals Date: Fri, 18 Jul 2014 08:37:17 -0700 Message-Id: <1405697848-13546-2-git-send-email-dirk.j.brandewie@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1405697848-13546-1-git-send-email-dirk.j.brandewie@intel.com> References: <1405697848-13546-1-git-send-email-dirk.j.brandewie@intel.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Stratos Karafotis Since we never remove sysfs entry and debugfs files, we can make the intel_pstate_kobject and debugfs_parent locals. Also, annotate with __init intel_pstate_sysfs_expose_params() and intel_pstate_debug_expose_params() in order to be freed after bootstrap. Signed-off-by: Stratos Karafotis Signed-off-by: Dirk Brandewie --- drivers/cpufreq/intel_pstate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 86631cb..601c428 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -253,9 +253,9 @@ static struct pid_param pid_files[] = { {NULL, NULL} }; -static struct dentry *debugfs_parent; -static void intel_pstate_debug_expose_params(void) +static void __init intel_pstate_debug_expose_params(void) { + struct dentry *debugfs_parent; int i = 0; debugfs_parent = debugfs_create_dir("pstate_snb", NULL); @@ -342,10 +342,10 @@ static struct attribute *intel_pstate_attributes[] = { static struct attribute_group intel_pstate_attr_group = { .attrs = intel_pstate_attributes, }; -static struct kobject *intel_pstate_kobject; -static void intel_pstate_sysfs_expose_params(void) +static void __init intel_pstate_sysfs_expose_params(void) { + struct kobject *intel_pstate_kobject; int rc; intel_pstate_kobject = kobject_create_and_add("intel_pstate",