From nobody Mon Dec 15 21:21:23 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 8838928980E; Wed, 7 May 2025 13:44:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746625452; cv=none; b=a7Md6sMTP5yGLNVf1/kd680v3usotaRVsjO2zzkH5d1lbrT8r/bUjnD2SbjzAAEOOJX1GNynoRXJa1TfeAxxTfJpKaMwHLTqORxAxGR3Y7Jo26XDXlD9PVeE+6GKmYZZeESZ+ghlf9fUvg0IVZRcN3eU/UBB8donjEPGyb4NJOc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746625452; c=relaxed/simple; bh=1nR16CNZvr1AMWDPgZRjUwVbH4QpJQO7XEyG6sb08N0=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=gfTq6CpYPRUhJMYovS5MltOiEEHIy5GjsOGPh3vuKrW7jGdom8AKRqFbl++KC1DKszU1WtcfDQdzCU2aM29BIlwdqg+O+ObZqGnIORxtuJlwo6AmeTsMY403yMqPWhO5CtSSK1AtN7VpihjzigZaSc2RszNXdJ1Xp5NrxYf1tPA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=i3MD4drV; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=iXfZUREE; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="i3MD4drV"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="iXfZUREE" Date: Wed, 07 May 2025 13:44:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1746625448; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qUA2S9WGpVAFNBUghrFAPqjCvkRLj3NeOQQ/D+ogkKc=; b=i3MD4drVv2W62L5cXWDrLcM/tLdmPZrEYr/YNvf0FAKdaMAar25wjW9ZpUZP/oyKV+qhcd 4MHodS4/DYA0QZ+VTPOwnYwlxqxio5rIBzJfuWOgkuYxkhCDPGlo7hNajENuBmd9Kmv4YD ExPDvU2bCt+K9xaenbMg+o6bSXrHuc49GmE7Pg8rk9KFoA0wg4huQ0KfOr1EiUgE81ce7m COegLRycdX3H7xGAcd2c/XCwe4IvkiRZ27XXrXIzS8cas17quc0Oq2oG85GCk00rSa1iRB E/M2XEuM9RDgzD5UYd36K8v1JpaWLeASXuvo8/1FmwTY0vqpp+W4GJxAUaqXpQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1746625448; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qUA2S9WGpVAFNBUghrFAPqjCvkRLj3NeOQQ/D+ogkKc=; b=iXfZUREEYorc4Gg75TN7zTucXUCzb/3BMh8/snR/T3qcGrEF3IIpRl4Dorw7fFI7HsqmIb qW0HAFxySxpbPJCg== From: "tip-bot2 for Jiri Slaby (SUSE)" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/cleanups] irqdomain: Use irq_domain_instantiate()'s return value as initializers Cc: "Jiri Slaby (SUSE)" , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20250319092951.37667-51-jirislaby@kernel.org> References: <20250319092951.37667-51-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <174662544803.406.16920661410260566750.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the irq/cleanups branch of tip: Commit-ID: d42b432f05c255ddead54dd44adaaf8886c2eed3 Gitweb: https://git.kernel.org/tip/d42b432f05c255ddead54dd44adaaf888= 6c2eed3 Author: Jiri Slaby (SUSE) AuthorDate: Wed, 19 Mar 2025 10:29:43 +01:00 Committer: Thomas Gleixner CommitterDate: Wed, 07 May 2025 15:39:42 +02:00 irqdomain: Use irq_domain_instantiate()'s return value as initializers This makes the code more compact. Note that irq_domain_create_hierarchy()'s handling of size is now part of info's initializer (using the ternary operator). That makes more sense while reading it. Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-51-jirislaby@kernel.= org --- include/linux/irqdomain.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index c8e55cd..1e38584 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -403,9 +403,8 @@ static inline struct irq_domain *irq_domain_create_noma= p(struct fwnode_handle *f .ops =3D ops, .host_data =3D host_data, }; - struct irq_domain *d; + struct irq_domain *d =3D irq_domain_instantiate(&info); =20 - d =3D irq_domain_instantiate(&info); return IS_ERR(d) ? NULL : d; } =20 @@ -424,9 +423,8 @@ static inline struct irq_domain *irq_domain_create_line= ar(struct fwnode_handle * .ops =3D ops, .host_data =3D host_data, }; - struct irq_domain *d; + struct irq_domain *d =3D irq_domain_instantiate(&info); =20 - d =3D irq_domain_instantiate(&info); return IS_ERR(d) ? NULL : d; } =20 @@ -440,9 +438,8 @@ static inline struct irq_domain *irq_domain_create_tree= (struct fwnode_handle *fw .ops =3D ops, .host_data =3D host_data, }; - struct irq_domain *d; + struct irq_domain *d =3D irq_domain_instantiate(&info); =20 - d =3D irq_domain_instantiate(&info); return IS_ERR(d) ? NULL : d; } =20 @@ -554,18 +551,14 @@ static inline struct irq_domain *irq_domain_create_hi= erarchy(struct irq_domain * struct irq_domain_info info =3D { .fwnode =3D fwnode, .size =3D size, - .hwirq_max =3D size, + .hwirq_max =3D size ? : ~0U, .ops =3D ops, .host_data =3D host_data, .domain_flags =3D flags, .parent =3D parent, }; - struct irq_domain *d; + struct irq_domain *d =3D irq_domain_instantiate(&info); =20 - if (!info.size) - info.hwirq_max =3D ~0U; - - d =3D irq_domain_instantiate(&info); return IS_ERR(d) ? NULL : d; }