Skip to content

Commit

Permalink
iwlagn: remove unnecessary type for tracing operations
Browse files Browse the repository at this point in the history
The device tracing routines only use the priv pointer as an opaque
value.  Change from a typed iwl_priv pointer to a null pointer and
eliminate the need to include iwl_priv.h.  CMD_ASYNC is defined in
iwl_shared.h which is the only reason it is included.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Don Fry authored and John W. Linville committed Nov 8, 2011
1 parent 5601240 commit 5510697
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlwifi/iwl-devtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

/* sparse doesn't like tracepoint macros */
#ifndef __CHECKER__
#include "iwl-dev.h"
#include "iwl-trans.h"

#define CREATE_TRACE_POINTS
#include "iwl-devtrace.h"
Expand Down
23 changes: 11 additions & 12 deletions drivers/net/wireless/iwlwifi/iwl-devtrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,21 @@

#include <linux/tracepoint.h>

struct iwl_priv;

#if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__)
#undef TRACE_EVENT
#define TRACE_EVENT(name, proto, ...) \
static inline void trace_ ## name(proto) {}
#endif

#define PRIV_ENTRY __field(struct iwl_priv *, priv)
#define PRIV_ENTRY __field(void *, priv)
#define PRIV_ASSIGN __entry->priv = priv

#undef TRACE_SYSTEM
#define TRACE_SYSTEM iwlwifi_io

TRACE_EVENT(iwlwifi_dev_ioread32,
TP_PROTO(struct iwl_priv *priv, u32 offs, u32 val),
TP_PROTO(void *priv, u32 offs, u32 val),
TP_ARGS(priv, offs, val),
TP_STRUCT__entry(
PRIV_ENTRY
Expand All @@ -60,7 +59,7 @@ TRACE_EVENT(iwlwifi_dev_ioread32,
);

TRACE_EVENT(iwlwifi_dev_iowrite8,
TP_PROTO(struct iwl_priv *priv, u32 offs, u8 val),
TP_PROTO(void *priv, u32 offs, u8 val),
TP_ARGS(priv, offs, val),
TP_STRUCT__entry(
PRIV_ENTRY
Expand All @@ -76,7 +75,7 @@ TRACE_EVENT(iwlwifi_dev_iowrite8,
);

TRACE_EVENT(iwlwifi_dev_iowrite32,
TP_PROTO(struct iwl_priv *priv, u32 offs, u32 val),
TP_PROTO(void *priv, u32 offs, u32 val),
TP_ARGS(priv, offs, val),
TP_STRUCT__entry(
PRIV_ENTRY
Expand All @@ -95,7 +94,7 @@ TRACE_EVENT(iwlwifi_dev_iowrite32,
#define TRACE_SYSTEM iwlwifi_ucode

TRACE_EVENT(iwlwifi_dev_ucode_cont_event,
TP_PROTO(struct iwl_priv *priv, u32 time, u32 data, u32 ev),
TP_PROTO(void *priv, u32 time, u32 data, u32 ev),
TP_ARGS(priv, time, data, ev),
TP_STRUCT__entry(
PRIV_ENTRY
Expand All @@ -115,7 +114,7 @@ TRACE_EVENT(iwlwifi_dev_ucode_cont_event,
);

TRACE_EVENT(iwlwifi_dev_ucode_wrap_event,
TP_PROTO(struct iwl_priv *priv, u32 wraps, u32 n_entry, u32 p_entry),
TP_PROTO(void *priv, u32 wraps, u32 n_entry, u32 p_entry),
TP_ARGS(priv, wraps, n_entry, p_entry),
TP_STRUCT__entry(
PRIV_ENTRY
Expand All @@ -139,7 +138,7 @@ TRACE_EVENT(iwlwifi_dev_ucode_wrap_event,
#define TRACE_SYSTEM iwlwifi

TRACE_EVENT(iwlwifi_dev_hcmd,
TP_PROTO(struct iwl_priv *priv, u32 flags,
TP_PROTO(void *priv, u32 flags,
const void *hcmd0, size_t len0,
const void *hcmd1, size_t len1,
const void *hcmd2, size_t len2),
Expand All @@ -164,7 +163,7 @@ TRACE_EVENT(iwlwifi_dev_hcmd,
);

TRACE_EVENT(iwlwifi_dev_rx,
TP_PROTO(struct iwl_priv *priv, void *rxbuf, size_t len),
TP_PROTO(void *priv, void *rxbuf, size_t len),
TP_ARGS(priv, rxbuf, len),
TP_STRUCT__entry(
PRIV_ENTRY
Expand All @@ -179,7 +178,7 @@ TRACE_EVENT(iwlwifi_dev_rx,
);

TRACE_EVENT(iwlwifi_dev_tx,
TP_PROTO(struct iwl_priv *priv, void *tfd, size_t tfdlen,
TP_PROTO(void *priv, void *tfd, size_t tfdlen,
void *buf0, size_t buf0_len,
void *buf1, size_t buf1_len),
TP_ARGS(priv, tfd, tfdlen, buf0, buf0_len, buf1, buf1_len),
Expand Down Expand Up @@ -211,7 +210,7 @@ TRACE_EVENT(iwlwifi_dev_tx,
);

TRACE_EVENT(iwlwifi_dev_ucode_error,
TP_PROTO(struct iwl_priv *priv, u32 desc, u32 tsf_low,
TP_PROTO(void *priv, u32 desc, u32 tsf_low,
u32 data1, u32 data2, u32 line, u32 blink1,
u32 blink2, u32 ilink1, u32 ilink2, u32 bcon_time,
u32 gp1, u32 gp2, u32 gp3, u32 ucode_ver, u32 hw_ver,
Expand Down Expand Up @@ -271,7 +270,7 @@ TRACE_EVENT(iwlwifi_dev_ucode_error,
);

TRACE_EVENT(iwlwifi_dev_ucode_event,
TP_PROTO(struct iwl_priv *priv, u32 time, u32 data, u32 ev),
TP_PROTO(void *priv, u32 time, u32 data, u32 ev),
TP_ARGS(priv, time, data, ev),
TP_STRUCT__entry(
PRIV_ENTRY
Expand Down

0 comments on commit 5510697

Please sign in to comment.