From patchwork Thu Oct 8 18:23:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kholmanskikh X-Patchwork-Id: 7354621 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 148C1BEEA4 for ; Thu, 8 Oct 2015 18:24:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 522E72060E for ; Thu, 8 Oct 2015 18:24:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5FE5C20527 for ; Thu, 8 Oct 2015 18:24:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758052AbbJHSXd (ORCPT ); Thu, 8 Oct 2015 14:23:33 -0400 Received: from mail-lb0-f195.google.com ([209.85.217.195]:35303 "EHLO mail-lb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751938AbbJHSXc (ORCPT ); Thu, 8 Oct 2015 14:23:32 -0400 Received: by lbcao8 with SMTP id ao8so6007182lbc.2; Thu, 08 Oct 2015 11:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=HfIQGR49jJxeGYFNydynqkAX+qAgOLGIzjL5l7bflIU=; b=tE7OGpqt6+0+tjxeLfEt0B4KrwFm5JoJsCGtOlbPbgTw7iW5KygY413+p2Zo2vrMDP TiSca5ZKy+HztdedggbF/PpgOkoNRSFwMpQw0W184hkQ1o931dIEEkpwtjKTNlxepLjj EqfrIl26l6gjBlQD4CGd4zr1f5YkjFFLVlQQm1Z+K1bob0tgSwvVydo4/AXPQuSJaaYk SLgv0jsP0RQODNTnmgRtQkSyrxjXQmH8JcvTX80k5cbMKhpJEZwVM8wbn8sCR7g5zwV2 wgmp1DIB8u3prqf0zeYbatAHw2dV4Xp/ES54m0z1aXK1c+l1cXXWqVR3tNPHz/QpjmLi EvFw== X-Received: by 10.112.181.71 with SMTP id du7mr4362711lbc.37.1444328610477; Thu, 08 Oct 2015 11:23:30 -0700 (PDT) Received: from localhost.localdomain ([93.92.200.170]) by smtp.googlemail.com with ESMTPSA id wj8sm7436339lbb.44.2015.10.08.11.23.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Oct 2015 11:23:29 -0700 (PDT) From: Stanislav Kholmanskikh To: johnny.kim@atmel.com, rachel.kim@atmel.com, chris.park@atmel.com, tony.cho@atmel.com, glen.lee@atmel.com, leo.kim@atmel.com, gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Stanislav Kholmanskikh Subject: [PATCH 1/2] staging: wilc1000: linux_wlan_spi: correct types Date: Thu, 8 Oct 2015 21:23:13 +0300 Message-Id: <1444328594-10656-1-git-send-email-kholmanskikh.s.s@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_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 linux_spi_write(), linux_spi_read(), linux_spi_write_read(): nwi->io_func.u.spi.spi_tx = linux_spi_write; nwi->io_func.u.spi.spi_rx = linux_spi_read; nwi->io_func.u.spi.spi_trx = linux_spi_write_read; are expected to accept arguments of 'u8 *', u32 types: struct { int (*spi_max_speed)(void); int (*spi_tx)(u8 *, u32); int (*spi_rx)(u8 *, u32); int (*spi_trx)(u8 *, u8 *, u32); } spi; However, linux_spi_read() and linux_spi_write_read() do not do this, they use 'unsigned char *' and 'unsigned long' instead. Changed the types of their arguments to satisfy the expectations. Signed-off-by: Stanislav Kholmanskikh --- drivers/staging/wilc1000/linux_wlan_spi.c | 12 ++++++------ drivers/staging/wilc1000/linux_wlan_spi.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan_spi.c b/drivers/staging/wilc1000/linux_wlan_spi.c index 51bbd96..c6c1f6e 100644 --- a/drivers/staging/wilc1000/linux_wlan_spi.c +++ b/drivers/staging/wilc1000/linux_wlan_spi.c @@ -243,7 +243,7 @@ int linux_spi_write(u8 *b, u32 len) #if defined(TXRX_PHASE_SIZE) -int linux_spi_read(unsigned char *rb, unsigned long rlen) +int linux_spi_read(u8 *rb, u32 rlen) { int ret; @@ -307,7 +307,7 @@ int linux_spi_read(unsigned char *rb, unsigned long rlen) kfree(t_buffer); } else { - PRINT_ER("can't read data with the following length: %ld\n", rlen); + PRINT_ER("can't read data with the following length: %u\n", rlen); ret = -1; } /* change return value to match WILC interface */ @@ -317,7 +317,7 @@ int linux_spi_read(unsigned char *rb, unsigned long rlen) } #else -int linux_spi_read(unsigned char *rb, unsigned long rlen) +int linux_spi_read(u8 *rb, u32 rlen) { int ret; @@ -351,7 +351,7 @@ int linux_spi_read(unsigned char *rb, unsigned long rlen) } kfree(t_buffer); } else { - PRINT_ER("can't read data with the following length: %ld\n", rlen); + PRINT_ER("can't read data with the following length: %u\n", rlen); ret = -1; } /* change return value to match WILC interface */ @@ -362,7 +362,7 @@ int linux_spi_read(unsigned char *rb, unsigned long rlen) #endif -int linux_spi_write_read(unsigned char *wb, unsigned char *rb, unsigned int rlen) +int linux_spi_write_read(u8 *wb, u8 *rb, u32 rlen) { int ret; @@ -390,7 +390,7 @@ int linux_spi_write_read(unsigned char *wb, unsigned char *rb, unsigned int rlen PRINT_ER("SPI transaction failed\n"); } } else { - PRINT_ER("can't read data with the following length: %d\n", rlen); + PRINT_ER("can't read data with the following length: %u\n", rlen); ret = -1; } /* change return value to match WILC interface */ diff --git a/drivers/staging/wilc1000/linux_wlan_spi.h b/drivers/staging/wilc1000/linux_wlan_spi.h index d8eed0f..7356785 100644 --- a/drivers/staging/wilc1000/linux_wlan_spi.h +++ b/drivers/staging/wilc1000/linux_wlan_spi.h @@ -9,6 +9,6 @@ int linux_spi_init(void *vp); void linux_spi_deinit(void *vp); int linux_spi_write(u8 *b, u32 len); int linux_spi_read(u8 *rb, u32 rlen); -int linux_spi_write_read(unsigned char *wb, unsigned char *rb, unsigned int rlen); +int linux_spi_write_read(u8 *wb, u8 *rb, u32 rlen); int linux_spi_set_max_speed(void); #endif