Skip to content

Commit

Permalink
libertas: remove casts from lbs_cmd() and lbs_cmd_with_response() macros
Browse files Browse the repository at this point in the history
If stupid people like me give it arguments with the wrong type (like a
pointer to the structure, for example, instead of the structure itself),
then we should probably notice that at compile time. Otherwise, much
confusion ensues.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
David Woodhouse authored and David S. Miller committed Jan 28, 2008
1 parent 301eacb commit 0f1c823
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/libertas/cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#include "dev.h"

#define lbs_cmd(priv, cmdnr, cmd, callback, callback_arg) \
__lbs_cmd(priv, cmdnr, (struct cmd_header *) &cmd, sizeof(cmd), \
__lbs_cmd(priv, cmdnr, &(cmd).hdr, sizeof(cmd), \
callback, callback_arg)

#define lbs_cmd_with_response(priv, cmdnr, cmd) \
__lbs_cmd(priv, cmdnr, (struct cmd_header *) &cmd, sizeof(cmd), \
__lbs_cmd(priv, cmdnr, &(cmd).hdr, sizeof(cmd), \
lbs_cmd_copyback, (unsigned long) &cmd)

int __lbs_cmd(struct lbs_private *priv, uint16_t command,
Expand Down

0 comments on commit 0f1c823

Please sign in to comment.