Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752520AbbHDFTV (ORCPT ); Tue, 4 Aug 2015 01:19:21 -0400 Received: from mx5.zte.com.cn ([63.217.80.70]:46821 "EHLO mx5.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771AbbHDFTT (ORCPT ); Tue, 4 Aug 2015 01:19:19 -0400 In-Reply-To: <55BF955E.1030801@linaro.org> References: <1437654681-20893-1-git-send-email-xlpang@126.com> <55BF955E.1030801@linaro.org> To: Daniel Lezcano Cc: linux-kernel@vger.kernel.org, linux-kernel-owner@vger.kernel.org, linux-pm@vger.kernel.org, "Rafael J. Wysocki" Subject: Re: [PATCH] cpuidle/coupled: Init cpuidle_device::safe_state_index MIME-Version: 1.0 X-KeepSent: A0431BB2:32FC38F1-48257E97:001AEA8F; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.5.3 September 15, 2011 Message-ID: From: pang.xunlei@zte.com.cn Date: Tue, 4 Aug 2015 13:19:09 +0800 X-MIMETrack: Serialize by Router on notes_smtp/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2015-08-04 13:18:53, Serialize complete at 2015-08-04 13:18:53 Content-Type: text/plain; charset="US-ASCII" X-MAIL: mse01.zte.com.cn t745J81O010273 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1980 Lines: 45 Hi Daniel, Daniel Lezcano wrote 2015-08-04 AM 12:22:54: > Re: [PATCH] cpuidle/coupled: Init cpuidle_device::safe_state_index > > On 07/23/2015 02:31 PM, Xunlei Pang wrote: > > From: Xunlei Pang > > > > cpuidle_device::safe_state_index need to be initialized before use, > > so assign the driver's safe_state_index to it. > > > > Signed-off-by: Xunlei Pang > > --- > > drivers/cpuidle/cpuidle.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c > > index e8e2775..ed5c8efe 100644 > > --- a/drivers/cpuidle/cpuidle.c > > +++ b/drivers/cpuidle/cpuidle.c > > @@ -585,6 +585,8 @@ int cpuidle_register(struct cpuidle_driver *drv, > > */ > > if (coupled_cpus) > > device->coupled_cpus = *coupled_cpus; > > + > > + device->safe_state_index = drv->safe_state_index; > > Hey, good catch. We are lucky the safe_state_index is always zero. > > I think we can simplify the code by removing the safe_state_index from > the cpuidle_device structure and use the one in the cpuidle_driver > structure in coupled.c Will do, thanks! Regards, -Xunlei -------------------------------------------------------- ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited. If you have received this mail in error, please delete it and notify us immediately. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/