staging: rtl8723bs: remove function GetFractionValueFromString
authorNam Cao <namcaov@gmail.com>
Fri, 19 Aug 2022 13:49:38 +0000 (15:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Aug 2022 13:41:29 +0000 (15:41 +0200)
because this function is not used.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/e782bcd3ff8c33df8da7eb6b8e4bb00b1c270edc.1660916523.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/hal_com.c
drivers/staging/rtl8723bs/include/hal_com.h

index 909b37b..f82cbe5 100644 (file)
@@ -939,49 +939,6 @@ bool GetHexValueFromString(char *szStr, u32 *pu4bVal, u32 *pu4bMove)
        return true;
 }
 
-bool GetFractionValueFromString(
-       char *szStr, u8 *pInteger, u8 *pFraction, u32 *pu4bMove
-)
-{
-       char *szScan = szStr;
-
-       /*  Initialize output. */
-       *pu4bMove = 0;
-       *pInteger = 0;
-       *pFraction = 0;
-
-       /*  Skip leading space. */
-       while (*szScan != '\0' &&       (*szScan == ' ' || *szScan == '\t')) {
-               ++szScan;
-               ++(*pu4bMove);
-       }
-
-       /*  Parse each digit. */
-       do {
-               (*pInteger) *= 10;
-               *pInteger += (*szScan - '0');
-
-               ++szScan;
-               ++(*pu4bMove);
-
-               if (*szScan == '.') {
-                       ++szScan;
-                       ++(*pu4bMove);
-
-                       if (*szScan < '0' || *szScan > '9')
-                               return false;
-                       else {
-                               *pFraction = *szScan - '0';
-                               ++szScan;
-                               ++(*pu4bMove);
-                               return true;
-                       }
-               }
-       } while (*szScan >= '0' && *szScan <= '9');
-
-       return true;
-}
-
 /*  */
 /*     Description: */
 /*             Return true if szStr is comment out with leading "//". */
index 7be0ea2..b49b0a0 100644 (file)
@@ -153,9 +153,6 @@ u32 MapCharToHexDigit(char chTmp);
 
 bool GetHexValueFromString(char *szStr, u32 *pu4bVal, u32 *pu4bMove);
 
-bool GetFractionValueFromString(char *szStr, u8 *pInteger, u8 *pFraction,
-                               u32 *pu4bMove);
-
 bool IsCommentString(char *szStr);
 
 bool ParseQualifiedString(char *In, u32 *Start, char *Out, char LeftQualifier,