Search Linux Wireless

Re: [PATCH] staging: brcm80211: fix cast to pointer from integer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux