linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: "Hauke Mehrtens" <hauke@hauke-m.de>
Cc: "Clemens Noss" <cnoss@gmx.de>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"Roland Vossen" <rvossen@broadcom.com>,
	"Henry Ptasinski" <henryp@broadcom.com>,
	"Brett Rudley" <brudley@broadcom.com>
Subject: Re: [PATCH] staging: brcm80211: fix cast to pointer from integer
Date: Sun, 15 May 2011 21:54:26 +0200	[thread overview]
Message-ID: <4DD02F72.3070905@broadcom.com> (raw)
In-Reply-To: <4DD01708.3000603@hauke-m.de>

On 05/15/2011 08:10 PM, Hauke Mehrtens wrote:
> 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>
>> ---
> 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.
Actually this is a generic callback mechanism in which an additional 
parameter can be passed, which can be of *any* type hence a void pointer 
seems justified here and a meaningless name is used. I do agree that the 
txi parameter will always be a struct sk_buff and should be indicated as 
such.

Apart from that: good catch. This indeed may cause issues on 64-bit systems.

Gr. AvS

-- 
Almost nobody dances sober, unless they happen to be insane.
-- H.P. Lovecraft --



  reply	other threads:[~2011-05-15 19:54 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
2011-05-15 19:54   ` Arend van Spriel [this message]
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=4DD02F72.3070905@broadcom.com \
    --to=arend@broadcom.com \
    --cc=brudley@broadcom.com \
    --cc=cnoss@gmx.de \
    --cc=hauke@hauke-m.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).