Message ID | 20230116135044.14998-4-johan+linaro@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1202627wrn; Mon, 16 Jan 2023 05:53:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXvSH87t4xTChu6cTLLI551geYKtBYyZ77FzyhWzWGTHu6w3Q7KQHzOmHDbvtlECTZK1ZGy6 X-Received: by 2002:a17:906:824f:b0:820:4046:1586 with SMTP id f15-20020a170906824f00b0082040461586mr11602092ejx.12.1673877224385; Mon, 16 Jan 2023 05:53:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673877224; cv=none; d=google.com; s=arc-20160816; b=uB2nHo8Fz7rUTXkCawYKhltaKm1ujmpgygHwbP1zAfmV9H05KH/1umm5dPaSHHeEdK SfmQJqJjWE9DdUFoEs7ZkvBLvQbGYQJlk1Emy3q3ioU7Jm3w+VRG2OLNNyP9P8pcZrrL wFWqFJ0iHnMxFLR2zDTD5MZbdCcehbuuoMyDVVNS6cdg15wiPejvd5Uc81GIWQTZ5JKT XNBvzJ6JyLjdr9i0GQ8+4u+Pma+9oHV5cNmgZv7laDtZM7x6zYpt4kG1OYDLxx8oz/V5 IAAz59zdtiEwp2rG+N96gpV1FzEQfEkLrmTuYAfnFdd6TVJPaVHfSOmVWCLXqzy+w+Gd cz2Q== 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=mYbAzJXrxfAZnjaIWvIzsJ1n+rVah/cW/98c2lAE80Y=; b=y0FzpPA1WNoQlcyjU1K8iHs4v831EomiEz09cN8GgMrwO71mM45q/971TuzDijoWx4 nk8RXAmnrzh2yQErRe0EuS5FVyNAaUXeJa0Fj/gMeHqfib7vydn/iwGzwRFqpLskYQuf vEylZamHpGheAF0YipQGvZNAVG+Jlb892XOhp3VGO3+lHKa7fKiJ4SSUIl9x+omeGeq7 cVHev7pMBhRVsWL4NH/nOTgiSl0K2kskkPL5WdheuyPIwL1Ujqo9Hcidsn1EESWzFuuX DXg93/55+qtKcOHZeYlrnv8YAjYagg3pp3US1r29P1+c5/IzkxxvwU9dSfXujeelJUl9 R7Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MCQANLu5; 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 gn3-20020a1709070d0300b008546dd18d16si22743643ejc.51.2023.01.16.05.53.20; Mon, 16 Jan 2023 05:53:44 -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=MCQANLu5; 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 S230115AbjAPNvD (ORCPT <rfc822;stefanalexe802@gmail.com> + 99 others); Mon, 16 Jan 2023 08:51:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231425AbjAPNun (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 16 Jan 2023 08:50:43 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A315A21974; Mon, 16 Jan 2023 05:50:41 -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 3C52860FC7; Mon, 16 Jan 2023 13:50:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C0A8C433F2; Mon, 16 Jan 2023 13:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673877040; bh=Oycgtjbj5Je/2GUULN931D+KpOMY5u4TF17SbiYzKnc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MCQANLu5lUMIayX0woy6ZFaEDn1mFl7y9QyW1Zksz0ZsxxCzmLeChINV4ZcbsucPs Ukk1k03scIziJ1c+gqy9tkrjFAUh7QAS6YvpS0PHxe/wB4Lo4n/KVWVMYFrDGpgidr K/IxXlyPsyZJfS3JkiaeZnph0OIyrsfZbzb3a5p4I2xG2P2HW0uBgDPGjCpmu0vLnu Ibkye6ETKn8m5wN89rbhv5Ptq9gKhoUwYjayNOOcgoIE/H/a/4l85/PVIql8WytZu3 lEjQAkBxlXxZguotXXTPBUeLOaVnjx/3sMD/kN6APt40RaILS+IdfeXQ3pMmJrnToK hxvtjSydPg1oA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from <johan+linaro@kernel.org>) id 1pHPt5-0003uo-NM; Mon, 16 Jan 2023 14:50:59 +0100 From: Johan Hovold <johan+linaro@kernel.org> To: Marc Zyngier <maz@kernel.org>, Thomas Gleixner <tglx@linutronix.de> Cc: 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 <johan+linaro@kernel.org>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Hsin-Yi Wang <hsinyi@chromium.org>, Mark-PK Tsai <mark-pk.tsai@mediatek.com> Subject: [PATCH v4 03/19] irqdomain: Drop leftover brackets Date: Mon, 16 Jan 2023 14:50:28 +0100 Message-Id: <20230116135044.14998-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.38.2 In-Reply-To: <20230116135044.14998-1-johan+linaro@kernel.org> References: <20230116135044.14998-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755187484244537617?= X-GMAIL-MSGID: =?utf-8?q?1755187484244537617?= |
Series |
irqdomain: fix mapping race and clean up locking
|
|
Commit Message
Johan Hovold
Jan. 16, 2023, 1:50 p.m. UTC
Drop some unnecessary brackets that were left in place when the corresponding code was updated. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Hsin-Yi Wang <hsinyi@chromium.org> Tested-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> --- kernel/irq/irqdomain.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
Comments
On Mon, Jan 16 2023 at 14:50, Johan Hovold wrote: > Drop some unnecessary brackets that were left in place when the > corresponding code was updated. This is really the wrong patch order. Real fixes first, then the cleanups and cosmetics.
On Tue, Jan 17, 2023 at 10:19:02PM +0100, Thomas Gleixner wrote: > On Mon, Jan 16 2023 at 14:50, Johan Hovold wrote: > > Drop some unnecessary brackets that were left in place when the > > corresponding code was updated. > > This is really the wrong patch order. Real fixes first, then the > cleanups and cosmetics. Yeah, that's what I'd normally do. Perhaps I took Marc's: No, let's put the code in shape *first*, then add work on the locking, as it should make the patch simpler. Backports aren't my concern, really. https://lore.kernel.org/lkml/87v8rhwf9r.wl-maz@kernel.org/ too literally. Johan
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index fe9ec53fe7aa..dfd60bd49109 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -219,9 +219,8 @@ struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, unsigned int s domain->host_data = host_data; domain->hwirq_max = hwirq_max; - if (direct_max) { + if (direct_max) domain->flags |= IRQ_DOMAIN_FLAG_NO_MAP; - } domain->revmap_size = size; @@ -615,9 +614,8 @@ void irq_domain_associate_many(struct irq_domain *domain, unsigned int irq_base, pr_debug("%s(%s, irqbase=%i, hwbase=%i, count=%i)\n", __func__, of_node_full_name(of_node), irq_base, (int)hwirq_base, count); - for (i = 0; i < count; i++) { + for (i = 0; i < count; i++) irq_domain_associate(domain, irq_base + i, hwirq_base + i); - } } EXPORT_SYMBOL_GPL(irq_domain_associate_many);