Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9A83C433F5 for ; Sat, 25 Dec 2021 17:10:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232449AbhLYRKx (ORCPT ); Sat, 25 Dec 2021 12:10:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbhLYRKv (ORCPT ); Sat, 25 Dec 2021 12:10:51 -0500 Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E533C061401; Sat, 25 Dec 2021 09:10:51 -0800 (PST) Received: by mail-yb1-xb35.google.com with SMTP id o185so4735107ybo.12; Sat, 25 Dec 2021 09:10:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1qKorauZ5ZbwDDuS4Hsh/2L8kR1WOpJxg99UyaqwyRY=; b=EWNvZW2Bwtw1HuqzeM1rPMoX6glkYgiYkao9SLLoT9pz3tA88qIhxE+GcaqaU2oCsj Fj89BvC20pDfBozTasPRNXvx+yNW24ROhcDsa4BAYI7Ti9Bl9SuqfwY4YEPzvcgzR5UJ Xow2uyNTg6tblIEe61d0kucWK7/d91yKWGIVSlacL7lC77nw68VBOzav4Q9n1XX1DBad RraQ5rOhmSGDIayLtOMb7jUVIsvoUJdi4wT8/5qJ9uTPe/nyUy8ILHqL0fnJ+jBv36JC 1eEavGEHkg7yy6JtaZiwe6PA6l/RGnfc6AAsxi3Hl+bWFr+CtikvPDpQjBX6UzppOC68 B4+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1qKorauZ5ZbwDDuS4Hsh/2L8kR1WOpJxg99UyaqwyRY=; b=3kQl2D4zsNlVO7VxUbScNb39tGHeUlQCeyruoXIiLyPvcjqXfK6O+DQH3jHFEPJPlf pPp+tt3EWDETHGOoWGU8ma55Ua4Bmx+8e3GqT+6311eRuseIW2pDnHQeEN6afUerZzYe hoZJWTVe91xYX+vxtYkfbDMrfrO60NBWEOOoBRFAD6ITr5s4YW/HxRh1y75egY1FI7kr jYhhodKcWoWr3s9xz+SbrnrmLtjJ5lx0NWx5Oppeemh8U/rn4//xuGQRhw699VSBAh62 Cbk3KnsE08NO1sK0xs9DM/gW1qIvcaH8qv1rUdAeD/7TG3XkFxPr0vsYMJvkpNyMtjYG 3rCQ== X-Gm-Message-State: AOAM531jTRiMIw1Err86yLcuU840qxLjSKPBsrKaWqmE+EW18UKddeCx 024mftqGndrIVillvVvnBbOGykimaaCrCucnBPs= X-Google-Smtp-Source: ABdhPJxg5M2gTvWeo8XoQbxVY5lByQ5/hY2NrKqSPC62Acc46EwCUqPvtOYbOF7WYqEsHmN7LfrNhB+DIdlk4hL4zWg= X-Received: by 2002:a25:1004:: with SMTP id 4mr14364126ybq.669.1640452250517; Sat, 25 Dec 2021 09:10:50 -0800 (PST) MIME-Version: 1.0 References: <20211224202231.31130-1-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: From: "Lad, Prabhakar" Date: Sat, 25 Dec 2021 17:10:24 +0000 Message-ID: Subject: Re: [PATCH v3] soc: ti: smartreflex: Use platform_get_irq_optional() to get the interrupt To: Andy Shevchenko Cc: Lad Prabhakar , Nishanth Menon , Santosh Shilimkar , Rob Herring , Linux Kernel Mailing List , Linux PM , linux-arm Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, Thank you for the review. On Sat, Dec 25, 2021 at 4:56 PM Andy Shevchenko wrote: > > On Sat, Dec 25, 2021 at 4:08 AM Lad Prabhakar > wrote: > > > > 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 bypasses the hierarchical setup and messes up the > > irq chaining. > > > > In preparation for removal of static setup of IRQ resource from DT core > > code use platform_get_irq_optional(). > > ... > > > + ret = platform_get_irq_optional(pdev, 0); > > + if (ret < 0 && ret != -ENXIO) { > > > + dev_err(&pdev->dev, "%s: failed to get IRQ resource\n", __func__); > > + return ret; > > Almost fine, but you should exclude this from the deferred probe, so switch to > > return dev_err_probe(...); > Agreed. > > + } > > + if (ret > 0) > > + sr_info->irq = ret; > > ... > > > + ret = 0; > > I do not see the context, is it really necessary? > Yes the change is necessary as the probe callback returns ret on success, and in the below code flow there might be a case where ret inst set. So setting the ret here. Cheers, Prabhakar