* [PATCH] drm/panel: novatek-nt35560: avoid on-stack device structure
@ 2025-12-04 9:45 Arnd Bergmann
2025-12-04 17:33 ` Doug Anderson
2025-12-10 4:54 ` Brigham Campbell
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2025-12-04 9:45 UTC (permalink / raw)
To: Linus Walleij, Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Douglas Anderson,
Brigham Campbell
Cc: Arnd Bergmann, Jessica Zhang, Anusha Srivatsa, dri-devel,
linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
A cleanup patch apparently by accident used a local device structure
instead of a pointer to one in the nt35560_read_id() function, causing
a warning about stack usage:
drivers/gpu/drm/panel/panel-novatek-nt35560.c: In function 'nt35560_read_id':
drivers/gpu/drm/panel/panel-novatek-nt35560.c:249:1: error: the frame size of 1296 bytes is larger than 1280 bytes [-Werror=frame-larger-than=]
Change this to a pointer as was liley intended here.
Fixes: 5fbc0dbb92d6 ("drm/panel: novatek-nt35560: Clean up driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/panel/panel-novatek-nt35560.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35560.c b/drivers/gpu/drm/panel/panel-novatek-nt35560.c
index 561e6643dcbb..6e5173f98a22 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt35560.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35560.c
@@ -213,7 +213,7 @@ static const struct backlight_properties nt35560_bl_props = {
static void nt35560_read_id(struct mipi_dsi_multi_context *dsi_ctx)
{
- struct device dev = dsi_ctx->dsi->dev;
+ struct device *dev = &dsi_ctx->dsi->dev;
u8 vendor, version, panel;
u16 val;
@@ -225,7 +225,7 @@ static void nt35560_read_id(struct mipi_dsi_multi_context *dsi_ctx)
return;
if (vendor == 0x00) {
- dev_err(&dev, "device vendor ID is zero\n");
+ dev_err(dev, "device vendor ID is zero\n");
dsi_ctx->accum_err = -ENODEV;
return;
}
@@ -236,12 +236,12 @@ static void nt35560_read_id(struct mipi_dsi_multi_context *dsi_ctx)
case DISPLAY_SONY_ACX424AKP_ID2:
case DISPLAY_SONY_ACX424AKP_ID3:
case DISPLAY_SONY_ACX424AKP_ID4:
- dev_info(&dev,
+ dev_info(dev,
"MTP vendor: %02x, version: %02x, panel: %02x\n",
vendor, version, panel);
break;
default:
- dev_info(&dev,
+ dev_info(dev,
"unknown vendor: %02x, version: %02x, panel: %02x\n",
vendor, version, panel);
break;
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/panel: novatek-nt35560: avoid on-stack device structure
2025-12-04 9:45 [PATCH] drm/panel: novatek-nt35560: avoid on-stack device structure Arnd Bergmann
@ 2025-12-04 17:33 ` Doug Anderson
2025-12-10 4:54 ` Brigham Campbell
1 sibling, 0 replies; 4+ messages in thread
From: Doug Anderson @ 2025-12-04 17:33 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Linus Walleij, Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Brigham Campbell,
Arnd Bergmann, Jessica Zhang, Anusha Srivatsa, dri-devel,
linux-kernel
Hi,
On Thu, Dec 4, 2025 at 1:45 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> A cleanup patch apparently by accident used a local device structure
> instead of a pointer to one in the nt35560_read_id() function, causing
> a warning about stack usage:
>
> drivers/gpu/drm/panel/panel-novatek-nt35560.c: In function 'nt35560_read_id':
> drivers/gpu/drm/panel/panel-novatek-nt35560.c:249:1: error: the frame size of 1296 bytes is larger than 1280 bytes [-Werror=frame-larger-than=]
>
> Change this to a pointer as was liley intended here.
>
> Fixes: 5fbc0dbb92d6 ("drm/panel: novatek-nt35560: Clean up driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/gpu/drm/panel/panel-novatek-nt35560.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Whoops! Not sure how I missed that in code review. Thanks for the fix!
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Pushed to drm-misc-fixes:
[1/1] drm/panel: novatek-nt35560: avoid on-stack device structure
commit: 1a7a7b80a22448dff55e1ad69a4681fd8b760b85
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/panel: novatek-nt35560: avoid on-stack device structure
2025-12-04 9:45 [PATCH] drm/panel: novatek-nt35560: avoid on-stack device structure Arnd Bergmann
2025-12-04 17:33 ` Doug Anderson
@ 2025-12-10 4:54 ` Brigham Campbell
2025-12-10 15:00 ` Arnd Bergmann
1 sibling, 1 reply; 4+ messages in thread
From: Brigham Campbell @ 2025-12-10 4:54 UTC (permalink / raw)
To: Arnd Bergmann, Linus Walleij, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Douglas Anderson, Brigham Campbell
Cc: Arnd Bergmann, Jessica Zhang, Anusha Srivatsa, dri-devel,
linux-kernel
On Thu Dec 4, 2025 at 2:45 AM MST, Arnd Bergmann wrote:
> Change this to a pointer as was liley intended here.
Shoot, you're absolutely right that I didn't mean to create a copy of
the struct on the stack when I wrote that code. Thanks for the fix! I'll
try to be more careful with struct usage and the stack in the future.
Can I ask how you got the build process to emit those warnings? I didn't
see it when I developed my patch.
Thanks again,
Brigham
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/panel: novatek-nt35560: avoid on-stack device structure
2025-12-10 4:54 ` Brigham Campbell
@ 2025-12-10 15:00 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2025-12-10 15:00 UTC (permalink / raw)
To: Brigham Campbell, Arnd Bergmann, Linus Walleij, Neil Armstrong,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Dave Airlie,
Simona Vetter, Doug Anderson
Cc: Jessica Zhang, Anusha Srivatsa, dri-devel, linux-kernel
On Wed, Dec 10, 2025, at 05:54, Brigham Campbell wrote:
> On Thu Dec 4, 2025 at 2:45 AM MST, Arnd Bergmann wrote:
>> Change this to a pointer as was liley intended here.
>
> Shoot, you're absolutely right that I didn't mean to create a copy of
> the struct on the stack when I wrote that code. Thanks for the fix! I'll
> try to be more careful with struct usage and the stack in the future.
>
> Can I ask how you got the build process to emit those warnings? I didn't
> see it when I developed my patch.
I'm doing randconfig tests to check a large number of possible configurations.
I also have the CONFIG_FRAME_WARN logic replaced with lower configuration
specific default to catch more regressions in this particular area.
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-12-10 15:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-04 9:45 [PATCH] drm/panel: novatek-nt35560: avoid on-stack device structure Arnd Bergmann
2025-12-04 17:33 ` Doug Anderson
2025-12-10 4:54 ` Brigham Campbell
2025-12-10 15:00 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox