staging: wilc1000: switch printks to vsprintf IPv4 extension
authorLuis de Bethencourt <luis@debethencourt.com>
Fri, 26 Jun 2015 15:40:25 +0000 (17:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jul 2015 02:32:56 +0000 (19:32 -0700)
Switch printks with IP addresses to use vsprintf extension %pI4.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c

index 1915fc6b51763722728603f1404ffd4f4e7f6098..483926f2843678c1fa2f9b8ba9fd0b1499011a7e 100644 (file)
@@ -740,7 +740,7 @@ s32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx)
        if (pu8IPAddr[0] < 192)
                pu8IPAddr[0] = 0;
 
-       PRINT_INFO(HOSTINF_DBG, "Indx = %d, Handling set  IP = %d.%d.%d.%d\n", idx, pu8IPAddr[0], pu8IPAddr[1], pu8IPAddr[2], pu8IPAddr[3]);
+       PRINT_INFO(HOSTINF_DBG, "Indx = %d, Handling set  IP = %pI4\n", idx, pu8IPAddr);
 
        WILC_memcpy(gs8SetIP[idx], pu8IPAddr, IP_ALEN);
 
@@ -796,7 +796,7 @@ s32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx)
 
        s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
 
-       PRINT_INFO(HOSTINF_DBG, "%d.%d.%d.%d\n", (u8)(strWID.ps8WidVal[0]), (u8)(strWID.ps8WidVal[1]), (u8)(strWID.ps8WidVal[2]), (u8)(strWID.ps8WidVal[3]));
+       PRINT_INFO(HOSTINF_DBG, "%pI4\n", strWID.ps8WidVal);
 
        WILC_memcpy(gs8GetIP[idx], strWID.ps8WidVal, IP_ALEN);
 
@@ -811,7 +811,7 @@ s32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx)
                WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
        } else {
                PRINT_INFO(HOSTINF_DBG, "IP address retrieved:: u8IfIdx = %d\n", idx);
-               PRINT_INFO(HOSTINF_DBG, "%d.%d.%d.%d\n", gs8GetIP[idx][0], gs8GetIP[idx][1], gs8GetIP[idx][2], gs8GetIP[idx][3]);
+               PRINT_INFO(HOSTINF_DBG, "%pI4\n", gs8GetIP[idx]);
                PRINT_INFO(HOSTINF_DBG, "\n");
        }