* [PATCH] drm/bridge: make array frs_limits static, makes object smaller
@ 2020-06-11 13:39 Colin King
2020-06-11 18:01 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2020-06-11 13:39 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, David Airlie, Daniel Vetter, dri-devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Don't populate the array frs_limits on the stack but instead make it
static. Makes the object code smaller by 123 bytes
Before:
text data bss dec hex filename
23456 5712 64 29232 7230 drivers/gpu/drm/bridge/tc358768.o
After:
text data bss dec hex filename
23333 5712 64 29109 71b5 drivers/gpu/drm/bridge/tc358768.o
(gcc version 9.3.0, amd64)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/gpu/drm/bridge/tc358768.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c
index 6650fe4cfc20..bd3fa3cbac16 100644
--- a/drivers/gpu/drm/bridge/tc358768.c
+++ b/drivers/gpu/drm/bridge/tc358768.c
@@ -291,7 +291,7 @@ static int tc358768_calc_pll(struct tc358768_priv *priv,
const struct drm_display_mode *mode,
bool verify_only)
{
- const u32 frs_limits[] = {
+ static const u32 frs_limits[] = {
1000000000,
500000000,
250000000,
--
2.27.0.rc0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/bridge: make array frs_limits static, makes object smaller
2020-06-11 13:39 [PATCH] drm/bridge: make array frs_limits static, makes object smaller Colin King
@ 2020-06-11 18:01 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2020-06-11 18:01 UTC (permalink / raw)
To: Colin King, Andrzej Hajda, Neil Armstrong, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter,
dri-devel
Cc: kernel-janitors, linux-kernel
On Thu, 2020-06-11 at 14:39 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Don't populate the array frs_limits on the stack but instead make it
> static. Makes the object code smaller by 123 bytes
>
> Before:
> text data bss dec hex filename
> 23456 5712 64 29232 7230 drivers/gpu/drm/bridge/tc358768.o
>
> After:
> text data bss dec hex filename
> 23333 5712 64 29109 71b5 drivers/gpu/drm/bridge/tc358768.o
>
> (gcc version 9.3.0, amd64)
It's curious that the data size didn't change.
Perhaps you should make sure you do not compile
with allyesconfig when you show these change.
For instance: x86-64 defconfig with this bridge
enabled:
$ size drivers/gpu/drm/bridge/tc358768.o
text data bss dec hex filename
9423 300 0 9723 25fb drivers/gpu/drm/bridge/tc358768.o
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-11 18:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 13:39 [PATCH] drm/bridge: make array frs_limits static, makes object smaller Colin King
2020-06-11 18:01 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).