From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A577C282CE for ; Tue, 4 Jun 2019 10:23:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 066A824CCD for ; Tue, 4 Jun 2019 10:23:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EgQs4hsN"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ti.com header.i=@ti.com header.b="ASkGqmtm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 066A824CCD Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DBWlXrrOlKyaVZJIg31LSiKqr8doUifMeaBGmErbSkI=; b=EgQs4hsNxdgy2E 1NxRdIeE5VIk7ZJB+oSgajtt1cWOKhpCISwzm/yln4Lh6CQUONt4aVNMKma+xiqgnAkOEaUA8cnDc QKw6nAJdrEbGkE/egcz6EF8s1W1jJfqJrg18wRQcTqIQtbHx4kOaVq/eeAEXzBh7LzMWecyz9JpWH KlzRT3d3GAKGCL/oDpb+rNxfOyi1b/kBhTOACUkOMq8UrY3LYAvlnKCF342biXJ9QfsuXZtT+IwaR 2ThZMJneMt8G3oUlvHxWDa1ZiIeNm71yEEY1rp87QBO9P5cJiyHp9BfcDVX1i3cTc+TNKJz9/b1ni gdQhsLF4wS5VBQVrH68Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY6bd-0007DK-WD; Tue, 04 Jun 2019 10:23:50 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY6ba-0007Ck-N6 for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2019 10:23:48 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x54ANjK3049512; Tue, 4 Jun 2019 05:23:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1559643825; bh=EM7BHXVqWsTF//Ik3/UfVhSIKF1ajjpwgG280gpzwKU=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=ASkGqmtmG8uKzK5GKFBP2sG5UhOtYRut3PYDCUn43l/BJhKpaDqELblgyRZNZRQ3T hUVbvoVbyWTEAN+vr/yVVWhxVfBvUPpyOqDk2Ulw1J0lI7eCtCeZqf6uZ/+h7ykocQ 8k0A5INIYBEVaC4VfSKXGxJCh0wKNPC+hQi3icl0= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x54ANjpF079209 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Jun 2019 05:23:45 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 4 Jun 2019 05:23:44 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 4 Jun 2019 05:23:44 -0500 Received: from [172.24.190.117] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x54ANdx7029032; Tue, 4 Jun 2019 05:23:42 -0500 Subject: Re: [PATCH] firmware: ti_sci: Parse all resource ranges even if some is not available To: Peter Ujfalusi , , , References: <20190604101000.6741-1-peter.ujfalusi@ti.com> <4ff3a042-41a2-62d3-c899-7a62406ad6a4@ti.com> <685f477a-65fe-36ae-0081-a329554714a9@ti.com> From: Lokesh Vutla Message-ID: Date: Tue, 4 Jun 2019 15:53:07 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <685f477a-65fe-36ae-0081-a329554714a9@ti.com> Content-Language: en-US X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_032346_835148_D08C90E8 X-CRM114-Status: GOOD ( 14.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 04/06/19 3:51 PM, Peter Ujfalusi wrote: > > > On 04/06/2019 13.13, Lokesh Vutla wrote: >> >> >> On 04/06/19 3:40 PM, Peter Ujfalusi wrote: >>> Do not fail if any of the requested subtypes are not availabe, but set the >>> number of resources to 0 and continue parsing the resource ranges. >>> >>> Signed-off-by: Peter Ujfalusi >>> --- >>> drivers/firmware/ti_sci.c | 11 +++++++++-- >>> 1 file changed, 9 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c >>> index af3ebcdeab18..5d13ed724ff0 100644 >>> --- a/drivers/firmware/ti_sci.c >>> +++ b/drivers/firmware/ti_sci.c >>> @@ -2783,6 +2783,7 @@ devm_ti_sci_get_of_resource(const struct ti_sci_handle *handle, >>> struct ti_sci_resource *res; >>> u32 resource_subtype; >>> int i, ret; >>> + bool valid_set = false; >> >> Minor nit: Can you maintain the reverse Christmas tree here? It looks good :) No >> strong feelings though > > bool no_valid_sets = true; > > and when we have at least one valid set flip it to false? That's equally > twisted if not worst. imho No no. I mean to add the change like below instead of adding the declaration at the end. --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -2383,6 +2383,7 @@ devm_ti_sci_get_of_resource(const struct ti_sci_handle *handle, struct device *dev, u32 dev_id, char *of_prop) { struct ti_sci_resource *res; + bool valid_set = false; u32 resource_subtype; int i, ret; Thanks and regards, Lokesh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel