From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761390AbcAKRYs (ORCPT ); Mon, 11 Jan 2016 12:24:48 -0500 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:58215 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759178AbcAKRYn (ORCPT ); Mon, 11 Jan 2016 12:24:43 -0500 Date: Mon, 11 Jan 2016 17:24:33 +0000 From: Russell King - ARM Linux To: Andy Shevchenko Cc: Aleksey Makarov , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , linux-arm Mailing List , Graeme Gregory , Greg Kroah-Hartman , "Rafael J . Wysocki" , Shannon Zhao , Vladimir Zapolskiy , Len Brown Subject: Re: [PATCH v5 2/2] ACPI: amba bus probing support Message-ID: <20160111172433.GV19062@n2100.arm.linux.org.uk> References: <1452518790-27053-1-git-send-email-aleksey.makarov@linaro.org> <1452518790-27053-3-git-send-email-aleksey.makarov@linaro.org> <20160111152732.GU19062@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2016 at 06:26:00PM +0200, Andy Shevchenko wrote: > On Mon, Jan 11, 2016 at 5:27 PM, Russell King - ARM Linux > wrote: > > On Mon, Jan 11, 2016 at 05:13:20PM +0200, Andy Shevchenko wrote: > >> On Mon, Jan 11, 2016 at 3:26 PM, Aleksey Makarov > >> wrote: > >> dev->res is 0 before this one, right? Could you use this fact instead > >> of address_found flag? > > > > amba_device_alloc() zero-initialises everything. However, dev->res is > > a struct resource, and I'd prefer _this_ method that the OT is using > > to testing some random part of struct resource. > > So, you mean resource->start = 0 is not enough reliable? I'd rather not make assumptions about what in a resource is valid or not valid. > >> > + default: > >> > + dev_warn(&adev->dev, "Invalid resource\n"); > >> > >> Why? Isn't possible to have other resources for the devices? > > > > AMBA primecell devices have one memory region, and a number of > > interrupts. Other resource types don't make sense. > > But isn't warning on the other side too noisy? Why would it be "too noisy" ? Isn't it saying that the ACPI is in error to include more resource types that aren't part of specifying the AMBA primecell device? Maybe it should be dev_err(), because it's technically an error... Are you expecting people to create ACPI tables with a lot of rubbish resources attached to these devices? > Yes, and in this case ret > 0 should be converted to an appropriate > error code, otherwise ACPI core will consider this as a normal > execution, right? You are assuming that it does return a positive non-zero value in the first place. -- RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.