* [PATCH] net: marvell: mvpp2: Fix the computation of shared CPUs
@ 2021-11-29 21:53 Christophe JAILLET
2021-11-30 12:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2021-11-29 21:53 UTC (permalink / raw)
To: mw, linux, davem, kuba, atenart
Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET
'bitmap_fill()' fills a bitmap one 'long' at a time.
It is likely that an exact number of bits is expected.
Use 'bitmap_set()' instead in order not to set unexpected bits.
Fixes: e531f76757eb ("net: mvpp2: handle cases where more CPUs are available than s/w threads")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Having extra bits set looks harmless to me, but would require some
unneeded locking.
---
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index a48e804c46f2..252e215a14f1 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -7454,7 +7454,7 @@ static int mvpp2_probe(struct platform_device *pdev)
shared = num_present_cpus() - priv->nthreads;
if (shared > 0)
- bitmap_fill(&priv->lock_map,
+ bitmap_set(&priv->lock_map, 0,
min_t(int, shared, MVPP2_MAX_THREADS));
for (i = 0; i < MVPP2_MAX_THREADS; i++) {
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: marvell: mvpp2: Fix the computation of shared CPUs
2021-11-29 21:53 [PATCH] net: marvell: mvpp2: Fix the computation of shared CPUs Christophe JAILLET
@ 2021-11-30 12:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-30 12:10 UTC (permalink / raw)
To: Christophe JAILLET
Cc: mw, linux, davem, kuba, atenart, netdev, linux-kernel, kernel-janitors
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Mon, 29 Nov 2021 22:53:27 +0100 you wrote:
> 'bitmap_fill()' fills a bitmap one 'long' at a time.
> It is likely that an exact number of bits is expected.
>
> Use 'bitmap_set()' instead in order not to set unexpected bits.
>
> Fixes: e531f76757eb ("net: mvpp2: handle cases where more CPUs are available than s/w threads")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>
> [...]
Here is the summary with links:
- net: marvell: mvpp2: Fix the computation of shared CPUs
https://git.kernel.org/netdev/net/c/b83f5ac7d922
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-30 12:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-29 21:53 [PATCH] net: marvell: mvpp2: Fix the computation of shared CPUs Christophe JAILLET
2021-11-30 12:10 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.