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: 31758 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp794751wrr; Fri, 9 Dec 2022 06:07:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf4MZ92NaM29JfDC8Oe5orlA3k23qkhdDgrUeBcKVqYTKUIV40E4DunMQsEEKI3oMrWC7a4X X-Received: by 2002:a05:6a00:796:b0:577:3523:bd23 with SMTP id g22-20020a056a00079600b005773523bd23mr6270242pfu.27.1670594820906; Fri, 09 Dec 2022 06:07:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670594820; cv=none; d=google.com; s=arc-20160816; b=sYqR8g5BgkkUZKEe2CcOmCXcjGoo2zjFa3mFWW8f3Sp0Ao1/9QpFCIovLS5znGkxGt jXIVdc6b2TymGo/Arsd+9p6l/5fhofRMjrF4g/6WH2XzzCv0K4zEnmPjiXniPa/mVeU9 s/y8wI8Gyc7gd1i4kyexHy6GHGFbPhp7zRlDW0QnOe80+LprXyN6z65kRvcIfRUtOzsD 96oDMunnc4BoGhsY/30z+QfpCsRC5QFaAoiJQXkqxjKea42heQav6HrEZ2MT/Dk/ZgFn uLLXQuvy73iVycRBVzIK7Ma3Njww48yBGO/QKjg3vN/8S0sp+aEVywEh8lcnVppvuQIz zKlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cfpn2uEv/U9rQisqF9KvtRm3pdOi4ugASYEUzdAKdno=; b=Had1YPHsLXXN5ERmgekiMSAWnE2kIBi2SGe1tpPOFlubHyPfmDZ5P6qjqYYjX7gjl1 p/mbN4tUH+2yfp+EudCq3a4l2YqAbCaMam1McHRkfOFBksY0M/rZ/swSXdXU64VLU0z4 9/t1Bm8CvEEL80c4I48m9IktqlWA7ZW/8/O3GbFTnQF/qFgjjkbqZnzNdI68Da6h07aD +dB7yYRYnpbu58CrZrX+SI6X+McU0NudZYzboIGQ3ZnaIDkNqCJGQIxNoXteiuiGNNfk VfLqqVLIhBr1da596G5D9HZKVOX6ezXmuCDdVx0WopmUKWwwcMzuokUDAEk3YVbNbAvo Tqjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nSaWAlAU; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k8-20020a056a00168800b0056bffcfc30csi1786744pfc.249.2022.12.09.06.06.38; Fri, 09 Dec 2022 06:07:00 -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=@kernel.org header.s=k20201202 header.b=nSaWAlAU; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229982AbiLIOFY (ORCPT + 99 others); Fri, 9 Dec 2022 09:05:24 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751745634806816126?= X-GMAIL-MSGID: =?utf-8?q?1751745634806816126?= 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);