Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/bridge: make a const array static, makes object smaller

Don't populate the const array frs_limits on the stack but instead make
it static. Makes the object code smaller by 128 bytes:

Before:
text data bss dec hex filename
24845 7440 64 32349 7e5d ./drivers/gpu/drm/bridge/tc358768.o

After:
text data bss dec hex filename
24749 7408 64 32221 7ddd ./drivers/gpu/drm/bridge/tc358768.o

(gcc version 10.2.0)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

authored by

Colin Ian King and committed by
Laurent Pinchart
4b4e7a2a 15d27b15

+1 -1
+1 -1
drivers/gpu/drm/bridge/tc358768.c
··· 291 291 const struct drm_display_mode *mode, 292 292 bool verify_only) 293 293 { 294 - const u32 frs_limits[] = { 294 + static const u32 frs_limits[] = { 295 295 1000000000, 296 296 500000000, 297 297 250000000,