Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3495419pxp; Tue, 8 Mar 2022 15:56:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpSbxdatW6m0rQYNgkjKu5jEQsbzTWMhri1Lxi7EpbWCN/vcQJr0kMMJrmVg7TsnwNMkMr X-Received: by 2002:a17:902:e808:b0:151:f87f:3749 with SMTP id u8-20020a170902e80800b00151f87f3749mr8728962plg.24.1646783766137; Tue, 08 Mar 2022 15:56:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646783766; cv=none; d=google.com; s=arc-20160816; b=ZGJ38GAk2kBgRXG4ea7Id71BXeRXgf4sxATDztGU51fpsdT1YS+HFw19+sc9hcrSN/ dHRgmvXlRkIHg0b5RYSgDt8w8t28BphFvSBwwhCRiVo0r6jxk9PrdaRxF812QhFjw/xn sHDIvl/xAtvwm7zLWqFFVD0nkr39WBfhgY6J8Y87moasG6jkp/jUyOGcmWWqmwDPX+bw OhrlTqz9F/JipPT0aatiekzBZign58OKbSz1LlCUaLv1NLd0WRG06EnIhQIhjEviuJkX HiioRu4Hhr8O1okXn9TAUlCJYmna+k2+uoTdh5vA74aj5m/f+2GUvMxWjki8aqzi8VPm 3QwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-filter; bh=mybvm4V/9O6XvzvI2v1S02uGdvJBjTMhJJ0GDAYYJ6M=; b=HQcfM8jL64+O02tAIXqaQFK1qCOKSawJrBjdZOsXUj23tR7kqvlY8dTBS/TukRpgFu i6lTNJ2XVCWcy8h89WYInh2eVIctCn3UvQ1N1zYMrqKw6yL4XuJtkwQm5Egfwf0ZEV8a mhf2FPgP4ve5T6pnz58mSlR1Wrg54aFqRyur8WVfaWSF2WZG2VEQaIK+EUHYJFTi4WZS bvXtW/2AHzP6pKbOc3HQaWfh5jN7/T4mdq9fhacMYVo/3NLVFQR5QHt6P+IUUSVHuZJw M8s+I0f4MOMy/668HYbrDnGmZ9gxqjfzWmLQoW7sxH9nVkSiaBIEsVRKeXovMPyLkQZ7 knMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d15-20020a63fd0f000000b00374589fc8dbsi259036pgh.783.2022.03.08.15.56.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 15:56:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C35131D0C9; Tue, 8 Mar 2022 15:32:52 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345012AbiCHIli (ORCPT + 99 others); Tue, 8 Mar 2022 03:41:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232253AbiCHIlh (ORCPT ); Tue, 8 Mar 2022 03:41:37 -0500 Received: from mxout03.lancloud.ru (mxout03.lancloud.ru [45.84.86.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACC9C3FBD5; Tue, 8 Mar 2022 00:40:38 -0800 (PST) Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout03.lancloud.ru 7728820EAF98 Received: from LanCloud Received: from LanCloud Received: from LanCloud Subject: Re: [PATCH] ata: Use platform_get_irq() to get the interrupt To: CC: , , , Minghao Chi , "Zeal Robot" References: <20220308025940.2077329-1-chi.minghao@zte.com.cn> From: Sergey Shtylyov Organization: Open Mobile Platform Message-ID: Date: Tue, 8 Mar 2022 11:40:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20220308025940.2077329-1-chi.minghao@zte.com.cn> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! Please be more specific in the subject: s/ata:/pata_pxa:/. On 3/8/22 5:59 AM, cgel.zte@gmail.com wrote: > From: Minghao Chi (CGEL ZTE) > > platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static > allocation of IRQ resources in DT core code, this causes an issue > when using hierarchical interrupt domains using "interrupts" property > in the node as this bypassed the hierarchical setup and messed up the > irq chaining. > > In preparation for removal of static setup of IRQ resource from DT core > code use platform_get_irq(). > > Reported-by: Zeal Robot > Signed-off-by: Minghao Chi (CGEL ZTE) > --- > drivers/ata/pata_pxa.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/ata/pata_pxa.c b/drivers/ata/pata_pxa.c > index 41430f79663c..6394ab4cbc1b 100644 > --- a/drivers/ata/pata_pxa.c > +++ b/drivers/ata/pata_pxa.c [...] > @@ -205,8 +205,8 @@ static int pxa_ata_probe(struct platform_device *pdev) > /* > * IRQ pin > */ > - irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); > - if (unlikely(irq_res == NULL)) > + irq = platform_get_irq(pdev, 0); > + if (unlikely(irq < 0)) > return -EINVAL; Why did you not switch to returning 'irq'? The way it is now, the deferred probing doesn't work... [...] MBR, Sergey