lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86cyc8g7di.wl-maz@kernel.org>
Date: Fri, 16 May 2025 11:47:05 +0100
From: Marc Zyngier <maz@...nel.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-kernel@...r.kernel.org,	linux-arm-kernel@...ts.infradead.org,
	linux-pci@...r.kernel.org,	Andrew Lunn <andrew@...n.ch>,	Gregory Clement
 <gregory.clement@...tlin.com>,	Sebastian Hesselbarth
 <sebastian.hesselbarth@...il.com>,	Lorenzo Pieralisi
 <lpieralisi@...nel.org>,	Krzysztof WilczyƄski
 <kw@...ux.com>,	Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,	Toan Le <toan@...amperecomputing.com>,
	Alyssa Rosenzweig <alyssa@...enzweig.io>,	Thierry Reding
 <thierry.reding@...il.com>,	Jonathan Hunter <jonathanh@...dia.com>
Subject: Re: [PATCH v2 3/9] irqchip/gic: Convert to msi_create_parent_irq_domain() helper

On Fri, 16 May 2025 11:36:07 +0100,
Thomas Gleixner <tglx@...utronix.de> 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ