From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752331AbdGGMfv (ORCPT ); Fri, 7 Jul 2017 08:35:51 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:44787 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750984AbdGGMfu (ORCPT ); Fri, 7 Jul 2017 08:35:50 -0400 Date: Fri, 7 Jul 2017 17:56:38 +0530 From: Gautham R Shenoy To: Nicholas Piggin Cc: "Gautham R. Shenoy" , Michael Ellerman , Michael Neuling , Vaidyanathan Srinivasan , Shilpasri G Bhat , "Rafael J. Wysocki" , Akshay Adiga , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH 2/5] powernv:idle: Change return type of pnv_probe_idle_states to int Reply-To: ego@linux.vnet.ibm.com References: <1499272696-28751-1-git-send-email-ego@linux.vnet.ibm.com> <1499272696-28751-3-git-send-email-ego@linux.vnet.ibm.com> <20170707010149.7526c784@roar.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170707010149.7526c784@roar.ozlabs.ibm.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-GCONF: 00 x-cbid: 17070712-0052-0000-0000-0000023970F0 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007335; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000214; SDB=6.00884142; UDB=6.00441142; IPR=6.00664329; BA=6.00005455; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016128; XFM=3.00000015; UTC=2017-07-07 12:34:50 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17070712-0053-0000-0000-0000513D7A77 Message-Id: <20170707122638.GB8913@in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-07_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1707070206 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Nicholas, On Fri, Jul 07, 2017 at 01:01:49AM +1000, Nicholas Piggin wrote: > On Wed, 5 Jul 2017 22:08:13 +0530 > "Gautham R. Shenoy" wrote: > > > From: "Gautham R. Shenoy" > > > > In the current idle initialization code, if there are failures in > > pnv_probe_idle_states, then no platform idle state is > > enabled. However, since the error is not propagated to the top-level > > function pnv_init_idle_states, we continue initialization in this > > top-level function even though this will never be used. > > > > Hence change the the return type of pnv_probe_idle_states from void to > > int and in case of failures, bail out early on in > > pnv_init_idle_states. > > > > Signed-off-by: Gautham R. Shenoy > > Looks good to me. > > Reviewed-by: Nicholas Piggin > > I wonder if the warnings are strong enough here to let people know > idle won't be used so power consumption will be high and performance > significantly reduced on SMT machines? Good point. Will try to print an error message to this effect. -- Thanks and Regards gautham.