Re: [PATCH] drm/mipi-dbi: hide unused mipi_dbi_dcs_read_commands array
From: Luca Ceresoli
Date: Thu Nov 12 2026 - 10:05:45 EST
On Wed Nov 11, 2026 at 10:23 AM CET, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> When -Wunused-const-variable is enabled and SPI is turned off, gcc
> warns about this array being unused but defined locally:
>
> drivers/gpu/drm/drm_mipi_dbi.c:79:17: error: 'mipi_dbi_dcs_read_commands' defined but not used [-Werror=unused-const-variable=]
> 79 | static const u8 mipi_dbi_dcs_read_commands[] = {
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Move it into the block that actually uses it.
>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Could even be moved inside the only function using it.
Anyway:
Reviewed-by: Luca Ceresoli <luca.ceresoli@xxxxxxxxxxx>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com