staging: r8188eu: make dump_chip_info() static
authorMichael Straube <straube.linux@gmail.com>
Sun, 24 Jul 2022 18:25:20 +0000 (20:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jul 2022 06:45:22 +0000 (08:45 +0200)
The function dump_chip_info() is only used in rtl8188e_hal_init.c.
Make it static to reduce the driver object file size by 281 bytes.

before:
  text    data     bss     dec     hex filename
530606   43897    7072  581575   8dfc7 drivers/staging/r8188eu/r8188eu.o

after:
  text    data     bss     dec     hex filename
530405   43817    7072  581294   8deae drivers/staging/r8188eu/r8188eu.o

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220724182520.7794-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/hal_com.c
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
drivers/staging/r8188eu/include/hal_com.h

index e9a32dd84a8ef9a92b24b03fe3edc540cddc5ccd..6a1cdc67335b37ea8b21b31458c4c2e2e4649f09 100644 (file)
 
 #define _HAL_INIT_C_
 
-void dump_chip_info(struct HAL_VERSION chip_vers)
-{
-       uint cnt = 0;
-       char buf[128];
-
-       cnt += sprintf((buf + cnt), "Chip Version Info: CHIP_8188E_");
-       cnt += sprintf((buf + cnt), "%s_", IS_NORMAL_CHIP(chip_vers) ?
-                      "Normal_Chip" : "Test_Chip");
-       cnt += sprintf((buf + cnt), "%s_", IS_CHIP_VENDOR_TSMC(chip_vers) ?
-                      "TSMC" : "UMC");
-
-       switch (chip_vers.CUTVersion) {
-       case A_CUT_VERSION:
-               cnt += sprintf((buf + cnt), "A_CUT_");
-               break;
-       case B_CUT_VERSION:
-               cnt += sprintf((buf + cnt), "B_CUT_");
-               break;
-       case C_CUT_VERSION:
-               cnt += sprintf((buf + cnt), "C_CUT_");
-               break;
-       case D_CUT_VERSION:
-               cnt += sprintf((buf + cnt), "D_CUT_");
-               break;
-       case E_CUT_VERSION:
-               cnt += sprintf((buf + cnt), "E_CUT_");
-               break;
-       default:
-               cnt += sprintf((buf + cnt), "UNKNOWN_CUT(%d)_", chip_vers.CUTVersion);
-               break;
-       }
-
-       cnt += sprintf((buf + cnt), "1T1R_");
-
-       cnt += sprintf((buf + cnt), "RomVer(%d)\n", 0);
-
-       pr_info("%s", buf);
-}
-
 #define        CHAN_PLAN_HW    0x80
 
 u8 /* return the final channel plan decision */
index fe477438899ea2ca272564eff4c31255a988adb7..5b8f1a912bbb75bd8405acb89e9a7f94a2c1d559 100644 (file)
@@ -526,6 +526,45 @@ void rtl8188e_ReadEFuse(struct adapter *Adapter, u16 _size_byte, u8 *pbuf)
        Hal_EfuseReadEFuse88E(Adapter, 0, _size_byte, pbuf);
 }
 
+static void dump_chip_info(struct HAL_VERSION chip_vers)
+{
+       uint cnt = 0;
+       char buf[128];
+
+       cnt += sprintf((buf + cnt), "Chip Version Info: CHIP_8188E_");
+       cnt += sprintf((buf + cnt), "%s_", IS_NORMAL_CHIP(chip_vers) ?
+                      "Normal_Chip" : "Test_Chip");
+       cnt += sprintf((buf + cnt), "%s_", IS_CHIP_VENDOR_TSMC(chip_vers) ?
+                      "TSMC" : "UMC");
+
+       switch (chip_vers.CUTVersion) {
+       case A_CUT_VERSION:
+               cnt += sprintf((buf + cnt), "A_CUT_");
+               break;
+       case B_CUT_VERSION:
+               cnt += sprintf((buf + cnt), "B_CUT_");
+               break;
+       case C_CUT_VERSION:
+               cnt += sprintf((buf + cnt), "C_CUT_");
+               break;
+       case D_CUT_VERSION:
+               cnt += sprintf((buf + cnt), "D_CUT_");
+               break;
+       case E_CUT_VERSION:
+               cnt += sprintf((buf + cnt), "E_CUT_");
+               break;
+       default:
+               cnt += sprintf((buf + cnt), "UNKNOWN_CUT(%d)_", chip_vers.CUTVersion);
+               break;
+       }
+
+       cnt += sprintf((buf + cnt), "1T1R_");
+
+       cnt += sprintf((buf + cnt), "RomVer(%d)\n", 0);
+
+       pr_info("%s", buf);
+}
+
 void rtl8188e_read_chip_version(struct adapter *padapter)
 {
        u32                             value32;
index 56ba356b537127a5e49200014f654acf396816ab..d7e333f6ce39b3abe4a294dbc7633b199fd0e0ee 100644 (file)
 #define REG_NOA_DESC_START                     0x05E8
 #define REG_NOA_DESC_COUNT                     0x05EC
 
-#include "HalVerDef.h"
-void dump_chip_info(struct HAL_VERSION ChipVersion);
-
 /* return the final channel plan decision */
 u8 hal_com_get_channel_plan(struct adapter *padapter,
                            u8 hw_channel_plan,