* [PATCH 00/10] -Wunused-const-variable warning fixes
@ 2025-04-09 12:21 Arnd Bergmann
2025-04-09 12:24 ` [PATCH 10/10] [RESEND 3] dma/contiguous: avoid warning about unused size_bytes Arnd Bergmann
0 siblings, 1 reply; 6+ 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] 6+ messages in thread
* [PATCH 10/10] [RESEND 3] dma/contiguous: avoid warning about unused size_bytes
2025-04-09 12:21 [PATCH 00/10] -Wunused-const-variable warning fixes Arnd Bergmann
@ 2025-04-09 12:24 ` Arnd Bergmann
2025-04-09 14:35 ` Marek Szyprowski
0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2025-04-09 12:24 UTC (permalink / raw)
To: Marek Szyprowski, Michal Nazarewicz, Arnd Bergmann, Kyungmin Park
Cc: Krzysztof Kozlowski, Andy Shevchenko, Robin Murphy, iommu,
linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
When building with W=1, this variable is unused for configs with
CONFIG_CMA_SIZE_SEL_PERCENTAGE=y:
kernel/dma/contiguous.c:67:26: error: 'size_bytes' defined but not used [-Werror=unused-const-variable=]
Change this to a macro to avoid the warning.
Fixes: c64be2bb1c6e ("drivers: add Contiguous Memory Allocator")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v3: use a macro instead of constant
v2: fix spelling mistake.
---
kernel/dma/contiguous.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c
index 055da410ac71..88888f4c1c73 100644
--- a/kernel/dma/contiguous.c
+++ b/kernel/dma/contiguous.c
@@ -64,8 +64,7 @@ struct cma *dma_contiguous_default_area;
* Users, who want to set the size of global CMA area for their system
* should use cma= kernel parameter.
*/
-static const phys_addr_t size_bytes __initconst =
- (phys_addr_t)CMA_SIZE_MBYTES * SZ_1M;
+#define size_bytes (CMA_SIZE_MBYTES * SZ_1M)
static phys_addr_t size_cmdline __initdata = -1;
static phys_addr_t base_cmdline __initdata;
static phys_addr_t limit_cmdline __initdata;
--
2.39.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 10/10] [RESEND 3] dma/contiguous: avoid warning about unused size_bytes
2025-04-09 12:24 ` [PATCH 10/10] [RESEND 3] dma/contiguous: avoid warning about unused size_bytes Arnd Bergmann
@ 2025-04-09 14:35 ` Marek Szyprowski
2025-04-09 14:43 ` Andy Shevchenko
0 siblings, 1 reply; 6+ messages in thread
From: Marek Szyprowski @ 2025-04-09 14:35 UTC (permalink / raw)
To: Arnd Bergmann, Michal Nazarewicz, Arnd Bergmann, Kyungmin Park
Cc: Krzysztof Kozlowski, Andy Shevchenko, Robin Murphy, iommu,
linux-kernel
On 09.04.2025 14:24, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When building with W=1, this variable is unused for configs with
> CONFIG_CMA_SIZE_SEL_PERCENTAGE=y:
>
> kernel/dma/contiguous.c:67:26: error: 'size_bytes' defined but not used [-Werror=unused-const-variable=]
>
> Change this to a macro to avoid the warning.
>
> Fixes: c64be2bb1c6e ("drivers: add Contiguous Memory Allocator")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks, applied to dma-mapping-fixes branch.
> ---
> v3: use a macro instead of constant
> v2: fix spelling mistake.
> ---
> kernel/dma/contiguous.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c
> index 055da410ac71..88888f4c1c73 100644
> --- a/kernel/dma/contiguous.c
> +++ b/kernel/dma/contiguous.c
> @@ -64,8 +64,7 @@ struct cma *dma_contiguous_default_area;
> * Users, who want to set the size of global CMA area for their system
> * should use cma= kernel parameter.
> */
> -static const phys_addr_t size_bytes __initconst =
> - (phys_addr_t)CMA_SIZE_MBYTES * SZ_1M;
> +#define size_bytes (CMA_SIZE_MBYTES * SZ_1M)
> static phys_addr_t size_cmdline __initdata = -1;
> static phys_addr_t base_cmdline __initdata;
> static phys_addr_t limit_cmdline __initdata;
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 10/10] [RESEND 3] dma/contiguous: avoid warning about unused size_bytes
2025-04-09 14:35 ` Marek Szyprowski
@ 2025-04-09 14:43 ` Andy Shevchenko
2025-04-09 14:51 ` Arnd Bergmann
0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2025-04-09 14:43 UTC (permalink / raw)
To: Marek Szyprowski
Cc: Arnd Bergmann, Michal Nazarewicz, Arnd Bergmann, Kyungmin Park,
Krzysztof Kozlowski, Robin Murphy, iommu, linux-kernel
On Wed, Apr 09, 2025 at 04:35:57PM +0200, Marek Szyprowski wrote:
> On 09.04.2025 14:24, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > When building with W=1, this variable is unused for configs with
> > CONFIG_CMA_SIZE_SEL_PERCENTAGE=y:
> >
> > kernel/dma/contiguous.c:67:26: error: 'size_bytes' defined but not used [-Werror=unused-const-variable=]
> >
> > Change this to a macro to avoid the warning.
> > -static const phys_addr_t size_bytes __initconst =
> > - (phys_addr_t)CMA_SIZE_MBYTES * SZ_1M;
> > +#define size_bytes (CMA_SIZE_MBYTES * SZ_1M)
This had phys_addr_t type before, do we still have the platforms when it can be
bigger than 32-bit integer?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 10/10] [RESEND 3] dma/contiguous: avoid warning about unused size_bytes
2025-04-09 14:43 ` Andy Shevchenko
@ 2025-04-09 14:51 ` Arnd Bergmann
2025-04-09 14:57 ` Marek Szyprowski
0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2025-04-09 14:51 UTC (permalink / raw)
To: Andy Shevchenko, Marek Szyprowski
Cc: Arnd Bergmann, Michal Nazarewicz, Kyungmin Park,
Krzysztof Kozlowski, Robin Murphy, iommu, linux-kernel
On Wed, Apr 9, 2025, at 16:43, Andy Shevchenko wrote:
> On Wed, Apr 09, 2025 at 04:35:57PM +0200, Marek Szyprowski wrote:
>> On 09.04.2025 14:24, Arnd Bergmann wrote:
>> > From: Arnd Bergmann <arnd@arndb.de>
>> >
>> > When building with W=1, this variable is unused for configs with
>> > CONFIG_CMA_SIZE_SEL_PERCENTAGE=y:
>> >
>> > kernel/dma/contiguous.c:67:26: error: 'size_bytes' defined but not used [-Werror=unused-const-variable=]
>> >
>> > Change this to a macro to avoid the warning.
>
>> > -static const phys_addr_t size_bytes __initconst =
>> > - (phys_addr_t)CMA_SIZE_MBYTES * SZ_1M;
>> > +#define size_bytes (CMA_SIZE_MBYTES * SZ_1M)
>
> This had phys_addr_t type before, do we still have the platforms when it can be
> bigger than 32-bit integer?
It can certainly be larger on 64-bit systems, I think I messed it
up. Marek, can you fix this to put back the cast, or should I
send a patch on top?
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 10/10] [RESEND 3] dma/contiguous: avoid warning about unused size_bytes
2025-04-09 14:51 ` Arnd Bergmann
@ 2025-04-09 14:57 ` Marek Szyprowski
0 siblings, 0 replies; 6+ messages in thread
From: Marek Szyprowski @ 2025-04-09 14:57 UTC (permalink / raw)
To: Arnd Bergmann, Andy Shevchenko
Cc: Arnd Bergmann, Michal Nazarewicz, Kyungmin Park,
Krzysztof Kozlowski, Robin Murphy, iommu, linux-kernel
On 09.04.2025 16:51, Arnd Bergmann wrote:
> On Wed, Apr 9, 2025, at 16:43, Andy Shevchenko wrote:
>> On Wed, Apr 09, 2025 at 04:35:57PM +0200, Marek Szyprowski wrote:
>>> On 09.04.2025 14:24, Arnd Bergmann wrote:
>>>> From: Arnd Bergmann <arnd@arndb.de>
>>>>
>>>> When building with W=1, this variable is unused for configs with
>>>> CONFIG_CMA_SIZE_SEL_PERCENTAGE=y:
>>>>
>>>> kernel/dma/contiguous.c:67:26: error: 'size_bytes' defined but not used [-Werror=unused-const-variable=]
>>>>
>>>> Change this to a macro to avoid the warning.
>>>>
>>>> -static const phys_addr_t size_bytes __initconst =
>>>> - (phys_addr_t)CMA_SIZE_MBYTES * SZ_1M;
>>>> +#define size_bytes (CMA_SIZE_MBYTES * SZ_1M)
>> This had phys_addr_t type before, do we still have the platforms when it can be
>> bigger than 32-bit integer?
> It can certainly be larger on 64-bit systems, I think I messed it
> up. Marek, can you fix this to put back the cast, or should I
> send a patch on top?
I will drop this one then as I didn't push my branch yet and apply v2,
which seems to be fine.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-04-09 14:57 UTC | newest]
Thread overview: 6+ 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
2025-04-09 12:24 ` [PATCH 10/10] [RESEND 3] dma/contiguous: avoid warning about unused size_bytes Arnd Bergmann
2025-04-09 14:35 ` Marek Szyprowski
2025-04-09 14:43 ` Andy Shevchenko
2025-04-09 14:51 ` Arnd Bergmann
2025-04-09 14:57 ` Marek Szyprowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox