From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Subject: Re: [PATCH v5 1/7] cpufreq: Store cpufreq policies in a list Date: Tue, 16 Jul 2013 11:39:24 +0200 Message-ID: <20130716113924.46f40467@amdc308.digital.local> References: <1370502472-7249-1-git-send-email-l.majewski@samsung.com> <1372927830-2949-1-git-send-email-l.majewski@samsung.com> <1372927830-2949-2-git-send-email-l.majewski@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-reply-to: Sender: cpufreq-owner@vger.kernel.org To: Viresh Kumar Cc: "Rafael J. Wysocki" , Zhang Rui , Eduardo Valentin , "cpufreq@vger.kernel.org" , Linux PM list , Jonghwa Lee , "l.majewski@majess.pl" , linux-kernel , Andre Przywara , Daniel Lezcano , Kukjin Kim , Myungjoo Ham List-Id: linux-pm@vger.kernel.org On Tue, 16 Jul 2013 10:51:27 +0200 Viresh Kumar wrote, > On 4 July 2013 14:20, Lukasz Majewski wrote: > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > > > @@ -2056,6 +2058,7 @@ int cpufreq_unregister_driver(struct > > cpufreq_driver *driver) > > subsys_interface_unregister(&cpufreq_interface); > > unregister_hotcpu_notifier(&cpufreq_cpu_notifier); > > > > + list_del(&cpufreq_policy_list); > > You can't delete the list this way... You must have passed the list > entry you wanted to delete. More precisely link from the struct > cpufreq_policy. Yes. I shouldn't delete statically defined head of the list. Thanks for spotting. > > Over that, it shouldn't be done at the time of unregistering cpufreq > driver but as and when cpus are removed and _cpu_remove_dev > is called. OK, I will iterate the list at __cpufreq_remove_dev() and remove each of them there. -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group