All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julian Calaby <julian.calaby@gmail.com>
To: Johnny Kim <johnny.kim@atmel.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Chris Park <chris.park@atmel.com>,
	Rachel Kim <rachel.kim@atmel.com>,
	tony.cho@atmel.com, Nicolas.FERRE@atmel.com,
	Dean Lee <dean.lee@atmel.com>,
	austin.shin@atmel.com
Subject: Re: [PATCH 1/3] staging: wilc1000: wilc_wlan_cfg_commit(): replace integer with pointer
Date: Fri, 10 Jul 2015 16:20:37 +1000	[thread overview]
Message-ID: <CAGRGNgX4xctq0XmEt-g3fnLG_PyUj6kHxEf1=hd41tjxcWEnCw@mail.gmail.com> (raw)
In-Reply-To: <1436507759-4546-2-git-send-email-johnny.kim@atmel.com>

Hi Johnny,

On Fri, Jul 10, 2015 at 3:55 PM, Johnny Kim <johnny.kim@atmel.com> wrote:
> 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 <johnny.kim@atmel.com>
> ---
>  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;

Er, why not just remove this variable and use drvHandler directly?

> @@ -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))

No need to cast it to it's own type.

>                         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))

Ditto.

Thanks,

-- 
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/

  reply	other threads:[~2015-07-10  6:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-10  5:55 [PATCH 0/3] staging: wilc1000: rework integer value for x64 Johnny Kim
2015-07-10  5:55 ` [PATCH 1/3] staging: wilc1000: wilc_wlan_cfg_commit(): replace integer with pointer Johnny Kim
2015-07-10  6:20   ` Julian Calaby [this message]
2015-07-10  7:58     ` Johnny Kim
2015-07-10 10:05       ` Julian Calaby
2015-07-10  5:55 ` [PATCH 2/3] staging: wilc1000: wilc_wlan_cfg_get(): replace integer with void pointer Johnny Kim
2015-07-10  6:25   ` Julian Calaby
2015-07-10  8:11     ` Johnny Kim
2015-07-10 10:17       ` Julian Calaby
2015-07-14 21:12   ` Greg KH
2015-07-10  5:55 ` [PATCH 3/3] staging: wilc1000: wilc_wlan_cfg_set(): " Johnny Kim
2015-07-10  6:26   ` Julian Calaby

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='CAGRGNgX4xctq0XmEt-g3fnLG_PyUj6kHxEf1=hd41tjxcWEnCw@mail.gmail.com' \
    --to=julian.calaby@gmail.com \
    --cc=Nicolas.FERRE@atmel.com \
    --cc=austin.shin@atmel.com \
    --cc=chris.park@atmel.com \
    --cc=dean.lee@atmel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=johnny.kim@atmel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rachel.kim@atmel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.