Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755253AbdCaPOr (ORCPT ); Fri, 31 Mar 2017 11:14:47 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:31152 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754099AbdCaPOq (ORCPT ); Fri, 31 Mar 2017 11:14:46 -0400 Subject: Re: [PATCH v2] xen: make functions in xen-acpi-processor return void To: Juergen Gross , linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org References: <20170331144056.9759-1-jgross@suse.com> Cc: konrad.wilk@oracle.com From: Boris Ostrovsky Message-ID: Date: Fri, 31 Mar 2017 11:13:51 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170331144056.9759-1-jgross@suse.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1345 Lines: 36 On 03/31/2017 10:40 AM, Juergen Gross wrote: > There are several functions in xen-acpi-processor which either always > return the same value or where the returned value is never checked. > > Make the functions return void. > > Signed-off-by: Juergen Gross > --- > drivers/xen/xen-acpi-processor.c | 51 +++++++++++++++------------------------- > 1 file changed, 19 insertions(+), 32 deletions(-) > > diff --git a/drivers/xen/xen-acpi-processor.c b/drivers/xen/xen-acpi-processor.c > index 23e391d..45be017 100644 > --- a/drivers/xen/xen-acpi-processor.c > +++ b/drivers/xen/xen-acpi-processor.c > @@ -54,7 +54,7 @@ static unsigned long *acpi_id_present; > /* And if there is an _CST definition (or a PBLK) for the ACPI IDs */ > static unsigned long *acpi_id_cst_present; > > -static int push_cxx_to_hypervisor(struct acpi_processor *_pr) > +static void push_cxx_to_hypervisor(struct acpi_processor *_pr) > { > struct xen_platform_op op = { > .cmd = XENPF_set_processor_pminfo, > @@ -70,7 +70,7 @@ static int push_cxx_to_hypervisor(struct acpi_processor *_pr) > dst_cx_states = kcalloc(_pr->power.count, > sizeof(struct xen_processor_cx), GFP_KERNEL); > if (!dst_cx_states) > - return -ENOMEM; > + return; Maybe pr_warn(_once)()? In any case: Reviewed-by: Boris Ostrovsky