staging: rtlwifi: Remove function that only returns zero
authorMaya Nakamura <m.maya.nakamura@gmail.com>
Sat, 27 Oct 2018 10:16:39 +0000 (03:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Nov 2018 13:16:33 +0000 (14:16 +0100)
Because the odm_sq_process_patch_rt_cid_819x_lenovo function is only called
to return zero, remove the unnecessary function and change the section that
calls it. Issues found by Coccinelle's semantic patch results for
returnvar.cocci and checkpatch.pl.

Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtlwifi/phydm/phydm_hwconfig.c

index c71ac12..1b05db3 100644 (file)
@@ -477,14 +477,6 @@ static u8 odm_query_rx_pwr_percentage(s8 ant_power)
                return 100 + ant_power;
 }
 
-static u8 odm_sq_process_patch_rt_cid_819x_lenovo(struct phy_dm_struct *dm,
-                                                 u8 is_cck_rate, u8 pwdb_all,
-                                                 u8 path, u8 RSSI)
-{
-       u8 sq = 0;
-       return sq;
-}
-
 static u8 odm_evm_db_to_percentage(s8 value)
 {
        /* -33dB~0dB to 0%~99% */
@@ -883,13 +875,10 @@ static void odm_rx_phy_status_jaguar_series_parsing(
                phy_info->recv_signal_power = rx_pwr_all;
                /*(3) Get Signal Quality (EVM)*/
                {
-                       u8 sq;
+                       u8 sq = 0;
 
-                       if ((dm->support_platform == ODM_WIN) &&
-                           (dm->patch_id == RT_CID_819X_LENOVO))
-                               sq = odm_sq_process_patch_rt_cid_819x_lenovo(
-                                       dm, is_cck_rate, pwdb_all, 0, 0);
-                       else
+                       if (!(dm->support_platform == ODM_WIN &&
+                             dm->patch_id == RT_CID_819X_LENOVO))
                                sq = phydm_get_signal_quality_8812(phy_info, dm,
                                                                   phy_sta_rpt);