Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:48596 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031664AbbKEDEf (ORCPT ); Wed, 4 Nov 2015 22:04:35 -0500 Date: Wed, 4 Nov 2015 19:04:32 -0800 From: Greg KH To: glen lee Cc: devel@driverdev.osuosl.org, austin.shin@atmel.com, linux-wireless@vger.kernel.org, Nicolas.FERRE@atmel.com, adel.noureldin@atmel.com, tony.cho@atmel.com, leo.kim@atmel.com, adham.abozaeid@atmel.com Subject: Re: [PATCH RESEND 12/12] staging: wilc1000: add argument wilc and use it instead of g_linux_wlan Message-ID: <20151105030432.GA30860@kroah.com> (sfid-20151105_040453_652139_F4DAEC1E) References: <1446088732-12301-1-git-send-email-glen.lee@atmel.com> <1446088732-12301-12-git-send-email-glen.lee@atmel.com> <20151104204120.GB15421@kroah.com> <563ABD77.2050303@atmel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 In-Reply-To: <563ABD77.2050303@atmel.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: On Thu, Nov 05, 2015 at 11:22:47AM +0900, glen lee wrote: > > On 2015년 11월 05일 05:41, Greg KH wrote: > >On Thu, Oct 29, 2015 at 12:18:52PM +0900, Glen Lee wrote: > >>This patch adds new argument wilc to linux_sdio_cmd53 and linux_sdio_cmd52 > >>, and use it instead of g_linux_wlan. Pass wilc to the functions as well. > >>The void type wilc will be changed with struct wilc when SDIO and SPI > >>modules are reworked. > >> > >>Signed-off-by: Glen Lee > >>--- > >> drivers/staging/wilc1000/linux_wlan_sdio.c | 8 ++-- > >> drivers/staging/wilc1000/linux_wlan_sdio.h | 4 +- > >> drivers/staging/wilc1000/wilc_sdio.c | 66 +++++++++++++++--------------- > >> drivers/staging/wilc1000/wilc_wlan_if.h | 4 +- > >> 4 files changed, 41 insertions(+), 41 deletions(-) > >> > >>diff --git a/drivers/staging/wilc1000/linux_wlan_sdio.c b/drivers/staging/wilc1000/linux_wlan_sdio.c > >>index bf05e22..8150d6f 100644 > >>--- a/drivers/staging/wilc1000/linux_wlan_sdio.c > >>+++ b/drivers/staging/wilc1000/linux_wlan_sdio.c > >>@@ -53,9 +53,9 @@ static void wilc_sdio_interrupt(struct sdio_func *func) > >> } > >>-int linux_sdio_cmd52(sdio_cmd52_t *cmd) > >>+int linux_sdio_cmd52(void *wilc, sdio_cmd52_t *cmd) > >Again, why a void *? Please use the correct type, you know what it is, > >that way you can get rid of horrid stuff like this: > > > >> { > >>- struct sdio_func *func = g_linux_wlan->wilc_sdio_func; > >>+ struct sdio_func *func = ((struct wilc*)wilc)->wilc_sdio_func; > >All of those casts should not be needed. > > I was planning to change this void type with struct wilc as I commented in changelog. Sorry, I missed that. But you should still not do an intermediate step that you know is wrong :) > But as you pointed out, I will do this after fixing current SDIO modules. That sounds reasonable, thanks. greg k-h