From: Arend van Spriel <arend@broadcom.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Arend van Spriel <arend@broadcom.com>
Subject: [PATCH 08/18] brcmfmac: get rid of some void pointer parameters
Date: Thu, 12 Dec 2013 11:58:56 +0100 [thread overview]
Message-ID: <1386845946-9859-9-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1386845946-9859-1-git-send-email-arend@broadcom.com>
In sdio code a couple of functions use a void pointer as argument
type although it should be struct brcmf_sdio. Changing the functions
to have proper type checking.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 13 ++++---------
drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h | 9 ++++-----
2 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
index 24d69f4..c42d5a0 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
@@ -3649,10 +3649,8 @@ exit:
return ret;
}
-void brcmf_sdbrcm_isr(void *arg)
+void brcmf_sdbrcm_isr(struct brcmf_sdio *bus)
{
- struct brcmf_sdio *bus = (struct brcmf_sdio *) arg;
-
brcmf_dbg(TRACE, "Enter\n");
if (!bus) {
@@ -4037,7 +4035,7 @@ static struct brcmf_bus_ops brcmf_sdio_bus_ops = {
.gettxq = brcmf_sdbrcm_bus_gettxq,
};
-void *brcmf_sdbrcm_probe(struct brcmf_sdio_dev *sdiodev)
+struct brcmf_sdio *brcmf_sdbrcm_probe(struct brcmf_sdio_dev *sdiodev)
{
int ret;
struct brcmf_sdio *bus;
@@ -4147,14 +4145,11 @@ fail:
return NULL;
}
-void brcmf_sdbrcm_disconnect(void *ptr)
+void brcmf_sdbrcm_disconnect(struct brcmf_sdio *bus)
{
- struct brcmf_sdio *bus = (struct brcmf_sdio *)ptr;
-
brcmf_dbg(TRACE, "Enter\n");
- if (bus)
- brcmf_sdbrcm_release(bus);
+ brcmf_sdbrcm_release(bus);
brcmf_dbg(TRACE, "Disconnected\n");
}
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h b/drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h
index d98b4bd..414aa16 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h
@@ -165,7 +165,7 @@ struct brcmf_sdio_dev {
struct sdio_func *func[SDIO_MAX_FUNCS];
u8 num_funcs; /* Supported funcs on client */
u32 sbwad; /* Save backplane window address */
- void *bus;
+ struct brcmf_sdio *bus;
atomic_t suspend; /* suspend flag */
wait_queue_head_t request_byte_wait;
wait_queue_head_t request_word_wait;
@@ -239,10 +239,9 @@ int brcmf_sdio_ramrw(struct brcmf_sdio_dev *sdiodev, bool write, u32 address,
/* Issue an abort to the specified function */
int brcmf_sdcard_abort(struct brcmf_sdio_dev *sdiodev, uint fn);
-void *brcmf_sdbrcm_probe(struct brcmf_sdio_dev *sdiodev);
-void brcmf_sdbrcm_disconnect(void *ptr);
-void brcmf_sdbrcm_isr(void *arg);
-
+struct brcmf_sdio *brcmf_sdbrcm_probe(struct brcmf_sdio_dev *sdiodev);
+void brcmf_sdbrcm_disconnect(struct brcmf_sdio *bus);
+void brcmf_sdbrcm_isr(struct brcmf_sdio *bus);
void brcmf_sdbrcm_wd_timer(struct brcmf_sdio *bus, uint wdtick);
#endif /* _BRCM_SDH_H_ */
--
1.7.10.4
next prev parent reply other threads:[~2013-12-12 10:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 10:58 [PATCH 00/18] brcmfmac: sdio rework and msgbuf protocol changes Arend van Spriel
2013-12-12 10:58 ` [PATCH 01/18] brcmfmac: add missing curly braces in brcmf_fws_txstatus_suppressed() Arend van Spriel
2013-12-12 10:58 ` [PATCH 02/18] brcmfmac: combine bcmsdh source files into one Arend van Spriel
2013-12-12 10:58 ` [PATCH 03/18] brcmfmac: remove unnecessary function prototypes Arend van Spriel
2013-12-12 10:58 ` [PATCH 04/18] brcmfmac: remove unused struct brcmf_sdio_dev::func_cis_ptr attribute Arend van Spriel
2013-12-12 10:58 ` [PATCH 05/18] brcmfmac: use sdio functions to enable/disable F2 Arend van Spriel
2013-12-12 10:58 ` [PATCH 06/18] brcmfmac: remove brcmf_sdio_regrw_helper() from header file Arend van Spriel
2013-12-12 10:58 ` [PATCH 07/18] brcmfmac: remove regs parameter from sdio probe functions Arend van Spriel
2013-12-12 10:58 ` Arend van Spriel [this message]
2013-12-12 10:58 ` [PATCH 09/18] brcmfmac: remove brcmf_sdio_wdtimer_enable() function Arend van Spriel
2013-12-12 10:58 ` [PATCH 10/18] brcmfmac: use consistent function names in bcmsdh.c Arend van Spriel
2013-12-12 10:58 ` [PATCH 11/18] brcmfmac: reduce function parameters in sdio send/receive calls Arend van Spriel
2013-12-12 10:59 ` [PATCH 12/18] brcmfmac: Move common BCDC code in single function Arend van Spriel
2013-12-12 10:59 ` [PATCH 13/18] brcmfmac: Fix hex dump for FWIL Arend van Spriel
2013-12-12 10:59 ` [PATCH 14/18] brcmfmac: Add definition of new protocol layer msgbuf Arend van Spriel
2013-12-12 10:59 ` [PATCH 15/18] brcmfmac: Combine protocol push hdr and bus txdata Arend van Spriel
2013-12-12 10:59 ` [PATCH 16/18] brcmfmac: use consistent function names in dhd_sdio.c Arend van Spriel
2013-12-12 10:59 ` [PATCH 17/18] brcmfmac: remove brcmf_sdio_disconnect() function Arend van Spriel
2013-12-12 10:59 ` [PATCH 18/18] brcmfmac: clarify struct brcmf_sdio_dev::func[0] reference Arend van Spriel
2013-12-13 9:02 ` [PATCH 00/18] brcmfmac: sdio rework and msgbuf protocol changes 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=1386845946-9859-9-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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).