From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 97863C3ABD8 for ; Fri, 16 May 2025 10:49:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uqdKxLcOWpdq+VWsLeelByvlPUml0U9nDHQrBTxofes=; b=0+XTpAoQE6B7ysSxDZ/MrL1fpt umEAlo8fs8hJz0sYTgxY+jBi6L1x20LGxsN7YeRs7hHQY+Z4LO2FvjcOUtD0YdjKtU5nBKTd+OaXA wwS02yDSRzIe/q1EYAjfeunE/LzFolssKf6nJoJZJQGqf5rdGh/ScxZov4PuPwrKgBeBdIIu0ewM6 swNdsx29+RdTrBZrZxoDfhnS1SKkAgnmyvoAlQM3MUzdm2YGpmRWHVVTtVwmbVV0u/XZ6mpuOvFmj 16ceNhLtBlqz8zlBdZJSPLac/OTDJkaEklFxLf+Fkt70SoeJjpaWuIB8l4W86R4VibBtoGvDNCVbg zLL6UUgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uFsct-00000003BHT-0BXs; Fri, 16 May 2025 10:49:15 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uFsar-00000003B2e-2RvD for linux-arm-kernel@lists.infradead.org; Fri, 16 May 2025 10:47:10 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 4037445246; Fri, 16 May 2025 10:47:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A729C4CEE4; Fri, 16 May 2025 10:47:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747392429; bh=wnlx75nUqVQTrziZstHIwtvkVh18itP172z7pvYH7/0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hI/LTokVQGuf/bVLK8oMBqtsGbr404Fi9ixRTDh/ICpHf5I1UHDkl3W4zut2SQQ4x /0kxG8ipFe0AfiEt0iVsxHh/+CooD/CnIU+/+O8HFCM+rOSdKqcqsRYqGHy4K8uFLG PUhV5RZKyE5++NPcrid2+1CmREHzLnGnKF/jCa+oVDIXLklJRlUu0Uo0ELx35MIFtZ 2zDisLNrG3Oky+l6Ml31I9xi68iAWsBm6REEXyrzBci0rMDpXfumllzJP9atv4jHU/ AARVr71OsdcW80D6VfxOyyvY350n/pAHnLv5IL1IHpk6ddO7t9wjjhUyt9ZHwtMmo2 NrTSoNMA8JPMg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1uFsao-00FWsh-OP; Fri, 16 May 2025 11:47:06 +0100 Date: Fri, 16 May 2025 11:47:05 +0100 Message-ID: <86cyc8g7di.wl-maz@kernel.org> From: Marc Zyngier To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Lorenzo Pieralisi , Krzysztof =?UTF-8?B?V2lsY3p5xYRza2k=?= , Manivannan Sadhasivam , Bjorn Helgaas , Toan Le , Alyssa Rosenzweig , Thierry Reding , Jonathan Hunter Subject: Re: [PATCH v2 3/9] irqchip/gic: Convert to msi_create_parent_irq_domain() helper In-Reply-To: <87h61kj10o.ffs@tglx> References: <20250513172819.2216709-1-maz@kernel.org> <20250513172819.2216709-4-maz@kernel.org> <87h61kj10o.ffs@tglx> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: tglx@linutronix.de, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, lpieralisi@kernel.org, kw@linux.com, manivannan.sadhasivam@linaro.org, bhelgaas@google.com, toan@os.amperecomputing.com, alyssa@rosenzweig.io, thierry.reding@gmail.com, jonathanh@nvidia.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250516_034709_659046_A490F229 X-CRM114-Status: GOOD ( 17.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 16 May 2025 11:36:07 +0100, Thomas Gleixner wrote: > > On Tue, May 13 2025 at 18:28, Marc Zyngier wrote: > > if (!v2m) > > return 0; > > > > - inner_domain = irq_domain_create_hierarchy(parent, 0, 0, v2m->fwnode, > > - &gicv2m_domain_ops, v2m); > > + inner_domain = msi_create_parent_irq_domain(&(struct irq_domain_info){ > > + .fwnode = v2m->fwnode, > > + .ops = &gicv2m_domain_ops, > > + .host_data = v2m, > > + .parent = parent, > > + }, &gicv2m_msi_parent_ops); > > + > > This really makes my eyes bleed. > > if (!v2m) > return 0; > > - inner_domain = irq_domain_create_hierarchy(parent, 0, 0, v2m->fwnode, > - &gicv2m_domain_ops, v2m); > + struct irq_domain_info info = { > + .fwnode = v2m->fwnode, > + .ops = &gicv2m_domain_ops, > + .host_data = v2m, > + .parent = parent, > + }; > + > + inner_domain = msi_create_parent_irq_domain(&info, &gicv2m_msi_parent_ops); > > That's too readable, right? > > No need to resend, I just hacked up a few lines of coccinelle script to > eliminate this offense. I personally find the rework much uglier than the original contraption. Variables declared in the middle of the code, Rust-style? Meh. But hey, your call. M. -- Without deviation from the norm, progress is not possible.