Skip to content

Commit 1a7a7b8

Browse files
arndbdianders
authored andcommitted
drm/panel: novatek-nt35560: avoid on-stack device structure
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: 5fbc0db ("drm/panel: novatek-nt35560: Clean up driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patch.msgid.link/20251204094550.1030506-1-arnd@kernel.org
1 parent eb76d0f commit 1a7a7b8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/drm/panel/panel-novatek-nt35560.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ static const struct backlight_properties nt35560_bl_props = {
213213

214214
static void nt35560_read_id(struct mipi_dsi_multi_context *dsi_ctx)
215215
{
216-
struct device dev = dsi_ctx->dsi->dev;
216+
struct device *dev = &dsi_ctx->dsi->dev;
217217
u8 vendor, version, panel;
218218
u16 val;
219219

@@ -225,7 +225,7 @@ static void nt35560_read_id(struct mipi_dsi_multi_context *dsi_ctx)
225225
return;
226226

227227
if (vendor == 0x00) {
228-
dev_err(&dev, "device vendor ID is zero\n");
228+
dev_err(dev, "device vendor ID is zero\n");
229229
dsi_ctx->accum_err = -ENODEV;
230230
return;
231231
}
@@ -236,12 +236,12 @@ static void nt35560_read_id(struct mipi_dsi_multi_context *dsi_ctx)
236236
case DISPLAY_SONY_ACX424AKP_ID2:
237237
case DISPLAY_SONY_ACX424AKP_ID3:
238238
case DISPLAY_SONY_ACX424AKP_ID4:
239-
dev_info(&dev,
239+
dev_info(dev,
240240
"MTP vendor: %02x, version: %02x, panel: %02x\n",
241241
vendor, version, panel);
242242
break;
243243
default:
244-
dev_info(&dev,
244+
dev_info(dev,
245245
"unknown vendor: %02x, version: %02x, panel: %02x\n",
246246
vendor, version, panel);
247247
break;

0 commit comments

Comments
 (0)