From patchwork Fri Jul 10 05:55:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johnny Kim X-Patchwork-Id: 6761741 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8CDCFC05AC for ; Fri, 10 Jul 2015 05:56:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B6DC3206F7 for ; Fri, 10 Jul 2015 05:56:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B4142206AF for ; Fri, 10 Jul 2015 05:56:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752743AbbGJF42 (ORCPT ); Fri, 10 Jul 2015 01:56:28 -0400 Received: from eusmtp01.atmel.com ([212.144.249.243]:44293 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752463AbbGJF40 (ORCPT ); Fri, 10 Jul 2015 01:56:26 -0400 Received: from johnny-All-Series.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server id 14.3.235.1; Fri, 10 Jul 2015 07:56:19 +0200 From: Johnny Kim To: , , , CC: , , , , , Subject: [PATCH 1/3] staging: wilc1000: wilc_wlan_cfg_commit(): replace integer with pointer Date: Fri, 10 Jul 2015 14:55:55 +0900 Message-ID: <1436507759-4546-2-git-send-email-johnny.kim@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436507759-4546-1-git-send-email-johnny.kim@atmel.com> References: <1436507759-4546-1-git-send-email-johnny.kim@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.2 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 A argument of wilc_wlan_cfg_commit() is address of structure. But because the size is restricted to 32bit, it is not correct for 64bit machine. So, this changes the interger value to obvious structure pointer. Signed-off-by: Johnny Kim --- drivers/staging/wilc1000/wilc_wlan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index def72fd..d32e45e 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -1862,13 +1862,13 @@ static void wilc_wlan_cleanup(void) } -static int wilc_wlan_cfg_commit(int type, uint32_t drvHandler) +static int wilc_wlan_cfg_commit(int type, tstrWILC_WFIDrv *drvHandler) { wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan; wilc_cfg_frame_t *cfg = &p->cfg_frame; int total_len = p->cfg_frame_offset + 4 + DRIVER_HANDLER_SIZE; int seq_no = p->cfg_seq_no % 256; - int driver_handler = (u32)drvHandler; + uintptr_t driver_handler = (uintptr_t)drvHandler; /** @@ -1923,7 +1923,7 @@ static int wilc_wlan_cfg_set(int start, uint32_t wid, uint8_t *buffer, uint32_t p->cfg_frame_in_use = 1; /*Edited by Amr - BugID_4720*/ - if (wilc_wlan_cfg_commit(WILC_CFG_SET, drvHandler)) + if (wilc_wlan_cfg_commit(WILC_CFG_SET, (tstrWILC_WFIDrv *)drvHandler)) ret_size = 0; /* BugID_5213 */ if (p->os_func.os_wait(p->cfg_wait, CFG_PKTS_TIMEOUT)) { @@ -1960,7 +1960,7 @@ static int wilc_wlan_cfg_get(int start, uint32_t wid, int commit, uint32_t drvHa p->cfg_frame_in_use = 1; /*Edited by Amr - BugID_4720*/ - if (wilc_wlan_cfg_commit(WILC_CFG_QUERY, drvHandler)) + if (wilc_wlan_cfg_commit(WILC_CFG_QUERY, (tstrWILC_WFIDrv *)drvHandler)) ret_size = 0; /* BugID_5213 */