linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Johnny Kim <johnny.kim@atmel.com>
Cc: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org,
	Rachel.kim@atmel.com, dean.lee@atmel.com, tony.cho@atmel.com,
	chris.park@atmel.com
Subject: Re: [PATCH 2/4] staging: wilc1000: add syntax for 64-bit machine
Date: Wed, 10 Jun 2015 12:37:55 -0700	[thread overview]
Message-ID: <20150610193755.GA13550@kroah.com> (raw)
In-Reply-To: <1433923607-20927-3-git-send-email-johnny.kim@atmel.com>

On Wed, Jun 10, 2015 at 05:06:45PM +0900, Johnny Kim wrote:
> The driver take pointer value to integer value for message packet.
> So, The driver was fixed to save and load the address
> on 64-bit machine.
> 
> Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
> ---
>  drivers/staging/wilc1000/host_interface.c | 24 ++++++++++++++++++++----
>  drivers/staging/wilc1000/wilc_wlan.c      | 19 +++++++++++++++----
>  drivers/staging/wilc1000/wilc_wlan.h      |  6 +++++-
>  3 files changed, 40 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index cfe3364..4b005fa 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -6918,9 +6918,14 @@ void NetworkInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length)
>  {
>  	WILC_Sint32 s32Error = WILC_SUCCESS;
>  	tstrHostIFmsg strHostIFmsg;
> -	size_t drvHandler;
> +	size_t drvHandler = 0;
>  	tstrWILC_WFIDrv *pstrWFIDrv = NULL;
>  
> +#ifdef CONFIG_64BIT
> +	drvHandler = ((pu8Buffer[u32Length - 8]) | (pu8Buffer[u32Length - 7] << 8) | (pu8Buffer[u32Length - 6] << 16) | (pu8Buffer[u32Length - 5] << 24));
> +	drvHandler <<= 32;
> +#endif

Ick, no, you should never have #ifdef lines in your .c files, that shows
you are doing something really wrong.  You will note that other drivers
do not do this.  Please fix this up properly.

thanks,

greg k-h

  parent reply	other threads:[~2015-06-10 19:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-10  8:06 [PATCH 0/4] staging: wilc1000: fix compile warnings and clean other Johnny Kim
2015-06-10  8:06 ` [PATCH 1/4] staging: wilc1000: modify data type Johnny Kim
2015-06-10  9:36   ` Dan Carpenter
2015-06-11  0:40   ` Greg KH
2015-06-11  5:33     ` Johnny Kim
2015-06-11 14:46       ` Greg KH
2015-06-10  8:06 ` [PATCH 2/4] staging: wilc1000: add syntax for 64-bit machine Johnny Kim
2015-06-10 10:12   ` Julian Calaby
2015-06-10 19:37   ` Greg KH [this message]
2015-06-10  8:06 ` [PATCH 3/4] staging: wilc1000: modify printk format Johnny Kim
2015-06-11  0:42   ` Greg KH
2015-06-10  8:06 ` [PATCH 4/4] staging: wilc1000: remove uninitialized warnings Johnny Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150610193755.GA13550@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Rachel.kim@atmel.com \
    --cc=chris.park@atmel.com \
    --cc=dean.lee@atmel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=johnny.kim@atmel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=tony.cho@atmel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).