linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Dean Lee <dean.lee@atmel.com>
Cc: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org,
	rachel.kim@atmel.com, chris.park@atmel.com, johnny.kim@atmel.com
Subject: Re: [PATCH 1/2] staging: wilc1000: modify type casting warning
Date: Tue, 16 Jun 2015 06:06:43 -0700	[thread overview]
Message-ID: <20150616130643.GB11143@kroah.com> (raw)
In-Reply-To: <1434438685-24336-1-git-send-email-dean.lee@atmel.com>

On Tue, Jun 16, 2015 at 04:11:24PM +0900, Dean Lee wrote:
> modify message "warning: cast from pointer to integer of different size".
> add type cast 'uintptr_t'.
> 
> Signed-off-by: Dean Lee <dean.lee@atmel.com>
> ---
> Change Log:
>  add Signed-off-by line
> 
>  drivers/staging/wilc1000/host_interface.c         | 129 +++++++++++-----------
>  drivers/staging/wilc1000/linux_wlan.c             |   8 +-
>  drivers/staging/wilc1000/wilc_wfi_cfgoperations.c |  22 ++--
>  3 files changed, 80 insertions(+), 79 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index 3f139ae..358283f 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -1,5 +1,6 @@
>  #include "host_interface.h"
>  #include "coreconfigurator.h"
> +#include <linux/types.h>
>  
>  extern s32 TransportInit(void);
>  extern s32 TransportDeInit(void);
> @@ -620,7 +621,7 @@ static s32 Handle_SetChannel(void *drvHandler, tstrHostIFSetChan *pstrHostIFSetC
>  
>  	PRINT_D(HOSTINF_DBG, "Setting channel\n");
>  	/*Sending Cfg*/
> -	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
> +	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)(uintptr_t)pstrWFIDrv);

This shows you are doing something really wrong here, why not just fix
the function type to be a real pointer to a real structure?  Or even
better, just remove the parameter as I don't think they are even used.

thanks,

greg k-h

  parent reply	other threads:[~2015-06-16 13:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16  7:11 [PATCH 1/2] staging: wilc1000: modify type casting warning Dean Lee
2015-06-16  7:11 ` [PATCH 2/2] staging: wilc1000: modify uninitialized warning Dean Lee
2015-06-17  2:21   ` Greg KH
2015-06-16 13:06 ` Greg KH [this message]
2015-06-22  9:29   ` [PATCH 1/2] staging: wilc1000: modify type casting warning Dan Carpenter

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=20150616130643.GB11143@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --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=rachel.kim@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).