From patchwork Thu Aug 20 07:32:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Cho X-Patchwork-Id: 7041361 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 ADBC49F372 for ; Thu, 20 Aug 2015 07:33:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D08DF20502 for ; Thu, 20 Aug 2015 07:33:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF64B20503 for ; Thu, 20 Aug 2015 07:33:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752136AbbHTHdo (ORCPT ); Thu, 20 Aug 2015 03:33:44 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:18504 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751283AbbHTHdn (ORCPT ); Thu, 20 Aug 2015 03:33:43 -0400 Received: from tony-ThinkPad-T420.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.30) with Microsoft SMTP Server id 14.3.235.1; Thu, 20 Aug 2015 09:33:37 +0200 From: Tony Cho To: CC: , , , , , , , , , , , , , Subject: [PATCH 2/5] staging: wilc1000: add an argument for Handle_SetWfiDrvHandler Date: Thu, 20 Aug 2015 16:32:51 +0900 Message-ID: <1440055974-9998-3-git-send-email-tony.cho@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440055974-9998-1-git-send-email-tony.cho@atmel.com> References: <1440055974-9998-1-git-send-email-tony.cho@atmel.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Johnny Kim Similar to functions of same layer, this patch add an argument for Handle_SetWfiDrvHandler function. As a result, the redundant typecasting is removed. Signed-off-by: Johnny Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 0913d18..47e43cc 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -637,12 +637,13 @@ static s32 Handle_SetChannel(tstrWILC_WFIDrv *drvHandler, tstrHostIFSetChan *pst * @date * @version 1.0 */ -static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHandler) +static s32 Handle_SetWfiDrvHandler(tstrWILC_WFIDrv *drvHandler, + tstrHostIfSetDrvHandler *pstrHostIfSetDrvHandler) { s32 s32Error = WILC_SUCCESS; tstrWID strWID; - tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)((pstrHostIfSetDrvHandler->u32Address)); + tstrWILC_WFIDrv *pstrWFIDrv = drvHandler; /*prepare configuration packet*/ @@ -656,7 +657,7 @@ static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHand s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); - if ((pstrHostIfSetDrvHandler->u32Address) == (u32)NULL) + if (pstrWFIDrv == NULL) up(&hSemDeinitDrvHandle); @@ -4474,7 +4475,8 @@ static int hostIFthread(void *pvArg) break; case HOST_IF_MSG_SET_WFIDRV_HANDLER: - Handle_SetWfiDrvHandler(&strHostIFmsg.uniHostIFmsgBody.strHostIfSetDrvHandler); + Handle_SetWfiDrvHandler(strHostIFmsg.drvHandler, + &strHostIFmsg.uniHostIFmsgBody.strHostIfSetDrvHandler); break; case HOST_IF_MSG_SET_OPERATION_MODE: @@ -5819,7 +5821,7 @@ s32 host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *u32address) memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg)); strHostIFmsg.u16MsgId = HOST_IF_MSG_SET_WFIDRV_HANDLER; strHostIFmsg.uniHostIFmsgBody.strHostIfSetDrvHandler.u32Address = u32address; - /* strHostIFmsg.drvHandler=hWFIDrv; */ + strHostIFmsg.drvHandler = u32address; s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg)); if (s32Error)