From nobody Tue Feb 10 18:36:07 2026 Received: from smtp.smtpout.orange.fr (smtp-19.smtpout.orange.fr [80.12.242.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F9E1148FF9 for ; Sun, 17 Nov 2024 09:50:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731837009; cv=none; b=K8/E+ylgT6seNZb4xuMt7WK967hQdCCykJ2oFZowI2tf83pcJXpjBd+T+sAorOeJqzH9/R6+KlAxZKQ3YZrKRZpB9zlTZPdOHv648Hr0EhHZUt1Jdk7ONPJDfHRN0GQXOKGI+0O06HI4Gx+Ilox4zyKNhjfnpVA4b/WMUOoeiyk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731837009; c=relaxed/simple; bh=X9Y7JAZ3FbOLMBkyjTswSpqphJew9Ldv6/eGGkqKyNk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UvUWXwUNWEXflpgJ5JLdKsRLCmvz51RMBrpyG4q7swnifhh+lXwSj612DA37TSjV2+mGwwo/S30kntGtE5OgZXbNpMqtfGYFW9Hp7MciXwJ/l7WplQjSfm3o2R1Unvw/5KUxfPxv4H0s87tIPT0HjR/2QzEnYOYFUx/+DKN/7CU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=m6GIGMCt; arc=none smtp.client-ip=80.12.242.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="m6GIGMCt" Received: from localhost.localdomain ([90.11.132.44]) by smtp.orange.fr with ESMTPA id Cbuot94NAgiuVCbuvtxsbD; Sun, 17 Nov 2024 10:50:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1731837005; bh=8Gtx2UMzfe2JOWGIy9aObdGR+c7t6uLGErdFIPGS7r8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=m6GIGMCtCYY+JiumHhCAXbRqz8MmzurkEUIp7Dpf6pY0VGy3jMgeV8ANbwIX4mWqq HOAh1sRC+aGDgS8CtuudMHL467JUSz0GT6o+bZAIzaE7+Aa2ToNVIY28ztC6ZeBlwR djp6FTtziahkwHOkVZga0Rpo//fPe+IvbSNhXDX+PaOfqqdfJ8lA2OGIYqEbZLmbxC NXjvI0O+qktvKgtB2sc+Cu4dSsE7qRMW4fQbVmE6v4DoPpJKoRg9quTA4HeHE5nMQL /JGGJP0ofXQSy1n/DeQK/x2Bl06gnr26bmlRyxb/bJ7Tno1irsS9eZ1PprjRyLmHLh u1fgijcceDcCg== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 17 Nov 2024 10:50:05 +0100 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 1/5] irqchip: Constify "struct irq_chip *" parameter in chained_irq_xxx() functions Date: Sun, 17 Nov 2024 10:49:43 +0100 Message-ID: X-Mailer: git-send-email 2.47.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" chained_irq_enter() and chained_irq_exit() don't modify their 'chip' parameter. So change the prototype of these functions to accept const struct irq_chip pointer. Signed-off-by: Christophe JAILLET --- Compile tested only --- include/linux/irqchip/chained_irq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/irqchip/chained_irq.h b/include/linux/irqchip/ch= ained_irq.h index dd8b3c476666..f248d63acfca 100644 --- a/include/linux/irqchip/chained_irq.h +++ b/include/linux/irqchip/chained_irq.h @@ -13,7 +13,7 @@ * Entry/exit functions for chained handlers where the primary IRQ chip * may implement either fasteoi or level-trigger flow control. */ -static inline void chained_irq_enter(struct irq_chip *chip, +static inline void chained_irq_enter(const struct irq_chip *chip, struct irq_desc *desc) { /* FastEOI controllers require no action on entry. */ @@ -29,7 +29,7 @@ static inline void chained_irq_enter(struct irq_chip *chi= p, } } =20 -static inline void chained_irq_exit(struct irq_chip *chip, +static inline void chained_irq_exit(const struct irq_chip *chip, struct irq_desc *desc) { if (chip->irq_eoi) --=20 2.47.0 From nobody Tue Feb 10 18:36:07 2026 Received: from smtp.smtpout.orange.fr (smtp-19.smtpout.orange.fr [80.12.242.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85C6515381A for ; Sun, 17 Nov 2024 09:50:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731837010; cv=none; b=Rm6fSOtJQ4x1nDhVE5KdBbH8Dy2YP2REaK5H88UgO4uvsNfs9v1585w2LkuT+iOG/iydq5S7zT2ALNdwlBtRIL73LzFhoX/cBK78JnSgeyPB2MDsh+o5c5gqUhpmsNVqtS0I7ttUXG2y54NFNb5ycyl79ZpfMWdPKekYIPikyDI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731837010; c=relaxed/simple; bh=pA7TaN3p9nKy8j+MvPXC090fJ5eTIAnoVE97fwH8th0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MVLg4NUyD599c/n79V3Qwqtu9nZdwfD6ulcsM7EqAmAqCb9aqzFJrybDF+he0rNmJtdcD1X6tMRLVcZfNIW7K8qjGrUkbIs7Upzr3jaAEFR4CfaWwsU8LNZgr8J2BfTg0kgAcy9qBdu0Yr8WS9D2zZUBpbpRWzOCuhDIrHcckuU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=ccZB7+in; arc=none smtp.client-ip=80.12.242.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="ccZB7+in" Received: from localhost.localdomain ([90.11.132.44]) by smtp.orange.fr with ESMTPA id Cbuot94NAgiuVCbuytxseA; Sun, 17 Nov 2024 10:50:08 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1731837008; bh=kcL0WDdTA3rv8TZTAKcOQMiAGV8Z4dLx/jU6aWvfVXk=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=ccZB7+inssfijFkcKqZ8BrWjwQ4GZKNjUi/kCz1bmQ0NOlMM3PKQGP0MWvL2bTBLA BVENrFLQYlcWz+Efbw/EERihIqa2wJEipdypsDENp5XqZDOw9KzWjFuIJBfB8uM5Tt L2298VkWDxuAmh5PVGquVtFAAadYgV+wCi3JYBKs+w66GqaZaRkqKK9LJbTrtEOVMs 5Y1ymD/89JhM9cY+dKvCWZKv7QxbxlUcxyXHeuawJI8Gskr8ny6gZb1TvwX2AmHR9k HSeG6BvyvGFOhUCyk2saAa8eateHJ8i44UjQONkUZDw1hkSPqhG+g6UjROUXrrSAvz ybEWjX1f3WH/g== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 17 Nov 2024 10:50:08 +0100 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 2/5] irqchip: Constify "struct irq_chip *" parameter in cond_unmask_eoi_irq() Date: Sun, 17 Nov 2024 10:49:44 +0100 Message-ID: X-Mailer: git-send-email 2.47.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" cond_unmask_eoi_irq() doesn't modify its 'chip' parameter. So change the prototype of this function to accept const struct irq_chip pointer. Signed-off-by: Christophe JAILLET --- Compile tested only --- kernel/irq/chip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 271e9139de77..502133dc3b9c 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -654,7 +654,8 @@ void handle_level_irq(struct irq_desc *desc) } EXPORT_SYMBOL_GPL(handle_level_irq); =20 -static void cond_unmask_eoi_irq(struct irq_desc *desc, struct irq_chip *ch= ip) +static void cond_unmask_eoi_irq(struct irq_desc *desc, + const struct irq_chip *chip) { if (!(desc->istate & IRQS_ONESHOT)) { chip->irq_eoi(&desc->irq_data); --=20 2.47.0 From nobody Tue Feb 10 18:36:07 2026 Received: from smtp.smtpout.orange.fr (smtp-19.smtpout.orange.fr [80.12.242.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3233D170A14 for ; Sun, 17 Nov 2024 09:50:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731837013; cv=none; b=HQMSnhophpUbu47sMoUtpaV//P6QuopgB6NAA9hmF+86BZwLhZ2zq3MoEMTexPIoxK9duxsulgO4BYFaYWqY+w+FzNq+M2lqZx4wyrnjSBHay9SaqgF1SPNJQHh5W/wJGZpFTbsIzSOgTlRAUIipcHKRKsACpiOPbaqVEZipMrI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731837013; c=relaxed/simple; bh=9Kst35gF+Fkh4yvQc1AWO/RI2mr37uedH3L5pEKEDMU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YRFyShY6GIxOwbq7Xv18/4PkKSQxVxGfvwJRS94qUDD+Pz6FK8uynG2bjALsBBpYd+R5J1fbwqKoi3DECT0k5VtlPhooPvDoah3w0j+IAujz0+odDCfFOo0n5E4/joKvf/KjC1Qr2Fr6RsZ4AmiD6wOf4tnLWoFYLp+Ub8lzmkc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=I/tKalom; arc=none smtp.client-ip=80.12.242.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="I/tKalom" Received: from localhost.localdomain ([90.11.132.44]) by smtp.orange.fr with ESMTPA id Cbuot94NAgiuVCbv0txsgW; Sun, 17 Nov 2024 10:50:11 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1731837011; bh=hTR37BrRxIlVJQOJ1ST4RPppeQ5fbJDKWyDmhu0C03k=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=I/tKalomk4oNHFGaLKEbT/U1CZ+SpPZI0rJiuRQaQ4ElU2g2iyc8lnI8e9gs8mhvv lcI63JsgyktTFLLMRwHD5DTSgZ3Vb24g4XKjf470+bQx+6p/S3ZcIM64KrryDGAAXm mY45aNiT/OGkKR6nHtBOHHph24Y350WeJ5F2cGzDryKckMsRshf2PmE4scoekxgGKv jfvj2og77OIuzo9xSCIOwjYRS7p1GdMLm/VSkvLEIbssX54Aw1ODLaxku3qd8twQKD sQ45Ve9a7srVjm4dFE81UmRyo4BAO7CflSAgHoSbm/+Nd82PZCCMXBJrtrjNzgU+Vd jZVuPRvOnTT2w== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 17 Nov 2024 10:50:11 +0100 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 3/5] irqchip: Constify some direct access to irq_data->chip Date: Sun, 17 Nov 2024 10:49:45 +0100 Message-ID: <99871d898c2ff0023895d15169ca4c78c90d225a.1731835733.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.47.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When the 'chip' member of struct irq_data will be turned into a const struct irq_chip, the const qualifier will be needed for local variables that keep a reference to this field. So start to add some of these const qualifiers. Signed-off-by: Christophe JAILLET --- Compile tested only --- kernel/irq/chip.c | 8 ++++---- kernel/irq/debugfs.c | 2 +- kernel/irq/manage.c | 10 +++++----- kernel/irq/migration.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 502133dc3b9c..eca39c4dd094 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -442,7 +442,7 @@ void unmask_irq(struct irq_desc *desc) =20 void unmask_threaded_irq(struct irq_desc *desc) { - struct irq_chip *chip =3D desc->irq_data.chip; + const struct irq_chip *chip =3D desc->irq_data.chip; =20 if (chip->flags & IRQCHIP_EOI_THREADED) chip->irq_eoi(&desc->irq_data); @@ -687,7 +687,7 @@ static void cond_unmask_eoi_irq(struct irq_desc *desc, */ void handle_fasteoi_irq(struct irq_desc *desc) { - struct irq_chip *chip =3D desc->irq_data.chip; + const struct irq_chip *chip =3D desc->irq_data.chip; =20 raw_spin_lock(&desc->lock); =20 @@ -1212,7 +1212,7 @@ void irq_cpu_offline(void) */ void handle_fasteoi_ack_irq(struct irq_desc *desc) { - struct irq_chip *chip =3D desc->irq_data.chip; + const struct irq_chip *chip =3D desc->irq_data.chip; =20 raw_spin_lock(&desc->lock); =20 @@ -1263,7 +1263,7 @@ EXPORT_SYMBOL_GPL(handle_fasteoi_ack_irq); */ void handle_fasteoi_mask_irq(struct irq_desc *desc) { - struct irq_chip *chip =3D desc->irq_data.chip; + const struct irq_chip *chip =3D desc->irq_data.chip; =20 raw_spin_lock(&desc->lock); mask_ack_irq(desc); diff --git a/kernel/irq/debugfs.c b/kernel/irq/debugfs.c index c6ffb97966be..c9c1c28be1a9 100644 --- a/kernel/irq/debugfs.c +++ b/kernel/irq/debugfs.c @@ -58,7 +58,7 @@ static const struct irq_bit_descr irqchip_flags[] =3D { static void irq_debug_show_chip(struct seq_file *m, struct irq_data *data, int ind) { - struct irq_chip *chip =3D data->chip; + const struct irq_chip *chip =3D data->chip; =20 if (!chip) { seq_printf(m, "chip: None\n"); diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index f0803d6bd296..e7f548bc976b 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -958,7 +958,7 @@ int can_request_irq(unsigned int irq, unsigned long irq= flags) =20 int __irq_set_trigger(struct irq_desc *desc, unsigned long flags) { - struct irq_chip *chip =3D desc->irq_data.chip; + const struct irq_chip *chip =3D desc->irq_data.chip; int ret, unmask =3D 0; =20 if (!chip || !chip->irq_set_type) { @@ -1407,7 +1407,7 @@ static int irq_setup_forced_threading(struct irqactio= n *new) static int irq_request_resources(struct irq_desc *desc) { struct irq_data *d =3D &desc->irq_data; - struct irq_chip *c =3D d->chip; + const struct irq_chip *c =3D d->chip; =20 return c->irq_request_resources ? c->irq_request_resources(d) : 0; } @@ -1415,7 +1415,7 @@ static int irq_request_resources(struct irq_desc *des= c) static void irq_release_resources(struct irq_desc *desc) { struct irq_data *d =3D &desc->irq_data; - struct irq_chip *c =3D d->chip; + const struct irq_chip *c =3D d->chip; =20 if (c->irq_release_resources) c->irq_release_resources(d); @@ -1440,7 +1440,7 @@ static bool irq_supports_nmi(struct irq_desc *desc) static int irq_nmi_setup(struct irq_desc *desc) { struct irq_data *d =3D irq_desc_get_irq_data(desc); - struct irq_chip *c =3D d->chip; + const struct irq_chip *c =3D d->chip; =20 return c->irq_nmi_setup ? c->irq_nmi_setup(d) : -EINVAL; } @@ -1448,7 +1448,7 @@ static int irq_nmi_setup(struct irq_desc *desc) static void irq_nmi_teardown(struct irq_desc *desc) { struct irq_data *d =3D irq_desc_get_irq_data(desc); - struct irq_chip *c =3D d->chip; + const struct irq_chip *c =3D d->chip; =20 if (c->irq_nmi_teardown) c->irq_nmi_teardown(d); diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c index eb150afd671f..fff2d9cd0239 100644 --- a/kernel/irq/migration.c +++ b/kernel/irq/migration.c @@ -39,7 +39,7 @@ void irq_move_masked_irq(struct irq_data *idata) { struct irq_desc *desc =3D irq_data_to_desc(idata); struct irq_data *data =3D &desc->irq_data; - struct irq_chip *chip =3D data->chip; + const struct irq_chip *chip =3D data->chip; =20 if (likely(!irqd_is_setaffinity_pending(data))) return; --=20 2.47.0 From nobody Tue Feb 10 18:36:07 2026 Received: from smtp.smtpout.orange.fr (smtp-19.smtpout.orange.fr [80.12.242.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7ED3D17DE36 for ; Sun, 17 Nov 2024 09:50:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731837014; cv=none; b=Cx1dNq+3LUtPFU0G67o2f9Xfc7+/gyAKivCe7oejClDK1P4iVMOVPvdX5vJ2eOn5Xqo0N0mRgSzTUiCnfjHgOupURehuk/YHAJCflcudD5vrYVJcR1muC8gTuRGHzf4Koah9TpaGQafnbQoH0VIHcUPC9bPVZbIEOVijcUSyea8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731837014; c=relaxed/simple; bh=YItoIAOS0SMmhYS9IXyLsbxI586VpFxrOh+FXt2aOoA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rgf2YLyAo560QafwHZ/YcakhHac2jijl8s0onreRwYRtT1esPvSuT78tRtecsJsvTg9xu8Lcjj9bRvgolP4Czf01MMvrCzK+52kuqn3hT1FKmyxQiWIbiqOxd2gbc+SLPc7FHjHtqm+G3i0w++ud9GQvX/F99M26QwHvcWoTMEY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=S7RQDUAF; arc=none smtp.client-ip=80.12.242.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="S7RQDUAF" Received: from localhost.localdomain ([90.11.132.44]) by smtp.orange.fr with ESMTPA id Cbuot94NAgiuVCbv2txshp; Sun, 17 Nov 2024 10:50:12 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1731837012; bh=QsFY+oFBT/L9WpTZKsV7kPeliUrBcejT52WMrTeVP3Q=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=S7RQDUAF7ya1otQt2aqeiM6QmAnQ/bWuKsMo5ZK8PaJd3XdDhh4g2VOdmJJb5loVu gpesMNOvf2RAZ1Yq736C0f+MBvsct6oGvp9rE8D/3fk7YoEu3cEiZNfkPLsFo/ACTt ruB6ZU7ATRscZaqU8T6xLCScOBb1W2atYUjxIw2CjXaGCtdSKaIRsl+M+awQEvVZ+G D/hMemT/nl8MJwXLVadOKILBLGP1K/+sHE8ayD5eZrDSE7YnlLCnszYydCAQW7n25A qGZm9oso1ZLX2e7MVlTX0fpllcyWp3bSwjk0nTK16cMvmB8Txk6bOWWjeZNW4cyRdq 1LjuPlNpAbIBA== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 17 Nov 2024 10:50:12 +0100 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 4/5] irqchip: Constify some irq_desc_get_chip() usage Date: Sun, 17 Nov 2024 10:49:46 +0100 Message-ID: X-Mailer: git-send-email 2.47.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When irq_desc_get_chip() will return a const struct irq_chip, the const qualifier will be needed for local variables that store the return value of this function. So start to add some of these const qualifiers. Signed-off-by: Christophe JAILLET --- Compile tested only --- kernel/irq/chip.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index eca39c4dd094..d3acccf7e2e2 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -751,7 +751,7 @@ EXPORT_SYMBOL_GPL(handle_fasteoi_irq); */ void handle_fasteoi_nmi(struct irq_desc *desc) { - struct irq_chip *chip =3D irq_desc_get_chip(desc); + const struct irq_chip *chip =3D irq_desc_get_chip(desc); struct irqaction *action =3D desc->action; unsigned int irq =3D irq_desc_get_irq(desc); irqreturn_t res; @@ -849,7 +849,7 @@ EXPORT_SYMBOL(handle_edge_irq); */ void handle_edge_eoi_irq(struct irq_desc *desc) { - struct irq_chip *chip =3D irq_desc_get_chip(desc); + const struct irq_chip *chip =3D irq_desc_get_chip(desc); =20 raw_spin_lock(&desc->lock); =20 @@ -894,7 +894,7 @@ void handle_edge_eoi_irq(struct irq_desc *desc) */ void handle_percpu_irq(struct irq_desc *desc) { - struct irq_chip *chip =3D irq_desc_get_chip(desc); + const struct irq_chip *chip =3D irq_desc_get_chip(desc); =20 /* * PER CPU interrupts are not serialized. Do not touch @@ -924,7 +924,7 @@ void handle_percpu_irq(struct irq_desc *desc) */ void handle_percpu_devid_irq(struct irq_desc *desc) { - struct irq_chip *chip =3D irq_desc_get_chip(desc); + const struct irq_chip *chip =3D irq_desc_get_chip(desc); struct irqaction *action =3D desc->action; unsigned int irq =3D irq_desc_get_irq(desc); irqreturn_t res; @@ -967,7 +967,7 @@ void handle_percpu_devid_irq(struct irq_desc *desc) */ void handle_percpu_devid_fasteoi_nmi(struct irq_desc *desc) { - struct irq_chip *chip =3D irq_desc_get_chip(desc); + const struct irq_chip *chip =3D irq_desc_get_chip(desc); struct irqaction *action =3D desc->action; unsigned int irq =3D irq_desc_get_irq(desc); irqreturn_t res; --=20 2.47.0 From nobody Tue Feb 10 18:36:07 2026 Received: from smtp.smtpout.orange.fr (smtp-19.smtpout.orange.fr [80.12.242.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E760188906 for ; Sun, 17 Nov 2024 09:50:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731837017; cv=none; b=QauXIYiRb+xXpVmIDKgNOGmVraVQ/Iaur+Y9Mmj5GGx3zj11KkDjzeNRu92gldfe7JQuZOhXSl2DNMQ3MUulHI/Wr6jr2nxsLspjHpAdA1ObzxyalNcyyw9pU09dN1UUVWxYQLgkaI5cbVU2GJ2fTvHFv3Et8wxpzJxBDyGnFOU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731837017; c=relaxed/simple; bh=VIWlpCQZr5s42IrRQMG8HvlS2IyT4vl4I34GslmqBfI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kJVrvuUF6JtKiAOefDvzgudrJGQzfxt5lvCy9VkmLzRDU0Av+1rFJ9jp5stv7PzsfrFInT2fRusKXbKWLLoyapZlSWfvfjxLeVA9hRne8bJnvSXbCoguq9apkLfuGK2L+F1xutBnKNYhna1wjRCkdssPnON3TbtjgKoxFss/2xE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=mBP6KyPU; arc=none smtp.client-ip=80.12.242.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="mBP6KyPU" Received: from localhost.localdomain ([90.11.132.44]) by smtp.orange.fr with ESMTPA id Cbuot94NAgiuVCbv3txsjg; Sun, 17 Nov 2024 10:50:14 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1731837014; bh=9J3BipkXAD9q0ylgi+Wg4usr8m6odHLbDpmH9jlLsLs=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=mBP6KyPUtkyZ+0PZ7/qAdeBd5u+nsXOhAds/pgmx+S9IlwLEhD3GLMJ52F6uOvLep 6EA5GbxjUBTEQueLZn/rvmAi/g0kXMt1HFvdYgdNnjIFZpPLqQTpdjkThRaOI1gU2U NCQbKTH98fdYULfm+xZhXA4GRWGr5zQteiTsh5a+Jp1FvXLYc9AeWJ5PazdYO+6zXc Bs7Nyy60dJfjVXT5NCoFsUr3VpI0n/U6oKk4qHo+mfYNVhlaZqFXZiXYFnAaA1NhwL Vu813LVRUxoTAyvYFv6IbXU+SBcVYq6pJflSX3I0qG8L+/9ufZQTahAJJb9knr8Shl JtIyxy3sJG7vw== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 17 Nov 2024 10:50:14 +0100 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 5/5] irqchip: Constify some irq_data_get_irq_chip() usage Date: Sun, 17 Nov 2024 10:49:47 +0100 Message-ID: <98dd8f88c7dd11474925b65b6bd6e34f1be7198f.1731835733.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.47.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When irq_data_get_irq_chip() will return a const struct irq_chip, the const qualifier will be needed for local variables that store the return value of this function. So start to add some of these const qualifiers. Signed-off-by: Christophe JAILLET --- Compile tested only --- kernel/irq/chip.c | 4 ++-- kernel/irq/cpuhotplug.c | 2 +- kernel/irq/manage.c | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index d3acccf7e2e2..2d540884ca05 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -1145,7 +1145,7 @@ EXPORT_SYMBOL_GPL(irq_modify_status); void irq_cpu_online(void) { struct irq_desc *desc; - struct irq_chip *chip; + const struct irq_chip *chip; unsigned long flags; unsigned int irq; =20 @@ -1175,7 +1175,7 @@ void irq_cpu_online(void) void irq_cpu_offline(void) { struct irq_desc *desc; - struct irq_chip *chip; + const struct irq_chip *chip; unsigned long flags; unsigned int irq; =20 diff --git a/kernel/irq/cpuhotplug.c b/kernel/irq/cpuhotplug.c index 15a7654eff68..dbfa7d63438f 100644 --- a/kernel/irq/cpuhotplug.c +++ b/kernel/irq/cpuhotplug.c @@ -53,7 +53,7 @@ static inline bool irq_needs_fixup(struct irq_data *d) static bool migrate_one_irq(struct irq_desc *desc) { struct irq_data *d =3D irq_desc_get_irq_data(desc); - struct irq_chip *chip =3D irq_data_get_irq_chip(d); + const struct irq_chip *chip =3D irq_data_get_irq_chip(d); bool maskchip =3D !irq_can_move_pcntxt(d) && !irqd_irq_masked(d); const struct cpumask *affinity; bool brokeaff =3D false; diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index e7f548bc976b..dfe184218cc2 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -207,7 +207,7 @@ void irq_set_thread_affinity(struct irq_desc *desc) static void irq_validate_effective_affinity(struct irq_data *data) { const struct cpumask *m =3D irq_data_get_effective_affinity_mask(data); - struct irq_chip *chip =3D irq_data_get_irq_chip(data); + const struct irq_chip *chip =3D irq_data_get_irq_chip(data); =20 if (!cpumask_empty(m)) return; @@ -225,7 +225,7 @@ int irq_do_set_affinity(struct irq_data *data, const st= ruct cpumask *mask, { struct cpumask *tmp_mask =3D this_cpu_ptr(&__tmp_mask); struct irq_desc *desc =3D irq_data_to_desc(data); - struct irq_chip *chip =3D irq_data_get_irq_chip(data); + const struct irq_chip *chip =3D irq_data_get_irq_chip(data); const struct cpumask *prog_mask; int ret; =20 @@ -353,7 +353,7 @@ static bool irq_set_affinity_deactivated(struct irq_dat= a *data, int irq_set_affinity_locked(struct irq_data *data, const struct cpumask *m= ask, bool force) { - struct irq_chip *chip =3D irq_data_get_irq_chip(data); + const struct irq_chip *chip =3D irq_data_get_irq_chip(data); struct irq_desc *desc =3D irq_data_to_desc(data); int ret =3D 0; =20 @@ -658,7 +658,7 @@ int irq_set_vcpu_affinity(unsigned int irq, void *vcpu_= info) unsigned long flags; struct irq_desc *desc =3D irq_get_desc_lock(irq, &flags, 0); struct irq_data *data; - struct irq_chip *chip; + const struct irq_chip *chip; int ret =3D -ENOSYS; =20 if (!desc) @@ -2799,7 +2799,7 @@ void teardown_percpu_nmi(unsigned int irq) int __irq_get_irqchip_state(struct irq_data *data, enum irqchip_irq_state = which, bool *state) { - struct irq_chip *chip; + const struct irq_chip *chip; int err =3D -EINVAL; =20 do { @@ -2871,7 +2871,7 @@ int irq_set_irqchip_state(unsigned int irq, enum irqc= hip_irq_state which, { struct irq_desc *desc; struct irq_data *data; - struct irq_chip *chip; + const struct irq_chip *chip; unsigned long flags; int err =3D -EINVAL; =20 --=20 2.47.0