summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-05-05 21:06:18 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-06-08 15:50:38 +0200
commitbc4f21fcc03ddd816dac1db00918680bf7bf9d86 (patch)
treea06cc717fc42d99cfa17ae6dd4686b4fd50fdce4 /drivers/media/dvb-frontends
parent038cc978777378884a40d1517c88eace13ddc49d (diff)
media: mxl692: make a const array static, makes object smaller
Don't populate the const array fw_hdr on the stack but instead it static. Makes the object code smaller by 5 bytes: Before: text data bss dec hex filename 31948 12072 64 44084 ac34 drivers/media/dvb-frontends/mxl692.o After: text data bss dec hex filename 31879 12136 64 44079 ac2f drivers/media/dvb-frontends/mxl692.o (gcc version 10.3.0) Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r--drivers/media/dvb-frontends/mxl692.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/mxl692.c b/drivers/media/dvb-frontends/mxl692.c
index 83030643aba7..a246db683cdf 100644
--- a/drivers/media/dvb-frontends/mxl692.c
+++ b/drivers/media/dvb-frontends/mxl692.c
@@ -224,7 +224,9 @@ static int mxl692_validate_fw_header(struct mxl692_dev *dev,
u32 ix, temp;
__be32 *local_buf = NULL;
u8 temp_cksum = 0;
- const u8 fw_hdr[] = { 0x4D, 0x31, 0x10, 0x02, 0x40, 0x00, 0x00, 0x80 };
+ static const u8 fw_hdr[] = {
+ 0x4D, 0x31, 0x10, 0x02, 0x40, 0x00, 0x00, 0x80
+ };
if (memcmp(buffer, fw_hdr, 8) != 0) {
status = -EINVAL;