Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3965784ybl; Mon, 3 Feb 2020 09:54:00 -0800 (PST) X-Google-Smtp-Source: APXvYqzAkfpMKwfMuMPXIXpMFqclo/tNqtAu0u70PC5nRsjlEZzzqM6iYqFzmKUU0XNBppqSXSNw X-Received: by 2002:a05:6830:15d2:: with SMTP id j18mr19254012otr.187.1580752440293; Mon, 03 Feb 2020 09:54:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580752440; cv=none; d=google.com; s=arc-20160816; b=AGykgLov1HOZbJw1FM19ZkU+aX9XDU9X/VLD2602vppLgDvdW0xTsYw7ddYiYXwcBi 7WKNpIoU6myEpyPmvZ0piux4+GU6TM/3Xrtm+/b4VOeaiuxO3MOXTHyRDidADQ4Mb1a1 YzI6qDvSSamt42KcvxFXImRh30Qd6fIanc5yJkJRsCqvBFImdxjznf574SSF/cYewRDw oSiEZGTNs0NiGGWcDQDY30z1zDtzpRx0EeYOE1/gwaA1Qok3rTUSkl+C0hPOSZTJI+Q0 YW4uzOhWKtgLXtZcF/iEoVkXR1vtOroGGG5WDK9+H8a1/Bq9MY5TXguCFQJWrr/6eJxz xW9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=QNy1sNVUArXTL8VJUA8IVgEv6FUx+7xlRaj38yN9+Ik=; b=Q7Xo5zHsBqps3Su8XPsBwBcfW2kVCdAApYyieOk3QRuxSsYsOesToJtwh58sNlhtwA goV9MEv8YaDGUqzEyRqKA70pCiy31TNCRDq0FaBN+RL3NL0dzzIjxBkH/+dmtV8S0Mkn AsWmCYUgRTkv1UwbjlPGGnVZ1gguJNhekaYG74QAk9Bu1IsPSWXgiyl7aQ6Ag4BGh0jO RuwO2+DolT6mXlie+ZVQcHgd7WthiuJTN+y3b2M2Hf5uPVeLqkW6/RzgwS6GdF3hLapO pi7oWUuLqDNuzgOlZp9faLq00pP22SofdZEQzWgbXLVwo80NEtDT6p3OODnoxxBGj1QW y42w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n15si1252105oic.234.2020.02.03.09.53.43; Mon, 03 Feb 2020 09:54:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728414AbgBCP6E (ORCPT + 99 others); Mon, 3 Feb 2020 10:58:04 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:45814 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728331AbgBCP6E (ORCPT ); Mon, 3 Feb 2020 10:58:04 -0500 Received: by mail-oi1-f193.google.com with SMTP id v19so15176059oic.12; Mon, 03 Feb 2020 07:58:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QNy1sNVUArXTL8VJUA8IVgEv6FUx+7xlRaj38yN9+Ik=; b=c4YUUZR2ALNr8ZOgLymmhULkleAD2QDlQ88ZvstQx3J00QZr034vr5gQ/1tIWtZhG5 U2EJ0T0wyXRgBoHm8I94F/AomoKRj1hXsTptOj2KmCGU9toAt22570T8KxfE7ngnGOPh DoRMKBPStsdS1MD9+Y/2gQI32/VKhyoYVR8kOsyQ2Y4F4ny2TF1gOM46oSMNQNE5dBl6 MWj6NQpMfWUwuSIp3WS/VDDwWZH9d2CZ5RwrpLg4joLycLTYqnPWrORin6IO3ygBcqra H4EzttECPXMAIXJimwRuC/eBpG7EU6JRfk2/yXaIWeAszCMajWanwTtSqlE89kSU80WT S89w== X-Gm-Message-State: APjAAAWKnPtN/n8KVgoIZ0KtZ3z84jpOWkyA5dSwsuv/jZmFDEHm+hu/ fQHMxvjFf+Sc+7o8GefMKk1TIDuq0zsC6PbLh+w= X-Received: by 2002:aca:d6c8:: with SMTP id n191mr15585763oig.103.1580745483499; Mon, 03 Feb 2020 07:58:03 -0800 (PST) MIME-Version: 1.0 References: <20200203154517.2347-1-tiny.windzz@gmail.com> In-Reply-To: <20200203154517.2347-1-tiny.windzz@gmail.com> From: "Rafael J. Wysocki" Date: Mon, 3 Feb 2020 16:57:52 +0100 Message-ID: Subject: Re: [PATCH] cpufreq: make cpufreq_global_kobject static To: Yangtao Li Cc: "Rafael J. Wysocki" , Viresh Kumar , Linux PM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 3, 2020 at 4:45 PM Yangtao Li wrote: > > The cpufreq_global_kobject is only used internally by cpufreq.c > after this: > > commit 2361be236662 ("cpufreq: Don't create empty > /sys/devices/system/cpu/cpufreq directory") > > Make it static. > > Signed-off-by: Yangtao Li > --- > drivers/cpufreq/cpufreq.c | 4 +--- > include/linux/cpufreq.h | 3 --- > 2 files changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > index 4adac3a8c265..a0831d3d5ed1 100644 > --- a/drivers/cpufreq/cpufreq.c > +++ b/drivers/cpufreq/cpufreq.c > @@ -105,6 +105,7 @@ bool have_governor_per_policy(void) > } > EXPORT_SYMBOL_GPL(have_governor_per_policy); > > +static struct kobject *cpufreq_global_kobject; > struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy) > { > if (have_governor_per_policy()) > @@ -2745,9 +2746,6 @@ int cpufreq_unregister_driver(struct cpufreq_driver *driver) > } > EXPORT_SYMBOL_GPL(cpufreq_unregister_driver); > > -struct kobject *cpufreq_global_kobject; > -EXPORT_SYMBOL(cpufreq_global_kobject); > - > static int __init cpufreq_core_init(void) > { > if (cpufreq_disabled()) > diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h > index 018dce868de6..0fb561d1b524 100644 > --- a/include/linux/cpufreq.h > +++ b/include/linux/cpufreq.h > @@ -201,9 +201,6 @@ static inline bool policy_is_shared(struct cpufreq_policy *policy) > return cpumask_weight(policy->cpus) > 1; > } > > -/* /sys/devices/system/cpu/cpufreq: entry point for global variables */ > -extern struct kobject *cpufreq_global_kobject; > - > #ifdef CONFIG_CPU_FREQ > unsigned int cpufreq_get(unsigned int cpu); > unsigned int cpufreq_quick_get(unsigned int cpu); > -- Applied as 5.6 material with minor modification, thanks!