* [PATCH] media: s3c-camif: make array 'registers' static const, makes object smaller
@ 2019-09-06 8:11 Colin King
0 siblings, 0 replies; only message in thread
From: Colin King @ 2019-09-06 8:11 UTC (permalink / raw)
To: Sylwester Nawrocki, Mauro Carvalho Chehab, linux-media,
linux-samsung-soc
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Don't populate the array 'registers' on the stack but instead make it
static const. Makes the object code smaller by 45 bytes.
Before:
text data bss dec hex filename
17364 5000 0 22364 575c platform/s3c-camif/camif-regs.o
After:
text data bss dec hex filename
17255 5064 0 22319 572f platform/s3c-camif/camif-regs.o
(gcc version 9.2.1, amd64)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/media/platform/s3c-camif/camif-regs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/s3c-camif/camif-regs.c b/drivers/media/platform/s3c-camif/camif-regs.c
index 1a65532dc36d..e80204f5720c 100644
--- a/drivers/media/platform/s3c-camif/camif-regs.c
+++ b/drivers/media/platform/s3c-camif/camif-regs.c
@@ -553,7 +553,7 @@ void camif_hw_disable_capture(struct camif_vp *vp)
void camif_hw_dump_regs(struct camif_dev *camif, const char *label)
{
- struct {
+ static const struct {
u32 offset;
const char * const name;
} registers[] = {
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-06 8:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 8:11 [PATCH] media: s3c-camif: make array 'registers' static const, makes object smaller Colin King
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).