Skip to content

Commit

Permalink
nfc: s3fwrn5: make array match static const
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Colin Ian King authored and Samuel Ortiz committed Nov 6, 2017
1 parent a122ffd commit 5057f66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nfc/s3fwrn5/firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ static int s3fwrn5_fw_get_base_addr(
struct s3fwrn5_fw_cmd_get_bootinfo_rsp *bootinfo, u32 *base_addr)
{
int i;
struct {
static const struct {
u8 version[4];
u32 base_addr;
} match[] = {
Expand Down

0 comments on commit 5057f66

Please sign in to comment.