From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751987AbcBPBUk (ORCPT ); Mon, 15 Feb 2016 20:20:40 -0500 Received: from v094114.home.net.pl ([79.96.170.134]:46486 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751761AbcBPBUj convert rfc822-to-8bit (ORCPT ); Mon, 15 Feb 2016 20:20:39 -0500 From: "Rafael J. Wysocki" To: Andy Shevchenko Cc: Aleksey Makarov , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , linux-arm Mailing List , Graeme Gregory , Russell King , Greg Kroah-Hartman , Shannon Zhao , Vladimir Zapolskiy , Len Brown Subject: Re: [PATCH v6 1/2] ACPI: introduce a function to find the first physical device Date: Tue, 16 Feb 2016 02:21:59 +0100 Message-ID: <2019010.CjT5f3j553@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.5.0-rc1+; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1453300171-25473-1-git-send-email-aleksey.makarov@linaro.org> <1453300171-25473-2-git-send-email-aleksey.makarov@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, January 20, 2016 05:12:18 PM Andy Shevchenko wrote: > On Wed, Jan 20, 2016 at 4:29 PM, Aleksey Makarov > wrote: > > Factor out the code that finds the first physical device > > of a given ACPI device. It is used in several places. > > > > Reviewed-by: Andy Shevchenko > > Signed-off-by: Aleksey Makarov > > Hmm… Sorry, didn't notice one style issue and there is one is matter > of taste below. > > > --- a/drivers/acpi/acpi_platform.c > > +++ b/drivers/acpi/acpi_platform.c > > @@ -43,7 +43,6 @@ static const struct acpi_device_id forbidden_id_list[] = { > > > + pdevinfo.parent = adev->parent ? > > + acpi_get_first_physical_node(adev->parent) : NULL; > > Matter of taste, but I believe if-else looks better here even when > consumes +2 LOC. I disagree. Thanks, Rafael