Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2306886rwd; Fri, 19 May 2023 04:06:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4kYdx/XZXZvNF782bRQjddBeS4miKzOLKMVfq57YpKc+wxL3foE2xvCtfc8JwuJyZIJ695 X-Received: by 2002:a17:903:11c9:b0:1aa:ff41:31a7 with SMTP id q9-20020a17090311c900b001aaff4131a7mr2483273plh.13.1684494376430; Fri, 19 May 2023 04:06:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684494376; cv=none; d=google.com; s=arc-20160816; b=T+8YBPm0TznzoZhj81q8lUPVNw3LMlBYAvNNA9rBxalzMjFCAFyeWhK3cyrZz1WKe3 mdw8yG4I9FCfn2M93DcBaegoP1sItV6EgKG+6yRThrd0oIkn126ROfe2X3VKG6aa3EUn ee26Rq3KXw4zl3AwD5L2nSDRUm0H3uNXRhn4n1OOUOpCcT8d+QSgOSEQ0XOIpBmMvrt5 1+k3LgkRRiuLBYp/SG5TbDbn61ld++VK7G1HwNuCGqUy0GHz++0VDrU/PTC2Q7PBW5yN GXOJ8WvormmpUM+JOmJydrTNm3ToWKEjsKH5KrDEI3Bs1cad1YQ4w4AxTPjyjFncuo6f rfDA== 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=HD7sDwjeUOhS/tu28skRBlZAs5C/+PALR8fkv0T+X84=; b=teEfZOakFTXsJjj4X4IujE1l3SfkAWqyCBnV/N13qISZ+os0/6OnEu2d2EeUYkYVKh DtOto77J5H1kIu+yPvzuXH3xrFnmCu+iKGh7Mc+JYc7vvEe5lWCpGHywx8T7OUi/+GOP qCyhgqRvQwmUYh38i3r5a9x7esj/c/6HKou5ONeTVLDeAg36tgT0YvbHVPccgUlCOhhe GbvVJuA6wbdsLm0I9IXBhQPu3uZOcTCCOL3lVgyVBYQtZ1road8iQGknWArvo4mHALXo R7J+Kv5CEtytBs2F4mKvBA5Q4vt2vCETAJxZqgKONztgG2odAD8VtIfcSDT1+rbdn7us z86g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=eijdIr5o; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q23-20020a170902edd700b001a99b9d767csi3382333plk.166.2023.05.19.04.06.03; Fri, 19 May 2023 04:06:16 -0700 (PDT) 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=@gmail.com header.s=20221208 header.b=eijdIr5o; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231869AbjESLC5 (ORCPT + 99 others); Fri, 19 May 2023 07:02:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231860AbjESLCw (ORCPT ); Fri, 19 May 2023 07:02:52 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 607ED19A2; Fri, 19 May 2023 04:02:24 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4f380cd1019so3693982e87.1; Fri, 19 May 2023 04:02:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684494141; x=1687086141; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=HD7sDwjeUOhS/tu28skRBlZAs5C/+PALR8fkv0T+X84=; b=eijdIr5oXQZZmSbxyQ5q0NXx2PiSz0Y09n80SbfjV6RR0BJjjGnX9dwRUoI9cGDv/S orxI5273zbZm7bxK8XZsIYq+OE2D6VvfnWy5gWdoK260mX9rBg3jVliyZGFA1yugDcPc GRTRDwTBpUTLw659W1HUwZFgbOo+cQM30qgDnjWpRSMXN/5Alsf9p9DR32gimXgBn495 /t4ojKTj1N7EmvnIcR9GaL0Rd6DUtrRkX7+mIGnGL0Px4JJqWRCGWiL6QDhQrpo0UQH6 vHxJ+OMbjN8ONP92A0pNoVP4oa5ljVr4nJbm5A6B0R/nJg/r8z0n6Rasb55WSewYob/L Oixw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684494141; x=1687086141; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HD7sDwjeUOhS/tu28skRBlZAs5C/+PALR8fkv0T+X84=; b=Zmz4n5cTJGAeqp3DcsxMusso3EMvXRqsbET1Hq9pdu5FZacZSGmHLVv5+9KosDWhxf HIArvJM18WbbsJEycMObEoZM9AuDUYoks88TMCuWo1qNQQSnyHRk3e+YDUth43o3B/DY JvBkDQ4HhgsAbB/BRe5nc0BcMY44e0ialOwMT566RAsIF4g1RqKj0JhCSlwiuEIMMclE 1cwNcYb0rURw+YRYLj4GfbEmE16PzLZy8hilqJDQbSgx7KBT7/EbeI57+Onnk0tMMA1G OdcrOQ+2eSoXRZbo+BLO5nnWh5czoMOw84E+1ovGYJbgns/vmTnN1A66vJRR4BEIK8pX 8pcA== X-Gm-Message-State: AC+VfDz0IJF80vuGBzf5JyoBTWtYiiMXw1kuDrx9RvaOc/rALYYPzhHg hEB5GmdA4mgWJdKiEjgqhcw= X-Received: by 2002:ac2:4949:0:b0:4ec:8e7e:46f1 with SMTP id o9-20020ac24949000000b004ec8e7e46f1mr685248lfi.66.1684494141204; Fri, 19 May 2023 04:02:21 -0700 (PDT) Received: from fedora (62-78-225-252.bb.dnainternet.fi. [62.78.225.252]) by smtp.gmail.com with ESMTPSA id c12-20020ac2530c000000b004f387d97dafsm565093lfh.147.2023.05.19.04.02.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 04:02:20 -0700 (PDT) Date: Fri, 19 May 2023 14:02:16 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J. Wysocki" , Wolfram Sang , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Andreas Klinger , Marcin Wojtas , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan =?iso-8859-1?Q?Neusch=E4fer?= , Linus Walleij , Paul Cercueil , Akhil R , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-iio@vger.kernel.org, netdev@vger.kernel.org, openbmc@lists.ozlabs.org, linux-gpio@vger.kernel.org, linux-mips@vger.kernel.org Subject: [PATCH v5 4/8] pinctrl: wpcm450: relax return value check for IRQ get Message-ID: <42264f1b12a91e415ffa47ff9adb53f02a6aa3ea.1684493615.git.mazziesaccount@gmail.com> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tTeOBa3AOzkey5Y+" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 --tTeOBa3AOzkey5Y+ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable fwnode_irq_get[_byname]() were changed to not return 0 anymore. The special error case where device-tree based IRQ mapping fails can't no longer be reliably detected from this return value. This yields a functional change in the driver where the mapping failure is treated as an error. The mapping failure can occur for example when the device-tree IRQ information translation call-back(s) (xlate) fail, IRQ domain is not found, IRQ type conflicts, etc. In most cases this indicates an error in the device-tree and special handling is not really required. One more thing to note is that ACPI APIs do not return zero for any failures so this special handling did only apply on device-tree based systems. Drop the special (no error, just skip the IRQ) handling for DT mapping failures as these can no longer be separated from other errors at driver side. Signed-off-by: Matti Vaittinen Reviewed-by: Jonathan Neusch=E4fer Acked-by: Linus Walleij --- Revision history: v4 =3D> v5: Fix typo in subject "elax" =3D> "relax" Please note, I took Linus' reply to v4 cover-letter as ack && added the tag. Please let me know if this was not Ok. The special handling in this driver was added when fixing a problem where returning zero from fwnode_irq_get[_byname]() was treated as succes yielding zero being used as a valid IRQ by the driver. f4a31facfa80 ("pinctrl: wpcm450: Correct the fwnode_irq_get() return value = check") The commit message does not mention if choosing not to abort the probe on device-tree mapping failure (as is done on other errors) was chosen because: a) Abort would have broken some existing setup. b) Because skipping an IRQ on failure is "the right thing to do", or c) because it sounded like a way to minimize risk of breaking something. If the reason is a) - then I'd appreciate receiving some more information and a suggestion how to proceed (if possible). If the reason is b), then it might be best to just skip the IRQ instead of aborting the probe for all errors on IRQ getting. Finally, in case of c), well, by acking this change you will now accept the risk :) The first patch of the series changes the fwnode_irq_get() so this depends on the first patch of the series and should not be applied alone. --- drivers/pinctrl/nuvoton/pinctrl-wpcm450.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c b/drivers/pinctrl/nu= voton/pinctrl-wpcm450.c index 2d1c1652cfd9..f9326210b5eb 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c +++ b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c @@ -1106,8 +1106,6 @@ static int wpcm450_gpio_register(struct platform_devi= ce *pdev, irq =3D fwnode_irq_get(child, i); if (irq < 0) break; - if (!irq) - continue; =20 girq->parents[i] =3D irq; girq->num_parents++; --=20 2.40.1 --=20 Matti Vaittinen, Linux device drivers ROHM Semiconductors, Finland SWDC Kiviharjunlenkki 1E 90220 OULU FINLAND ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~ Simon says - in Latin please. ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~ Thanks to Simon Glass for the translation =3D]=20 --tTeOBa3AOzkey5Y+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEIx+f8wZb28fLKEhTeFA3/03aocUFAmRnVzgACgkQeFA3/03a ocUI7wgAykmnnbCV0d+6hECVJlXeaJz6qc/U6yb8DIOeP3Mx2BjegGSsJ0vtVlcZ romo+yYHwqEg3VAjhggn4+lHZ/41mV3a+tYvDeMZ83fZMRHSflurOOcOIItTD11D tnUqcJ39ryflGSv05EJ/o9sPCrUQNeoFX4skwZqYvcUA8Ihp6LQ/vPfV9RFMtg1K 1v3PqNiQFdvOCEX8WgfUHwDtY9vI2d4M6OYS1hV4iPh20LRUfsOn046RH0slxcGw nShvwbSpTKgxOkb+XBZFuvbyttKEzSmKT7d/CN2OZvlA3tIEAB559mbbYtldka+c SYDdN84zqMRFL894m6uBEBrLsIpveg== =ND3t -----END PGP SIGNATURE----- --tTeOBa3AOzkey5Y+--