From patchwork Tue Aug 1 12:03:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 709401 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 A4C35C001DF for ; Tue, 1 Aug 2023 12:04:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232665AbjHAMEB (ORCPT ); Tue, 1 Aug 2023 08:04:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234011AbjHAMDn (ORCPT ); Tue, 1 Aug 2023 08:03:43 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07D61173A; Tue, 1 Aug 2023 05:03:18 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2b9b9f0387dso85806121fa.0; Tue, 01 Aug 2023 05:03:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690891396; x=1691496196; 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=UBlaVyXcRzijB9wVsQtSzeKEzoa3c6OzUppL627hjBw=; b=Dp+olNtZ83HKky4tQkPpItoL1j6tF9PvKT3p59x9ZfNBmmu0TfyG3TIuy6hK1f9Rha 3aiYIsQo7odhJYsCIJkONjN0YUBgZDzXi3LI82N8CaCwO+TGficuuo8GYjvRdf64T37n kMwJyJ2Y18lZybPYi/ouE09kSKf2l9iHNyFQvJS9JMhHuRuS74e5vF2Losvm75sd0nqz BTsoc5XFbbyRDKrFZSQU+2ouda7GeyKMwgXgGLd7AGqJIkPoFDIaTgIBsgWa5a5MNrXw UcQZ3feLzpdqSDo+2WrDVstNwC4P84Kx8A4dq7Pz7aqh6ZJmSSYauIV/y9+bYXbr+fxG lB+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690891396; x=1691496196; 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=UBlaVyXcRzijB9wVsQtSzeKEzoa3c6OzUppL627hjBw=; b=jMjylBmoiCjF1zEhTjngoOsgPJ0lPhdhGglsbtjTtz2p01pxi+sBta0yCtgwno43AI MUXolZdap3HBVGbH5JhMQMNgJ0fVwIbpb84aQQ7BygJ+iAktJo/+iN2mSPesPhVSGDYm ZPSykGpBJs8YCx/VMeJnzVZYxtTiM2rmV4vJrrN+plqrfGe1AvUm+3TbEkL5XiwqAcni BqIwk0pkGNlpRigwbYqtga/RliO3bN4IES4S2luGKnqTcG9a0n5BB2HdGouuoDf66p2M I60BsMKKANXkdZETkWF9NS7Pw5Kw7cVHT6QY42PUtjqD3KMM2FpBq9sZeqtI7o1mKJcg 6gqA== X-Gm-Message-State: ABy/qLaO2Q9hAXyi1lTM6bKrKSzNQBw2ndk93/NbQ3W6Rhf/ndChSDwo LyfaCac8O7AzuRDHZB89s4U= X-Google-Smtp-Source: APBJJlG0gkGSqh8g5VaM+e88ZxtYsK4NH8RkcNysALY4B325PIG1JEBhoW4P89rjsPkzYoSmgZsFgg== X-Received: by 2002:a2e:3610:0:b0:2b5:974f:385 with SMTP id d16-20020a2e3610000000b002b5974f0385mr2369426lja.9.1690891395968; Tue, 01 Aug 2023 05:03:15 -0700 (PDT) Received: from fedora ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id s23-20020a2e9c17000000b002b6fe751b6esm3048819lji.124.2023.08.01.05.03.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Aug 2023 05:03:15 -0700 (PDT) Date: Tue, 1 Aug 2023 15:03:11 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Jonathan =?iso-8859-1?q?Neusch=E4fer?= , Linus Walleij , openbmc@lists.ozlabs.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v8 3/8] pinctrl: wpcm450: relax return value check for IRQ get Message-ID: <143e6d7a1d2b1fb692097f6c855f2553aca93589.1690890774.git.mazziesaccount@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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äfer Acked-by: Linus Walleij Reviewed-by: Jonathan Cameron --- Revision history: v5 => : - No changes v4 => v5: Fix typo in subject "elax" => "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 patch changing the fwnode_irq_get() got merged during 5.4: https://lore.kernel.org/all/fb7241d3-d1d1-1c37-919b-488d6d007484@gmail.com/ This is a clean-up as agreed. --- drivers/pinctrl/nuvoton/pinctrl-wpcm450.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c b/drivers/pinctrl/nuvoton/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_device *pdev, irq = fwnode_irq_get(child, i); if (irq < 0) break; - if (!irq) - continue; girq->parents[i] = irq; girq->num_parents++;