From patchwork Fri Jun 26 15:40:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis de Bethencourt X-Patchwork-Id: 6682231 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EC9AD9F1C1 for ; Fri, 26 Jun 2015 15:34:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0432920561 for ; Fri, 26 Jun 2015 15:34:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF90C20557 for ; Fri, 26 Jun 2015 15:34:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751997AbbFZPeX (ORCPT ); Fri, 26 Jun 2015 11:34:23 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:33875 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751940AbbFZPeV (ORCPT ); Fri, 26 Jun 2015 11:34:21 -0400 Received: by wicnd19 with SMTP id nd19so48326227wic.1; Fri, 26 Jun 2015 08:34:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=L8W2E4r2v8XLtUBAI7Z0m8racWzmEWP1xZFFIorznPg=; b=eVEEHxFoUU7dZ27QdqA1pxE1d1LJWeocUes7IZRO6SQmmvshprFbEeYkIT+908v5Uo P75Y7vn/ZcLbau1WV8uhp4K+gX1eQp0jbEE/2VO6rdHOEe0U1ucu+/sXYJjUaH6jro5g Tl+CnJJwdj4FM5gBo1Ql5yYkeMwnWg21tqOpRoj4GjLX9bomnXYk0vyHFnPUDKEP2rCn z+rsHC1Nkm/Yjcds9kTpOXIanB6mec5gV6+QscsTd9Nfq0MEIS6K9SKHOiZ7rVc/b7MR ohrfCKfVJmSxTA3mN7T5zz1d21ime9RUWG4j045Kypw7kNU5mR649LB5qYDNlJ7ymZ1r pmUQ== X-Received: by 10.181.13.241 with SMTP id fb17mr6073191wid.13.1435332859887; Fri, 26 Jun 2015 08:34:19 -0700 (PDT) Received: from localhost (goodgumbo.baconseed.org. [94.23.38.65]) by mx.google.com with ESMTPSA id j7sm50761866wjz.11.2015.06.26.08.34.18 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 26 Jun 2015 08:34:19 -0700 (PDT) Date: Fri, 26 Jun 2015 17:40:25 +0200 From: Luis de Bethencourt To: linux-kernel@vger.kernel.org Cc: Joe Perches , Johnny Kim , Rachel Kim , Dean Lee , Chris Park , Greg Kroah-Hartman , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org Subject: [PATCH 5/4] staging: wilc1000: switch printks to vsprintf IPv4 extension Message-ID: <20150626154022.GA32529@goodgumbo.baconseed.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Switch printks with IP addresses to use vsprintf extension %pI4. Suggested-by: Joe Perches Signed-off-by: Luis de Bethencourt --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 1915fc6..483926f 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -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"); }