Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751957AbdGFPCF (ORCPT ); Thu, 6 Jul 2017 11:02:05 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34665 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750896AbdGFPCD (ORCPT ); Thu, 6 Jul 2017 11:02:03 -0400 Date: Fri, 7 Jul 2017 01:01:49 +1000 From: Nicholas Piggin To: "Gautham R. Shenoy" Cc: 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 Message-ID: <20170707010149.7526c784@roar.ozlabs.ibm.com> In-Reply-To: <1499272696-28751-3-git-send-email-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> Organization: IBM X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 925 Lines: 24 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?