Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1863526rwb; Fri, 11 Nov 2022 01:15:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf4MF/hLukGtbBYdOIwCud9X1KLAwYa68OM9N8dlWTLnuaMWuyIPLthmUQxM8AKgSQaJdRGD X-Received: by 2002:a17:906:7f92:b0:78d:4e5b:ffaa with SMTP id f18-20020a1709067f9200b0078d4e5bffaamr1085996ejr.455.1668158115668; Fri, 11 Nov 2022 01:15:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668158115; cv=none; d=google.com; s=arc-20160816; b=lCYdQc0b5cpHXzKSw3SAiMX2IsH3L8ShujS43xTlGsruzucWZ0V6n3uVsZ5KW7ldo9 FQGSYaKXEWsdiWy72Iqz7sM9tW8EPOaOYRTq6UIiRPkkzh/3fp8w7mjvUk67A+SPiQ+x l79vgfv9d0laCaDFronMVT/odmb9++DxQ3C2Sb1d+IOCVdPbOCxfl7bh00b0rKrvLJhm DV5O7BzXdOIBY1luCGfjDIDbdrk47H7kuj+gIp/nuuzM/IkCkD33WHqIOsV2yA4H1nBw tSgEZ9J5V2Qz2EFguJHQNUlt1ohDuCs6WB3xDWBmF9hbV33IQQXDIDfp/trP1v6TrBjH OnyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WJfATXzeaasFglvUgDlxQq5sCXX0dS+liqC81FRWiMI=; b=qauTBOgUJqHdYsSfPmqeFwMmWFb5zyX4HsJf/YsSCZ1VNbrca5UVOzVJfUkE4eGx/C 054l84vlNup6zgadSSdmApq4uRlLq0mTDI4t5lbwuSy5SxvhwvWBXDZ6baM9TT0/WdGQ 6BF95Ntdc5esRJZUAJkMMM6HVQ4gYcAq8A0WR1M2SbvChxoXSUty5/X9aLYxLVkAns0H VG275nWwue/h6rVUJnCOW46DitCELzj5WkapxmzjxSXPYzqRuLKdBWle7VI6lbaJFSYY n5NhPByHzA7mvds+jsZBXSnDTyh3Rs0HCT3WtPKY2GMeVYNH9M9GfAVUHToeFePuNRiH qjvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XziARmjq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pj10-20020a170906d78a00b007a6843971c0si1422460ejb.190.2022.11.11.01.14.53; Fri, 11 Nov 2022 01:15:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XziARmjq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233343AbiKKIwS (ORCPT + 92 others); Fri, 11 Nov 2022 03:52:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232577AbiKKIwR (ORCPT ); Fri, 11 Nov 2022 03:52:17 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70737742C1 for ; Fri, 11 Nov 2022 00:52:16 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CC27861EED for ; Fri, 11 Nov 2022 08:52:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8B2BC433D6; Fri, 11 Nov 2022 08:52:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1668156735; bh=fXKuRB663cmxgQcjTNGenw4vOoT0/yPa+UqIg7NWx9Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XziARmjqY16i8b1xeJZrqjCAng9ByNMQSF7UcsCMzvhvXJothGBF/YoHONaoB1xxg DNTijvthSSD/CWG7Yuxqwqixy56lzHBHwUhez3ov+X0bC0VwTSKkHLOJuu1kZpmp/K DVA5kHyvw0x/jx9KlttSxXpLYh41dvXZPYPkg0RY= Date: Fri, 11 Nov 2022 09:52:12 +0100 From: Greg Kroah-Hartman To: Soha Jin Cc: "Rafael J. Wysocki" , "linux-kernel@vger.kernel.org" , Wende Tan Subject: Re: [PATCH v2] platform: use fwnode_irq_get_byname instead of of_irq_get_byname to get irq Message-ID: References: <20221028164120.2798-1-soha@lohu.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Fri, Nov 11, 2022 at 08:30:46AM +0000, Soha Jin wrote: > > -----Original Message----- > > From: Soha Jin > > Sent: Saturday, October 29, 2022 12:41 AM > > > > Not only platform devices described by OF have named interrupts, but > > devices described by ACPI also have named interrupts. The fwnode is an > > abstraction to different standards, and using fwnode_irq_get_byname can > > support more devices. > > > > Moreover, when CONFIG_OF_IRQ is not enabled, there will be a stub method > > always returning 0, the if statement can be removed safely. > > > > Signed-off-by: Soha Jin > > Tested-by: Wende Tan > > --- > > drivers/base/platform.c | 8 +++----- > > 1 file changed, 3 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/base/platform.c b/drivers/base/platform.c index > > 51bb2289865c..6cd7fd478c5f 100644 > > --- a/drivers/base/platform.c > > +++ b/drivers/base/platform.c > > @@ -441,11 +441,9 @@ static int __platform_get_irq_byname(struct > > platform_device *dev, > > struct resource *r; > > int ret; > > > > - if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) { > > - ret = of_irq_get_byname(dev->dev.of_node, name); > > - if (ret > 0 || ret == -EPROBE_DEFER) > > - return ret; > > - } > > + ret = fwnode_irq_get_byname(dev_fwnode(&dev->dev), name); > > + if (ret > 0 || ret == -EPROBE_DEFER) > > + return ret; > > > > r = platform_get_resource_byname(dev, IORESOURCE_IRQ, name); > > if (r) { > > -- > > 2.30.2 > > > > Hello Greg, > > I noticed the original patch is merged into -next branch, but as I said in > the mail yesterday (maybe you did not see it), I already composed a v2 > patch 2 weeks ago. Except the formatting fix, this patch also removed a > useless if-branch. > > Are there any chance to correct this mistake? Please submit a fixup patch, sorry, I can't rebase that branch now. greg k-h