From patchwork Fri Dec 9 14:01:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13069588 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 A87D4C4167B for ; Fri, 9 Dec 2022 14:05:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229956AbiLIOFV (ORCPT ); Fri, 9 Dec 2022 09:05:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229902AbiLIOFQ (ORCPT ); Fri, 9 Dec 2022 09:05:16 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A229975BC2; Fri, 9 Dec 2022 06:05:14 -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 F408562253; Fri, 9 Dec 2022 14:05:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CC5AC433D2; Fri, 9 Dec 2022 14:05:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670594713; bh=SjCpvljZm9XNVxL3XT6AlbBdKw5R8JeaSMnpPTwki1E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nSaWAlAUrqEG5ELDFmUcCWJPu5CdS+h5m0QCJd8D1jkUxpD1G0JIVdf98aHAE5jSS 4xcm5Y55UxqCaqkWKa1VD8XoV6lT4PICg4nL75h4zYyjRuBV3z5evo0gXQVbGBJXvv IMAY1rMNgetBFtaxQohto8eRNKsqc6HobhtXWDqlCt4LhgTEPJTca+UtoTlfljiOGo nTHEV39C9ACQWgg2XCivAoqu+6UpJoOaWSUJBZ97VfV9EGjbNLCq/2xcUhykx8IzWW v7w2vmkA1YIoyDL7cnJtXGQCxvX3CvqiKbNiJms4JkSfhsI9P56O9wb6GHW4vdhN6G 2qND3lMvL9kpQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1p3e0I-0000RP-6n; Fri, 09 Dec 2022 15:05:30 +0100 From: Johan Hovold To: Marc Zyngier Cc: Thomas Gleixner , x86@kernel.org, platform-driver-x86@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v3 01/19] irqdomain: Drop bogus fwspec-mapping error handling Date: Fri, 9 Dec 2022 15:01:32 +0100 Message-Id: <20221209140150.1453-2-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221209140150.1453-1-johan+linaro@kernel.org> References: <20221209140150.1453-1-johan+linaro@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org In case a newly allocated IRQ ever ends up not having any associated struct irq_data it would not even be possible to dispose the mapping. Replace the bogus disposal with a WARN_ON(). Signed-off-by: Johan Hovold --- kernel/irq/irqdomain.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 8fe1da9614ee..bf67de1733ee 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -833,13 +833,8 @@ unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec) } irq_data = irq_get_irq_data(virq); - if (!irq_data) { - if (irq_domain_is_hierarchy(domain)) - irq_domain_free_irqs(virq, 1); - else - irq_dispose_mapping(virq); + if (WARN_ON(!irq_data)) return 0; - } /* Store trigger type */ irqd_set_trigger_type(irq_data, type);