linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Franky Lin" <frankyl@broadcom.com>
To: gregkh@suse.de
Cc: devel@linuxdriverproject.org, linux-wireless@vger.kernel.org
Subject: [PATCH 06/35] staging: brcm80211: removed function declaration typedefs from dma.h part 1
Date: Thu, 14 Jul 2011 14:29:02 -0700	[thread overview]
Message-ID: <1310678971-28952-7-git-send-email-frankyl@broadcom.com> (raw)
In-Reply-To: <1310678971-28952-1-git-send-email-frankyl@broadcom.com>

From: Roland Vossen <rvossen@broadcom.com>

Softmac related code cleanup. Typedefs are undesirable according to the
CodingStyle document.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
---
 drivers/staging/brcm80211/brcmsmac/dma.c |   22 ++++++++++----------
 drivers/staging/brcm80211/brcmsmac/dma.h |   33 ++++++++++--------------------
 2 files changed, 22 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmsmac/dma.c b/drivers/staging/brcm80211/brcmsmac/dma.c
index ea17671..5fd5e8c 100644
--- a/drivers/staging/brcm80211/brcmsmac/dma.c
+++ b/drivers/staging/brcm80211/brcmsmac/dma.c
@@ -387,12 +387,12 @@ static bool _dma64_addrext(dma64regs_t *dma64regs);
 static inline u32 parity32(u32 data);
 
 const struct di_fcn_s dma64proc = {
-	(di_detach_t) _dma_detach,
-	(di_txinit_t) dma64_txinit,
+	(void (*)(struct dma_pub *)) _dma_detach,
+	(void (*)(struct dma_pub *)) dma64_txinit,
 	(di_txreset_t) dma64_txreset,
 	(di_txenabled_t) dma64_txenabled,
-	(di_txsuspend_t) dma64_txsuspend,
-	(di_txresume_t) dma64_txresume,
+	(void (*)(struct dma_pub *)) dma64_txsuspend,
+	(void (*)(struct dma_pub *)) dma64_txresume,
 	(di_txsuspended_t) dma64_txsuspended,
 	(di_txsuspendedidle_t) dma64_txsuspendedidle,
 	(di_txfast_t) dma64_txfast,
@@ -402,12 +402,12 @@ const struct di_fcn_s dma64proc = {
 	(di_txreclaim_t) dma64_txreclaim,
 	(di_getnexttxp_t) dma64_getnexttxp,
 	(di_peeknexttxp_t) _dma_peeknexttxp,
-	(di_txblock_t) _dma_txblock,
-	(di_txunblock_t) _dma_txunblock,
+	(void (*)(struct dma_pub *)) _dma_txblock,
+	(void (*)(struct dma_pub *)) _dma_txunblock,
 	(di_txactive_t) _dma_txactive,
-	(di_txrotate_t) dma64_txrotate,
+	(void (*)(struct dma_pub *)) dma64_txrotate,
 
-	(di_rxinit_t) _dma_rxinit,
+	(void (*)(struct dma_pub *)) _dma_rxinit,
 	(di_rxreset_t) dma64_rxreset,
 	(di_rxidle_t) dma64_rxidle,
 	(di_rxstopped_t) dma64_rxstopped,
@@ -415,14 +415,14 @@ const struct di_fcn_s dma64proc = {
 	(di_rxenabled_t) dma64_rxenabled,
 	(di_rx_t) _dma_rx,
 	(di_rxfill_t) _dma_rxfill,
-	(di_rxreclaim_t) _dma_rxreclaim,
+	(void (*)(struct dma_pub *)) _dma_rxreclaim,
 	(di_getnextrxp_t) _dma_getnextrxp,
 	(di_peeknextrxp_t) _dma_peeknextrxp,
 	(di_rxparam_get_t) _dma_rx_param_get,
 
-	(di_fifoloopbackenable_t) _dma_fifoloopbackenable,
+	(void (*)(struct dma_pub *)) _dma_fifoloopbackenable,
 	(di_getvar_t) _dma_getvar,
-	(di_counterreset_t) _dma_counterreset,
+	(void (*)(struct dma_pub *)) _dma_counterreset,
 	(di_ctrlflags_t) _dma_ctrlflags,
 	NULL,
 	NULL,
diff --git a/drivers/staging/brcm80211/brcmsmac/dma.h b/drivers/staging/brcm80211/brcmsmac/dma.h
index 9c8b9a6..69f2e94 100644
--- a/drivers/staging/brcm80211/brcmsmac/dma.h
+++ b/drivers/staging/brcm80211/brcmsmac/dma.h
@@ -59,15 +59,10 @@ enum txd_range {
 };
 
 /* dma function type */
-typedef void (*di_detach_t) (struct dma_pub *dmah);
 typedef bool(*di_txreset_t) (struct dma_pub *dmah);
 typedef bool(*di_rxreset_t) (struct dma_pub *dmah);
 typedef bool(*di_rxidle_t) (struct dma_pub *dmah);
-typedef void (*di_txinit_t) (struct dma_pub *dmah);
 typedef bool(*di_txenabled_t) (struct dma_pub *dmah);
-typedef void (*di_rxinit_t) (struct dma_pub *dmah);
-typedef void (*di_txsuspend_t) (struct dma_pub *dmah);
-typedef void (*di_txresume_t) (struct dma_pub *dmah);
 typedef bool(*di_txsuspended_t) (struct dma_pub *dmah);
 typedef bool(*di_txsuspendedidle_t) (struct dma_pub *dmah);
 typedef int (*di_txfast_t) (struct dma_pub *dmah, struct sk_buff *p,
@@ -75,7 +70,6 @@ typedef int (*di_txfast_t) (struct dma_pub *dmah, struct sk_buff *p,
 typedef int (*di_txunframed_t) (struct dma_pub *dmah, void *p, uint len,
 				bool commit);
 typedef void *(*di_getpos_t) (struct dma_pub *di, bool direction);
-typedef void (*di_fifoloopbackenable_t) (struct dma_pub *dmah);
 typedef bool(*di_txstopped_t) (struct dma_pub *dmah);
 typedef bool(*di_rxstopped_t) (struct dma_pub *dmah);
 typedef bool(*di_rxenable_t) (struct dma_pub *dmah);
@@ -83,7 +77,6 @@ typedef bool(*di_rxenabled_t) (struct dma_pub *dmah);
 typedef void *(*di_rx_t) (struct dma_pub *dmah);
 typedef bool(*di_rxfill_t) (struct dma_pub *dmah);
 typedef void (*di_txreclaim_t) (struct dma_pub *dmah, enum txd_range range);
-typedef void (*di_rxreclaim_t) (struct dma_pub *dmah);
 typedef unsigned long (*di_getvar_t) (struct dma_pub *dmah,
 				      const char *name);
 typedef void *(*di_getnexttxp_t) (struct dma_pub *dmah, enum txd_range range);
@@ -92,11 +85,7 @@ typedef void *(*di_peeknexttxp_t) (struct dma_pub *dmah);
 typedef void *(*di_peeknextrxp_t) (struct dma_pub *dmah);
 typedef void (*di_rxparam_get_t) (struct dma_pub *dmah, u16 *rxoffset,
 				  u16 *rxbufsize);
-typedef void (*di_txblock_t) (struct dma_pub *dmah);
-typedef void (*di_txunblock_t) (struct dma_pub *dmah);
 typedef uint(*di_txactive_t) (struct dma_pub *dmah);
-typedef void (*di_txrotate_t) (struct dma_pub *dmah);
-typedef void (*di_counterreset_t) (struct dma_pub *dmah);
 typedef uint(*di_ctrlflags_t) (struct dma_pub *dmah, uint mask, uint flags);
 typedef char *(*di_dump_t) (struct dma_pub *dmah, struct brcmu_strbuf *b,
 			    bool dumpring);
@@ -110,12 +99,12 @@ typedef uint(*di_txcommitted_t) (struct dma_pub *dmah);
 
 /* dma opsvec */
 struct di_fcn_s {
-	di_detach_t detach;
-	di_txinit_t txinit;
+	void (*detach)(struct dma_pub *dmah);
+	void (*txinit)(struct dma_pub *dmah);
 	di_txreset_t txreset;
 	di_txenabled_t txenabled;
-	di_txsuspend_t txsuspend;
-	di_txresume_t txresume;
+	void (*txsuspend)(struct dma_pub *dmah);
+	void (*txresume)(struct dma_pub *dmah);
 	di_txsuspended_t txsuspended;
 	di_txsuspendedidle_t txsuspendedidle;
 	di_txfast_t txfast;
@@ -125,12 +114,12 @@ struct di_fcn_s {
 	di_txreclaim_t txreclaim;
 	di_getnexttxp_t getnexttxp;
 	di_peeknexttxp_t peeknexttxp;
-	di_txblock_t txblock;
-	di_txunblock_t txunblock;
+	void (*txblock) (struct dma_pub *dmah);
+	void (*txunblock) (struct dma_pub *dmah);
 	di_txactive_t txactive;
-	di_txrotate_t txrotate;
+	void (*txrotate) (struct dma_pub *dmah);
 
-	di_rxinit_t rxinit;
+	void (*rxinit)(struct dma_pub *dmah);
 	di_rxreset_t rxreset;
 	di_rxidle_t rxidle;
 	di_rxstopped_t rxstopped;
@@ -138,14 +127,14 @@ struct di_fcn_s {
 	di_rxenabled_t rxenabled;
 	di_rx_t rx;
 	di_rxfill_t rxfill;
-	di_rxreclaim_t rxreclaim;
+	void (*rxreclaim)(struct dma_pub *dmah);
 	di_getnextrxp_t getnextrxp;
 	di_peeknextrxp_t peeknextrxp;
 	di_rxparam_get_t rxparam_get;
 
-	di_fifoloopbackenable_t fifoloopbackenable;
+	void (*fifoloopbackenable)(struct dma_pub *dmah);
 	di_getvar_t d_getvar;
-	di_counterreset_t counterreset;
+	void (*counterreset)(struct dma_pub *dmah);
 	di_ctrlflags_t ctrlflags;
 	di_dump_t dump;
 	di_dumptx_t dumptx;
-- 
1.7.1



  parent reply	other threads:[~2011-07-14 21:29 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-14 21:28 [PATCH 00/35] staging: brcm80211: code cleanup and bugfix Franky Lin
2011-07-14 21:28 ` [PATCH 01/35] staging: brcm80211: bugfix for len==0 parameter in 3 fullmac functions Franky Lin
2011-07-14 21:28 ` [PATCH 02/35] staging: brcm80211: merged bmac.c into main.c Franky Lin
2011-07-14 21:28 ` [PATCH 03/35] staging: brcm80211: shuffled sections in main.c Franky Lin
2011-07-14 21:29 ` [PATCH 04/35] staging: brcm80211: removed function declaration typedefs from phy_int.h Franky Lin
2011-07-14 21:29 ` [PATCH 05/35] staging: brcm80211: removed function declaration typedefs from aiutils.h Franky Lin
2011-07-14 23:04   ` Julian Calaby
2011-07-15  9:41     ` Roland Vossen
2011-07-15 10:13       ` Julian Calaby
2011-07-14 21:29 ` Franky Lin [this message]
2011-07-14 21:29 ` [PATCH 07/35] staging: brcm80211: removed function declaration typedefs from dma.h part 2 Franky Lin
2011-07-14 21:29 ` [PATCH 08/35] staging: brcm80211: removed function declaration typedefs from dma.h part 3 Franky Lin
2011-07-14 21:29 ` [PATCH 09/35] staging: brcm80211: removed function declaration typedefs from dma.h part 4 Franky Lin
2011-07-14 21:29 ` [PATCH 10/35] staging: brcm80211: removed function declaration typedefs from otp.c Franky Lin
2011-07-14 21:29 ` [PATCH 11/35] staging: brcm80211: removed function declaration typedefs from main.h,pub.h Franky Lin
2011-07-14 21:29 ` [PATCH 12/35] staging: brcm80211: removed function declaration typedefs from brcmutil Franky Lin
2011-07-14 21:29 ` [PATCH 13/35] staging: brcm80211: replaced various typedefs Franky Lin
2011-07-14 21:29 ` [PATCH 14/35] staging: brcm80211: replaced typedef wlc_rateset_t Franky Lin
2011-07-14 21:29 ` [PATCH 15/35] staging: brcm80211: replaced typedef wl_rateset_t by struct brcm_rateset Franky Lin
2011-07-14 21:29 ` [PATCH 16/35] staging: brcm80211: replaced all volatile typedefs Franky Lin
2011-07-14 21:29 ` [PATCH 17/35] staging: brcm80211: modify the FOREACH_BSS macro Franky Lin
2011-07-14 21:29 ` [PATCH 18/35] staging: brcm80211: use mutex instead of semaphore in dhd_linux.c Franky Lin
2011-08-01 11:54   ` Dan Carpenter
2011-08-01 12:52     ` Arend van Spriel
2011-08-08 12:46     ` Arend van Spriel
2011-07-14 21:29 ` [PATCH 19/35] staging: brcm80211: remove duplicated code from brcmf_init_iscan Franky Lin
2011-07-14 21:29 ` [PATCH 20/35] staging: brcm80211: remove volatile keyword from driver sources Franky Lin
2011-07-14 21:29 ` [PATCH 21/35] staging: brcm80211: use native error code in brcmf_c_pattern_atoh() Franky Lin
2011-07-14 21:29 ` [PATCH 22/35] staging: brcm80211: fix for checkpatch 'avoid externs in c file' warning Franky Lin
2011-07-16  0:06   ` Dan Carpenter
2011-07-16  9:59     ` Arend van Spriel
2011-07-14 21:29 ` [PATCH 23/35] staging: brcm80211: power save issue fixed in brcmfmac driver Franky Lin
2011-07-14 21:29 ` [PATCH 24/35] staging: brcm80211: brcmfmac: Enabling FW roaming by default Franky Lin
2011-07-14 21:29 ` [PATCH 25/35] staging: brcm80211: brcmfmac: Connect request made robust Franky Lin
2011-07-14 21:29 ` [PATCH 26/35] staging: brcm80211: use mac_pton() instead of own implementation Franky Lin
2011-07-14 21:29 ` [PATCH 27/35] staging: brcm80211: fix for 'remove unnecessary braces' checkpatch warning Franky Lin
2011-07-14 21:29 ` [PATCH 28/35] staging: brcm80211: brcmfmac: Fixed issues with iscan Franky Lin
2011-07-14 21:29 ` [PATCH 29/35] staging: brcm80211: brcmfmac: Roamed channel info passed to cfg80211 Franky Lin
2011-07-14 21:29 ` [PATCH 30/35] staging: brcm80211: move sdio related variables to dhd_sdio.c Franky Lin
2011-07-14 21:29 ` [PATCH 31/35] staging: brcm80211: move ioctl response wait code " Franky Lin
2011-07-14 21:29 ` [PATCH 32/35] staging: brcm80211: replace semaphore by wait_queue for sysioc thread Franky Lin
2011-07-14 21:29 ` [PATCH 33/35] staging: brcm80211: use wait queues instead of semaphores in wl_cfg80211.c Franky Lin
2011-07-14 21:29 ` [PATCH 34/35] staging: brcm80211: remove volatile keyword used in struct rte_console Franky Lin
2011-07-14 21:29 ` [PATCH 35/35] staging: brcm80211: replace simple_strtoul usage in brcmfmac Franky Lin
2011-07-15 23:49   ` Dan Carpenter
2011-07-16 10:00     ` Arend van Spriel

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=1310678971-28952-7-git-send-email-frankyl@broadcom.com \
    --to=frankyl@broadcom.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@suse.de \
    --cc=linux-wireless@vger.kernel.org \
    /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).