From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753195AbcBONDO (ORCPT ); Mon, 15 Feb 2016 08:03:14 -0500 Received: from mail-lf0-f47.google.com ([209.85.215.47]:34331 "EHLO mail-lf0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753071AbcBONDK (ORCPT ); Mon, 15 Feb 2016 08:03:10 -0500 Subject: Re: [PATCH v2 3/9] ACPI: introduce acpi_table_parse2() To: "Rafael J. Wysocki" References: <1455299022-11641-1-git-send-email-aleksey.makarov@linaro.org> <1455299022-11641-4-git-send-email-aleksey.makarov@linaro.org> <20160212185130.GA10095@kroah.com> Cc: Greg Kroah-Hartman , ACPI Devel Maling List , "linux-serial@vger.kernel.org" , Linux Kernel Mailing List , "linux-arm-kernel@lists.infradead.org" , Russell King , "Rafael J . Wysocki" , Leif Lindholm , Graeme Gregory , Al Stone , Christopher Covington , Len Brown From: Aleksey Makarov Message-ID: <56C1CB3D.6070906@linaro.org> Date: Mon, 15 Feb 2016 15:57:33 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rafael, Thank you for review. On 02/13/2016 02:08 AM, Rafael J. Wysocki wrote: > On Fri, Feb 12, 2016 at 7:51 PM, Greg Kroah-Hartman > wrote: >> On Fri, Feb 12, 2016 at 08:43:34PM +0300, Aleksey Makarov wrote: >>> The function acpi_table_parse() has some problems: >>> 1 It can be called only from __init code >>> 2 It does not pass any data to the handler >>> 3 It just throws out the value returned from the handler >>> >>> These issues are addressed in this patch >> >> Why not just fix acpi_table_parse(), like you have, and not add a new >> API call with a "2" at the end of it. That seems crazy to try to >> maintain that level of apis. >> >> But I'm not the acpi maintainer(s), so it's their call... > > The ACPI maintainer agrees. I see. How would you prefer it to be fixed: 1. Change the signature/implementation of acpi_table_parse(). CON: It would require extensive changes through all the kernel, which I am not sure I will be able to test (but these changes are just adding an unused arg to the handler + checking that the return value is consistent) OR 2. Have a local implementation of the function like acpi_table_parse2() CON: A bit of code duplication. Thank you Aleksey Makarov