Skip to content

Commit

Permalink
staging: brcm80211: use correct pointer types in bcm_pktq_flush
Browse files Browse the repository at this point in the history
to clarify the intention:

On Sun, May 15, 2011 at 09:54:26PM +0200, Arend van Spriel wrote:
> On 05/15/2011 08:10 PM, Hauke Mehrtens wrote:
[...]
>> 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)
[...]
> 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.

Reported-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Clemens Noss <cnoss@gmx.de>
Acked-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Clemens Noss authored and Greg Kroah-Hartman committed May 17, 2011
1 parent 84067de commit aacd531
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1204,9 +1204,8 @@ 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, void *arg_a)
static bool cb_del_ampdu_pkt(struct sk_buff *mpdu, void *arg_a)
{
struct sk_buff *mpdu = (struct sk_buff *)p;
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(mpdu);
struct cb_del_ampdu_pars *ampdu_pars =
(struct cb_del_ampdu_pars *)arg_a;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/include/bcmutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
#define PKTQ_PREC_ITER(pq, prec) for (prec = (pq)->num_prec - 1; prec >= 0; prec--)

/* fn(pkt, arg). return true if pkt belongs to if */
typedef bool(*ifpkt_cb_t) (void *, void *);
typedef bool(*ifpkt_cb_t) (struct sk_buff *, void *);

/* operations on a specific precedence in packet queue */

Expand Down

0 comments on commit aacd531

Please sign in to comment.