linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: Clemens Noss <cnoss@gmx.de>
Cc: linux-wireless@vger.kernel.org, arend@broadcom.com,
	rvossen@broadcom.com, henryp@broadcom.com, brudley@broadcom.com
Subject: Re: [PATCH] staging: brcm80211: fix cast to pointer from integer
Date: Sun, 15 May 2011 20:10:16 +0200	[thread overview]
Message-ID: <4DD01708.3000603@hauke-m.de> (raw)
In-Reply-To: <1305479060-22755-1-git-send-email-cnoss@gmx.de>

On 05/15/2011 07:04 PM, Clemens Noss wrote:
> bcm_pktq_flush and related functions only ever get 0 or a pointer for
> arg, so make it a pointer.
> 
> This might fix a crash on 64bit.
> 
> Signed-off-by: Clemens Noss <cnoss@gmx.de>
> ---
>  drivers/staging/brcm80211/brcmfmac/dhd_sdio.c  |    2 +-
>  drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c |    4 ++--
>  drivers/staging/brcm80211/brcmsmac/wlc_main.c  |    4 ++--
>  drivers/staging/brcm80211/include/bcmutils.h   |    6 +++---
>  drivers/staging/brcm80211/util/bcmutils.c      |    4 ++--
>  5 files changed, 10 insertions(+), 10 deletions(-)

> ....

> diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
> index 5b041a6..0d93bd6 100644
> --- a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
> +++ b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
> @@ -1225,7 +1225,7 @@ void wlc_ampdu_shm_upd(struct ampdu_info *ampdu)
>  /*
>   * callback function that helps flushing ampdu packets from a priority queue
>   */
> -static bool cb_del_ampdu_pkt(void *p, int arg_a)
> +static bool cb_del_ampdu_pkt(void *p, void *arg_a)
>  {
>  	struct sk_buff *mpdu = (struct sk_buff *)p;
>  	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(mpdu);
Why don't you use the correct pointer type here instead of casting then
around and the parameter names are meaningless too.

static bool cb_del_ampdu_pkt(struct sk_buff *mpdu, struct
cb_del_ampdu_pars *ampdu_pars)

The signature of dma_cb_fn_ampdu(void *txi, void *arg_a) should be
changed too.

> ...

Hauke

  reply	other threads:[~2011-05-15 18:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-15 17:04 [PATCH] staging: brcm80211: fix cast to pointer from integer Clemens Noss
2011-05-15 18:10 ` Hauke Mehrtens [this message]
2011-05-15 19:54   ` Arend van Spriel
2011-05-15 20:50     ` [PATCH] staging: brcm80211: use correct pointer types in bcm_pktq_flush Clemens Noss
2011-05-16 11:11       ` Roland Vossen
2011-05-15 19:59 ` [PATCH] staging: brcm80211: fix cast to pointer from integer Arend van Spriel
     [not found] <1305492330-19575-1-git-send-email-cnoss@gmx.de>
2011-05-16 11:09 ` Roland Vossen
2011-05-16 20:33   ` Greg KH
2011-05-17 10:53     ` Roland Vossen

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=4DD01708.3000603@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=arend@broadcom.com \
    --cc=brudley@broadcom.com \
    --cc=cnoss@gmx.de \
    --cc=henryp@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rvossen@broadcom.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).