* [PATCH 00/10] -Wunused-const-variable warning fixes
@ 2025-04-09 12:21 Arnd Bergmann
[not found] ` <20250409122314.2848028-1-arnd@kernel.org>
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2025-04-09 12:21 UTC (permalink / raw)
To: linux-kernel
Cc: Arnd Bergmann, Russell King, Jiri Kosina, Greg Kroah-Hartman,
Daniel Lezcano, Thomas Gleixner, Ian Abbott, H Hartley Sweeten,
Frank Binns, Matt Coster, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Dmitry Torokhov,
Maxime Coquelin, Alexandre Torgue, Peter Rosin, Marek Szyprowski,
Robin Murphy, Peter Zijlstra, Ingo Molnar, Will Deacon,
Boqun Feng, Waiman Long, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
Valentin Schneider, Krzysztof Kozlowski, linux-arm-kernel,
dri-devel, linux-input, linux-stm32, iommu
From: Arnd Bergmann <arnd@arndb.de>
Most patches I sent during the previous kernel cycle have made it in, these
ten still remain for the moment. Please apply.
Arnd Bergmann (10):
drm/imagination: avoid unused-const-variable warning
[v2] clocksource: atmel_tcb: fix kconfig dependency
[v2] Input: stmpe-ts - use module alias instead of device table
[RESEND] mux: adg792a: remove incorrect of_match_ptr annotation
[RESEND] sched: open-code max_rt_runtime definition
[RESEND] lockdep: change 'static const' variables to enum values
[RESEND] ARM: fixmap: make __end_of_early_ioremap_region an enum value
[RESEND 2] comedi: ni_atmio: avoid warning for unused device_ids[] table
[RESEND 2] apm-emulation: hide an unused variable
[RESEND 3] dma/contiguous: avoid warning about unused size_bytes
arch/arm/include/asm/fixmap.h | 9 ++++-----
drivers/char/apm-emulation.c | 5 ++---
drivers/clocksource/Kconfig | 4 ++--
drivers/comedi/drivers/ni_atmio.c | 2 +-
drivers/gpu/drm/imagination/pvr_fw_trace.c | 8 ++++----
drivers/gpu/drm/imagination/pvr_fw_trace.h | 2 --
drivers/input/touchscreen/stmpe-ts.c | 7 +------
drivers/mux/adg792a.c | 2 +-
kernel/dma/contiguous.c | 3 +--
kernel/locking/lockdep_internals.h | 18 ++++++++++--------
kernel/sched/rt.c | 6 ++----
11 files changed, 28 insertions(+), 38 deletions(-)
--
2.39.5
Cc: Russell King <linux@armlinux.org.uk> (maintainer:ARM PORT)
Cc: Jiri Kosina <jikos@kernel.org> (maintainer:APM DRIVER)
Cc: Arnd Bergmann <arnd@arndb.de> (maintainer:CHAR and MISC DRIVERS,commit_signer:2/2=100%,authored:2/2=100%,added_lines:8/8=100%,removed_lines:10/10=100%,commit_signer:2/3=67%,authored:2/3=67%,added_lines:2/11=18%,removed_lines:2/2=100%,commit_signer:2/4=50%,blamed_fixes:1/1=100%)
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (maintainer:CHAR and MISC DRIVERS,commit_signer:1/3=33%)
Cc: Daniel Lezcano <daniel.lezcano@linaro.org> (maintainer:CLOCKSOURCE, CLOCKEVENT DRIVERS)
Cc: Thomas Gleixner <tglx@linutronix.de> (maintainer:CLOCKSOURCE, CLOCKEVENT DRIVERS)
Cc: Ian Abbott <abbotti@mev.co.uk> (maintainer:COMEDI DRIVERS,commit_signer:1/3=33%,authored:1/3=33%,added_lines:9/11=82%)
Cc: H Hartley Sweeten <hsweeten@visionengravers.com> (maintainer:COMEDI DRIVERS)
Cc: Frank Binns <frank.binns@imgtec.com> (maintainer:IMGTEC POWERVR DRM DRIVER)
Cc: Matt Coster <matt.coster@imgtec.com> (maintainer:IMGTEC POWERVR DRM DRIVER)
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> (maintainer:DRM DRIVERS AND MISC GPU PATCHES)
Cc: Maxime Ripard <mripard@kernel.org> (maintainer:DRM DRIVERS AND MISC GPU PATCHES)
Cc: Thomas Zimmermann <tzimmermann@suse.de> (maintainer:DRM DRIVERS AND MISC GPU PATCHES)
Cc: David Airlie <airlied@gmail.com> (maintainer:DRM DRIVERS)
Cc: Simona Vetter <simona@ffwll.ch> (maintainer:DRM DRIVERS)
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> (maintainer:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)...,commit_signer:2/4=50%)
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> (maintainer:ARM/STM32 ARCHITECTURE)
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com> (maintainer:ARM/STM32 ARCHITECTURE)
Cc: Peter Rosin <peda@axentia.se> (maintainer:MULTIPLEXER SUBSYSTEM)
Cc: Marek Szyprowski <m.szyprowski@samsung.com> (maintainer:DMA MAPPING HELPERS,blamed_fixes:1/1=100%)
Cc: Robin Murphy <robin.murphy@arm.com> (reviewer:DMA MAPPING HELPERS)
Cc: Peter Zijlstra <peterz@infradead.org> (maintainer:LOCKING PRIMITIVES)
Cc: Ingo Molnar <mingo@redhat.com> (maintainer:LOCKING PRIMITIVES)
Cc: Will Deacon <will@kernel.org> (maintainer:LOCKING PRIMITIVES)
Cc: Boqun Feng <boqun.feng@gmail.com> (maintainer:LOCKING PRIMITIVES)
Cc: Waiman Long <longman@redhat.com> (reviewer:LOCKING PRIMITIVES)
Cc: Juri Lelli <juri.lelli@redhat.com> (maintainer:SCHEDULER)
Cc: Vincent Guittot <vincent.guittot@linaro.org> (maintainer:SCHEDULER)
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> (reviewer:SCHEDULER)
Cc: Steven Rostedt <rostedt@goodmis.org> (reviewer:SCHEDULER)
Cc: Ben Segall <bsegall@google.com> (reviewer:SCHEDULER)
Cc: Mel Gorman <mgorman@suse.de> (reviewer:SCHEDULER)
Cc: Valentin Schneider <vschneid@redhat.com> (reviewer:SCHEDULER)
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> (commit_signer:2/4=50%,authored:2/4=50%,added_lines:2/5=40%,removed_lines:2/5=40%)
Cc: linux-arm-kernel@lists.infradead.org (moderated list:ARM PORT)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: dri-devel@lists.freedesktop.org (open list:DRM DRIVERS)
Cc: linux-input@vger.kernel.org (open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)...)
Cc: linux-stm32@st-md-mailman.stormreply.com (moderated list:ARM/STM32 ARCHITECTURE)
Cc: iommu@lists.linux.dev (open list:DMA MAPPING HELPERS)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 03/10] [v2] Input: stmpe-ts - use module alias instead of device table
[not found] ` <20250409122314.2848028-1-arnd@kernel.org>
@ 2025-04-09 12:22 ` Arnd Bergmann
2025-04-09 15:33 ` Andy Shevchenko
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2025-04-09 12:22 UTC (permalink / raw)
To: Dmitry Torokhov, Maxime Coquelin, Alexandre Torgue
Cc: Krzysztof Kozlowski, Andy Shevchenko, Arnd Bergmann,
Oliver Graute, Uwe Kleine-König, Yu Jiaoliang, linux-input,
linux-stm32, linux-arm-kernel, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
When compile tested with W=1 on x86_64 with driver as built-in:
stmpe-ts.c:371:34: error: unused variable 'stmpe_ts_ids' [-Werror,-Wunused-const-variable]
Ideally this would be referenced from the platform_driver, but since
the compatible string is already matched by the mfd driver for its
parent device, that would break probing.
In this case, the of_device_id table just serves as a module alias
for loading the driver, while the device itself is probed using
the platform device name.
Remove the table and instead use a module alias that reflects how
the driver is actually probed.
Link: https://lore.kernel.org/lkml/20240403080702.3509288-8-arnd@kernel.org/
Link: https://lore.kernel.org/lkml/181dbdb8-c050-4966-8cb4-2f39495ff3f9@app.fastmail.com/
Cc: Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v2: use a different approach, hopefully this makes more sense.
---
drivers/input/touchscreen/stmpe-ts.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c
index a94a1997f96b..af0fb38bcfdc 100644
--- a/drivers/input/touchscreen/stmpe-ts.c
+++ b/drivers/input/touchscreen/stmpe-ts.c
@@ -366,12 +366,7 @@ static struct platform_driver stmpe_ts_driver = {
};
module_platform_driver(stmpe_ts_driver);
-static const struct of_device_id stmpe_ts_ids[] = {
- { .compatible = "st,stmpe-ts", },
- { },
-};
-MODULE_DEVICE_TABLE(of, stmpe_ts_ids);
-
+MODULE_ALIAS("platform:stmpe-ts");
MODULE_AUTHOR("Luotao Fu <l.fu@pengutronix.de>");
MODULE_DESCRIPTION("STMPEXXX touchscreen driver");
MODULE_LICENSE("GPL");
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 03/10] [v2] Input: stmpe-ts - use module alias instead of device table
2025-04-09 12:22 ` [PATCH 03/10] [v2] Input: stmpe-ts - use module alias instead of device table Arnd Bergmann
@ 2025-04-09 15:33 ` Andy Shevchenko
2025-04-09 15:49 ` Krzysztof Kozlowski
0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2025-04-09 15:33 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Dmitry Torokhov, Maxime Coquelin, Alexandre Torgue,
Krzysztof Kozlowski, Arnd Bergmann, Oliver Graute,
Uwe Kleine-König, Yu Jiaoliang, linux-input, linux-stm32,
linux-arm-kernel, linux-kernel
On Wed, Apr 09, 2025 at 02:22:55PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When compile tested with W=1 on x86_64 with driver as built-in:
>
> stmpe-ts.c:371:34: error: unused variable 'stmpe_ts_ids' [-Werror,-Wunused-const-variable]
>
> Ideally this would be referenced from the platform_driver, but since
> the compatible string is already matched by the mfd driver for its
> parent device, that would break probing.
>
> In this case, the of_device_id table just serves as a module alias
> for loading the driver, while the device itself is probed using
> the platform device name.
>
> Remove the table and instead use a module alias that reflects how
> the driver is actually probed.
...
> +MODULE_ALIAS("platform:stmpe-ts");
Isn't the preferable way to have platform device ID table instead?
Krzysztof?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 03/10] [v2] Input: stmpe-ts - use module alias instead of device table
2025-04-09 15:33 ` Andy Shevchenko
@ 2025-04-09 15:49 ` Krzysztof Kozlowski
0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2025-04-09 15:49 UTC (permalink / raw)
To: Andy Shevchenko, Arnd Bergmann
Cc: Dmitry Torokhov, Maxime Coquelin, Alexandre Torgue, Arnd Bergmann,
Oliver Graute, Uwe Kleine-König, Yu Jiaoliang, linux-input,
linux-stm32, linux-arm-kernel, linux-kernel
On 09/04/2025 17:33, Andy Shevchenko wrote:
> On Wed, Apr 09, 2025 at 02:22:55PM +0200, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> When compile tested with W=1 on x86_64 with driver as built-in:
>>
>> stmpe-ts.c:371:34: error: unused variable 'stmpe_ts_ids' [-Werror,-Wunused-const-variable]
>>
>> Ideally this would be referenced from the platform_driver, but since
>> the compatible string is already matched by the mfd driver for its
>> parent device, that would break probing.
>>
>> In this case, the of_device_id table just serves as a module alias
>> for loading the driver, while the device itself is probed using
>> the platform device name.
>>
>> Remove the table and instead use a module alias that reflects how
>> the driver is actually probed.
>
> ...
>
>> +MODULE_ALIAS("platform:stmpe-ts");
>
> Isn't the preferable way to have platform device ID table instead?
> Krzysztof?
There is no ID table currently and I (usually) object for having both:
ID tables and aliases. In this case it is just simpler to have alias
than entire table and MODULE_DEVICE_TABLE(). Also it is unlikely it will
grow into many aliases. If it tries, then I will object.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-09 15:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-09 12:21 [PATCH 00/10] -Wunused-const-variable warning fixes Arnd Bergmann
[not found] ` <20250409122314.2848028-1-arnd@kernel.org>
2025-04-09 12:22 ` [PATCH 03/10] [v2] Input: stmpe-ts - use module alias instead of device table Arnd Bergmann
2025-04-09 15:33 ` Andy Shevchenko
2025-04-09 15:49 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).