From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE0F2481C4; Fri, 16 May 2025 10:47:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747392429; cv=none; b=qgMXKKmFcWkK1UwzL4XYjIttydPIjoT/0J+WpbzUm+hJolCcC/I77skgWEyjpDC/Ip1IqXEXAs7E4QY7m3e398iU7Vjx4h3hBLA5/+/LW4uBo1TWY6zIOr6oJY4a60aSsHpVKUdkgAhCNjxu55LqAn900Q69G3D3J63+k2SS8VQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747392429; c=relaxed/simple; bh=wnlx75nUqVQTrziZstHIwtvkVh18itP172z7pvYH7/0=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=pPw28bnn734KB0zyKHptBv2wX9w9hXhps57g6GuVduWn58RLGo+Hp5jrTjELYJF6OQ/s9aqzHAcPoA9yyYj6h4fYiIamrVY8t1230O+IwLVk+p11K194QZPluJ7r3hlP0GRHnyWWE1lyHqGwGAQDHEOISVhw2k/A+57iA8+p0cA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hI/LTokV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hI/LTokV" 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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.