Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp190610pxk; Fri, 11 Sep 2020 04:17:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdbSga4YXGxKsppPZ4gE68qMUu/E0hL8vtMru7RZMLY2vvTgg1eK6/7DhRjPuxKmCem4Ft X-Received: by 2002:a50:d942:: with SMTP id u2mr1478775edj.0.1599823079186; Fri, 11 Sep 2020 04:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599823079; cv=none; d=google.com; s=arc-20160816; b=rYtkeb+MGkdU4ZvXzOzW6HtGoayECMZRa6zzHvuRUewyR9atUXxXORdJpox18Je5N/ fnvQwtHwR9f5coWjE+futektWD0OeHNBcpYcHMjUVh6boZcSu8MrEU3pXNhjjFfUdr9N gSc4MKsWJ6c8a/+qghsgYEVCxuW0mJ/57CiL4famUVBnq5/hfUFqvZZTMKauT2lPj2Ai ZtCruZKYf6ZFzXkr1YB7tpvuS5ZYtWGlQrQpmBA3CquprOyKKc7v89PZE+q1HUGpGN/m VDiXszBrnNA6C2+gdzmzTu6ugTCoTtTPZH2sSR4zIEdUnLpOMPRMV88n5PS+Antvr8cd S5SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=s8u0msJaLRdElFddnYRiSEHR9tofAooAsQROQnhVpQM=; b=z0xCz/ofGb9WxhjcuA0E0FUff7sD8XwN6F5f/NH9OGeQsYiIi9NgchfHagKlFzpOwe ojN/ejS35k4m0tcEuoU7jj7xco/+LVbyLnqtBTdXaZvy45nOpjWsPBdWE3x+TlWSWdzS 6MApyup3usRJo722C2F+aJK9sz9PX3RRwl1XL/SPxjKf5DL1b7Oik+msZf6DV9c1pIwX 541+6ACBx54qdcZvLQSEWLP9ndIHL9vb0BW5Z4ulxoZiHvmRsMrlNc+Wl7F5UrjPib9n 5k+fz1yw8k97AEteziUhW+Vhei49elINuQtUw0LteY5z5uhRms+swL+JeVv+rzcwL47W vQww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b10si1030978edm.281.2020.09.11.04.17.35; Fri, 11 Sep 2020 04:17:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725830AbgIKLQZ (ORCPT + 99 others); Fri, 11 Sep 2020 07:16:25 -0400 Received: from foss.arm.com ([217.140.110.172]:60196 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725789AbgIKLQJ (ORCPT ); Fri, 11 Sep 2020 07:16:09 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 710BC113E; Fri, 11 Sep 2020 04:16:08 -0700 (PDT) Received: from [192.168.1.205] (unknown [10.37.8.109]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1D3E73F68F; Fri, 11 Sep 2020 04:16:04 -0700 (PDT) Subject: Re: [PATCH v2] spi: spi-nxp-fspi: Add ACPI support To: Mark Brown , kuldip dwivedi Cc: Ashish Kumar , Yogesh Gaur , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Varun Sethi , Arokia Samy , Samer El-Haj-Mahmoud , Paul Yang References: <20200911082806.115-1-kuldip.dwivedi@puresoftware.com> <20200911110018.GD4895@sirena.org.uk> From: Ard Biesheuvel Message-ID: <9a6ce5d0-2f39-eb55-c3a9-cae2a8093fbc@arm.com> Date: Fri, 11 Sep 2020 14:16:02 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200911110018.GD4895@sirena.org.uk> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/11/20 1:00 PM, Mark Brown wrote: > On Fri, Sep 11, 2020 at 01:58:06PM +0530, kuldip dwivedi wrote: > >> /* find the resources - configuration register address space */ >> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fspi_base"); >> +#ifdef CONFIG_ACPI >> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); >> +#endif > > This is buggy, it is equivalent to just removing the name based lookup > since we'll do the name based lookup then unconditionally overwrite the > results with an index based lookup. > Also, note that CONFIG_ACPI kernels may still boot in DT mode.