[PATCH] irqchip/qcom-irq-combiner: Rename driver structure

Johan Hovold posted 1 patch 3 months, 3 weeks ago
There is a newer version of this series
drivers/irqchip/qcom-irq-combiner.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] irqchip/qcom-irq-combiner: Rename driver structure
Posted by Johan Hovold 3 months, 3 weeks ago
The "_probe" suffix of the driver structure name prevents modpost from
warning about section mismatches so replace it to catch any future
issues like the recently fixed probe function being incorrectly marked
as __init.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/irqchip/qcom-irq-combiner.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/qcom-irq-combiner.c b/drivers/irqchip/qcom-irq-combiner.c
index 9308088773be..09819007d08e 100644
--- a/drivers/irqchip/qcom-irq-combiner.c
+++ b/drivers/irqchip/qcom-irq-combiner.c
@@ -266,11 +266,11 @@ static const struct acpi_device_id qcom_irq_combiner_ids[] = {
 	{ }
 };
 
-static struct platform_driver qcom_irq_combiner_probe = {
+static struct platform_driver qcom_irq_combiner_driver = {
 	.driver = {
 		.name = "qcom-irq-combiner",
 		.acpi_match_table = ACPI_PTR(qcom_irq_combiner_ids),
 	},
 	.probe = combiner_probe,
 };
-builtin_platform_driver(qcom_irq_combiner_probe);
+builtin_platform_driver(qcom_irq_combiner_driver);
-- 
2.49.1
Re: [PATCH] irqchip/qcom-irq-combiner: Rename driver structure
Posted by Thomas Gleixner 3 months, 3 weeks ago
On Fri, Oct 17 2025 at 07:52, Johan Hovold wrote:
> The "_probe" suffix of the driver structure name prevents modpost from
> warning about section mismatches so replace it to catch any future
> issues like the recently fixed probe function being incorrectly marked
> as __init.

I take this grudgingly, but not without pointing out again that this is
just a horrible hack. Why can't this stuff be properly annotated and
recorded in a throwaway section so that modpost can act on reliable data
instead of using string matching on arbitrary function names?

Thanks,

        tglx
Re: [PATCH] irqchip/qcom-irq-combiner: Rename driver structure
Posted by Johan Hovold 3 months, 2 weeks ago
On Fri, Oct 17, 2025 at 03:16:19PM +0200, Thomas Gleixner wrote:
> On Fri, Oct 17 2025 at 07:52, Johan Hovold wrote:
> > The "_probe" suffix of the driver structure name prevents modpost from
> > warning about section mismatches so replace it to catch any future
> > issues like the recently fixed probe function being incorrectly marked
> > as __init.
> 
> I take this grudgingly, but not without pointing out again that this is
> just a horrible hack. Why can't this stuff be properly annotated and
> recorded in a throwaway section so that modpost can act on reliable data
> instead of using string matching on arbitrary function names?

This apparently dates back to 2006, but some of these magic patterns
were at least dropped a few years ago with commit e1dc1bfe5b27
("modpost: remove more symbol patterns from the section check
whitelist").

With the irqchip driver fixed and soon hopefully the stm clocksource
driver [1], we can retire also the special handling of the "_probe"
suffix. I've just sent a patch. [2]

Johan


[1] https://lore.kernel.org/lkml/20251017054943.7195-1-johan@kernel.org/
[2] https://lore.kernel.org/lkml/20251020091613.22562-1-johan@kernel.org/
[tip: irq/drivers] irqchip/qcom-irq-combiner: Rename driver structure
Posted by tip-bot2 for Johan Hovold 3 months, 3 weeks ago
The following commit has been merged into the irq/drivers branch of tip:

Commit-ID:     a7f25e00c4c97d4842117fba06b4c6064ba1e354
Gitweb:        https://git.kernel.org/tip/a7f25e00c4c97d4842117fba06b4c6064ba1e354
Author:        Johan Hovold <johan@kernel.org>
AuthorDate:    Fri, 17 Oct 2025 07:52:26 +02:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 17 Oct 2025 15:18:18 +02:00

irqchip/qcom-irq-combiner: Rename driver structure

The "_probe" suffix of the driver structure name prevents modpost from
warning about section mismatches so replace it to catch any future
issues like the recently fixed probe function being incorrectly marked
as __init.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/irqchip/qcom-irq-combiner.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/qcom-irq-combiner.c b/drivers/irqchip/qcom-irq-combiner.c
index 9308088..0981900 100644
--- a/drivers/irqchip/qcom-irq-combiner.c
+++ b/drivers/irqchip/qcom-irq-combiner.c
@@ -266,11 +266,11 @@ static const struct acpi_device_id qcom_irq_combiner_ids[] = {
 	{ }
 };
 
-static struct platform_driver qcom_irq_combiner_probe = {
+static struct platform_driver qcom_irq_combiner_driver = {
 	.driver = {
 		.name = "qcom-irq-combiner",
 		.acpi_match_table = ACPI_PTR(qcom_irq_combiner_ids),
 	},
 	.probe = combiner_probe,
 };
-builtin_platform_driver(qcom_irq_combiner_probe);
+builtin_platform_driver(qcom_irq_combiner_driver);