From: Kalle Valo <kvalo@codeaurora.org>
To: Arend van Spriel <arend.vanspriel@broadcom.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/4] brcmfmac: use atomic_t for statistic counter in struct brcmf_bus
Date: Tue, 27 Jun 2017 17:05:45 +0300 [thread overview]
Message-ID: <878tkd5xvq.fsf@purkki.adurom.net> (raw)
In-Reply-To: <1498125664-25980-3-git-send-email-arend.vanspriel@broadcom.com> (Arend van Spriel's message of "Thu, 22 Jun 2017 11:01:02 +0100")
Arend van Spriel <arend.vanspriel@broadcom.com> writes:
> The statistic counter is used in common layer and in the bus layer
> in different thread contexts so change to use atomic operations.
>
> Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
> Reviewed-by: Franky Lin <franky.lin@broadcom.com>
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 2 +-
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h
> index e2c895b..e1a4d9e 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h
> @@ -138,7 +138,7 @@ struct brcmf_bus {
> struct brcmf_pub *drvr;
> enum brcmf_bus_state state;
> uint maxctl;
> - unsigned long tx_realloc;
> + atomic_t tx_realloc;
> u32 chip;
> u32 chiprev;
> bool always_use_fws_queue;
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
> index 81f9594..a280536 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
> @@ -2046,7 +2046,7 @@ static int brcmf_sdio_txpkt_hdalign(struct brcmf_sdio *bus, struct sk_buff *pkt)
> head_pad = ((unsigned long)dat_buf % bus->head_align);
> if (head_pad) {
> if (skb_headroom(pkt) < head_pad) {
> - bus->sdiodev->bus_if->tx_realloc++;
> + atomic_inc(&bus->sdiodev->bus_if->tx_realloc);
What's the point of this field? AFAICS it's only incremented but never
read. What am I missing?
--
Kalle Valo
next prev parent reply other threads:[~2017-06-27 14:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 10:01 [PATCH 0/4] brcm80211: general admin and headroom rework Arend van Spriel
2017-06-22 10:01 ` [PATCH 1/4] brcmfmac: cleanup kerneldoc for struct brcmf_bus Arend van Spriel
2017-06-28 17:53 ` [1/4] " Kalle Valo
2017-06-22 10:01 ` [PATCH 2/4] brcmfmac: use atomic_t for statistic counter in " Arend van Spriel
2017-06-27 14:05 ` Kalle Valo [this message]
2017-06-22 10:01 ` [PATCH 3/4] brcmfmac: rework headroom check in .start_xmit() Arend van Spriel
2017-06-27 14:09 ` Kalle Valo
2017-06-27 22:07 ` Arend van Spriel
2017-06-28 16:04 ` Kalle Valo
2017-06-22 10:01 ` [PATCH 4/4] MAINTAINERS: add brcm80211 maintainer info from Cypress 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=878tkd5xvq.fsf@purkki.adurom.net \
--to=kvalo@codeaurora.org \
--cc=arend.vanspriel@broadcom.com \
--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).