staging: rtl8188eu: core: constify local structure
authorElizabeth Ferdman <gnudevliz@gmail.com>
Mon, 17 Oct 2016 06:46:30 +0000 (23:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Oct 2016 08:27:55 +0000 (10:27 +0200)
Constify the static struct RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE.

The only other instance was one of its properties being assigned to a
variable:
Index2G = RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE.Index2G;

Therefore this is a good candidate for constification.

Running size did not show any difference:
Before/After:
text    data     bss     dec     hex filename
44122     408    2974   47504    b990

Lastly, break up the long line to fix the checkpatch warning and conform
to kernel coding style.

Signed-off-by: Elizabeth Ferdman <gnudevliz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c

index fb13df586441b6f3cca147a5bf614a6cd314f6dd..c94700cf5664200c177c0ed5f161e49254eb796b 100644 (file)
@@ -133,7 +133,9 @@ static struct rt_channel_plan_map   RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
        {0x03}, /* 0x41, RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN_2G */
 };
 
-static struct rt_channel_plan_map RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE = {0x03}; /* use the combination for max channel numbers */
+static const struct rt_channel_plan_map RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE = {
+       0x03
+}; /* use the combination for max channel numbers */
 
 /*
  * Search the @param channel_num in given @param channel_set