* [patch] brcmfmac: cleanup a sizeof()
@ 2015-05-07 9:59 Dan Carpenter
2015-05-09 13:58 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-05-07 9:59 UTC (permalink / raw)
To: Brett Rudley
Cc: Arend van Spriel, Franky (Zhenhui) Lin, Hante Meuleman,
Kalle Valo, Pieter-Paul Giesberts, John W. Linville,
Johannes Berg, linux-wireless, brcm80211-dev-list,
kernel-janitors
"flowrings" and "*flowrings" are both pointers so this always returns
sizeof(void *) and the current code works fine. But "*flowrings" is
intended here and static checkers complain, so lets change it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/brcm80211/brcmfmac/pcie.c
index 1831ecd..d371f1e 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/pcie.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/pcie.c
@@ -1609,7 +1609,7 @@ static void brcmf_pcie_setup(struct device *dev, const struct firmware *fw,
bus->msgbuf->commonrings[i] =
&devinfo->shared.commonrings[i]->commonring;
- flowrings = kcalloc(devinfo->shared.nrof_flowrings, sizeof(flowrings),
+ flowrings = kcalloc(devinfo->shared.nrof_flowrings, sizeof(*flowrings),
GFP_KERNEL);
if (!flowrings)
goto fail;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: brcmfmac: cleanup a sizeof()
2015-05-07 9:59 [patch] brcmfmac: cleanup a sizeof() Dan Carpenter
@ 2015-05-09 13:58 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2015-05-09 13:58 UTC (permalink / raw)
To: Dan Carpenter
Cc: Brett Rudley, Arend van Spriel, Franky (Zhenhui) Lin,
Hante Meuleman, Pieter-Paul Giesberts, John W. Linville,
Johannes Berg, linux-wireless, brcm80211-dev-list,
kernel-janitors
> "flowrings" and "*flowrings" are both pointers so this always returns
> sizeof(void *) and the current code works fine. But "*flowrings" is
> intended here and static checkers complain, so lets change it.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks, applied to wireless-drivers-next.git.
Kalle Valo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-09 13:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-07 9:59 [patch] brcmfmac: cleanup a sizeof() Dan Carpenter
2015-05-09 13:58 ` Kalle Valo
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).