Skip to content

Commit 5057f66

Browse files
Colin Ian KingSamuel Ortiz
authored andcommitted
nfc: s3fwrn5: make array match static const
Don't populate the read-only array match on the stack, instead make it static const. Makes the object code smaller by over 310 bytes: Before: text data bss dec hex filename 8304 1084 128 9516 252c drivers/nfc/s3fwrn5/firmware.o After: text data bss dec hex filename 7894 1180 128 9202 23f2 drivers/nfc/s3fwrn5/firmware.o Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
1 parent a122ffd commit 5057f66

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/nfc/s3fwrn5/firmware.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ static int s3fwrn5_fw_get_base_addr(
336336
struct s3fwrn5_fw_cmd_get_bootinfo_rsp *bootinfo, u32 *base_addr)
337337
{
338338
int i;
339-
struct {
339+
static const struct {
340340
u8 version[4];
341341
u32 base_addr;
342342
} match[] = {

0 commit comments

Comments
 (0)