staging: rtl8192e: make const array broadcast_addr static, reduces object code size

Don't populate const array broadcast_addr on the stack, instead make it
static. Makes the object code smaller by over 40 bytes:

Before:
   text	   data	    bss	    dec	    hex	filename
  63906	   8248	   1216	  73370	  11e9a	rtllib_softmac.o

After:
   text	   data	    bss	    dec	    hex	filename
  63806	   8304	   1216	  73326	  11e6e	rtllib_softmac.o

(gcc 6.3.0, x86-64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Colin Ian King 2017-09-22 16:20:18 +01:00 committed by Greg Kroah-Hartman
parent 4af8dd1e31
commit 1ce72e8ac5
1 changed files with 3 additions and 2 deletions

View File

@ -2811,8 +2811,9 @@ exit:
static struct sk_buff *rtllib_get_beacon_(struct rtllib_device *ieee)
{
const u8 broadcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
static const u8 broadcast_addr[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
struct sk_buff *skb;
struct rtllib_probe_response *b;