All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] mvpp2: resolve two warnings
@ 2021-05-10 16:52 Matteo Croce
  2021-05-10 16:52 ` [PATCH net-next 1/2] mvpp2: remove unused parameter Matteo Croce
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Matteo Croce @ 2021-05-10 16:52 UTC (permalink / raw)
  To: Marcin Wojtas, Russell King, netdev
  Cc: David S. Miller, Jakub Kicinski, linux-kernel

From: Matteo Croce <mcroce@microsoft.com>

Just two small changes to suppress two warnings.

Matteo Croce (2):
  mvpp2: remove unused parameter
  mvpp2: suppress warning

 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 8 ++++----
 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c  | 3 ---
 2 files changed, 4 insertions(+), 7 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH net-next 1/2] mvpp2: remove unused parameter
  2021-05-10 16:52 [PATCH net-next 0/2] mvpp2: resolve two warnings Matteo Croce
@ 2021-05-10 16:52 ` Matteo Croce
  2021-05-10 16:52 ` [PATCH net-next 2/2] mvpp2: suppress warning Matteo Croce
  2021-05-10 22:20 ` [PATCH net-next 0/2] mvpp2: resolve two warnings patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Matteo Croce @ 2021-05-10 16:52 UTC (permalink / raw)
  To: Marcin Wojtas, Russell King, netdev
  Cc: David S. Miller, Jakub Kicinski, linux-kernel

From: Matteo Croce <mcroce@microsoft.com>

mvpp2_run_xdp() has an unused parameter rxq, remove it.

Fixes: 07dd0a7aae7f ("mvpp2: add basic XDP support")
Signed-off-by: Matteo Croce <mcroce@microsoft.com>
---
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index ec706d614cac..28b8d9b3cbe6 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -3784,9 +3784,9 @@ mvpp2_xdp_xmit(struct net_device *dev, int num_frame,
 }
 
 static int
-mvpp2_run_xdp(struct mvpp2_port *port, struct mvpp2_rx_queue *rxq,
-	      struct bpf_prog *prog, struct xdp_buff *xdp,
-	      struct page_pool *pp, struct mvpp2_pcpu_stats *stats)
+mvpp2_run_xdp(struct mvpp2_port *port, struct bpf_prog *prog,
+	      struct xdp_buff *xdp, struct page_pool *pp,
+	      struct mvpp2_pcpu_stats *stats)
 {
 	unsigned int len, sync, err;
 	struct page *page;
@@ -3925,7 +3925,7 @@ static int mvpp2_rx(struct mvpp2_port *port, struct napi_struct *napi,
 					 MVPP2_MH_SIZE + MVPP2_SKB_HEADROOM,
 					 rx_bytes, false);
 
-			ret = mvpp2_run_xdp(port, rxq, xdp_prog, &xdp, pp, &ps);
+			ret = mvpp2_run_xdp(port, xdp_prog, &xdp, pp, &ps);
 
 			if (ret) {
 				xdp_ret |= ret;
-- 
2.31.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH net-next 2/2] mvpp2: suppress warning
  2021-05-10 16:52 [PATCH net-next 0/2] mvpp2: resolve two warnings Matteo Croce
  2021-05-10 16:52 ` [PATCH net-next 1/2] mvpp2: remove unused parameter Matteo Croce
@ 2021-05-10 16:52 ` Matteo Croce
  2021-05-10 22:20 ` [PATCH net-next 0/2] mvpp2: resolve two warnings patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Matteo Croce @ 2021-05-10 16:52 UTC (permalink / raw)
  To: Marcin Wojtas, Russell King, netdev
  Cc: David S. Miller, Jakub Kicinski, linux-kernel

From: Matteo Croce <mcroce@microsoft.com>

Remove some unreachable code, so to suppress this warning:

drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c: In function ‘mvpp2_prs_tcam_first_free’:
drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c:397:10: warning: comparison is always false due to limited range of data type [-Wtype-limits]
  397 |  if (end >= MVPP2_PRS_TCAM_SRAM_SIZE)
      |          ^~

Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit")
Signed-off-by: Matteo Croce <mcroce@microsoft.com>
---
 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
index 7cc7d72d761e..93575800ca92 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
@@ -394,9 +394,6 @@ static int mvpp2_prs_tcam_first_free(struct mvpp2 *priv, unsigned char start,
 	if (start > end)
 		swap(start, end);
 
-	if (end >= MVPP2_PRS_TCAM_SRAM_SIZE)
-		end = MVPP2_PRS_TCAM_SRAM_SIZE - 1;
-
 	for (tid = start; tid <= end; tid++) {
 		if (!priv->prs_shadow[tid].valid)
 			return tid;
-- 
2.31.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next 0/2] mvpp2: resolve two warnings
  2021-05-10 16:52 [PATCH net-next 0/2] mvpp2: resolve two warnings Matteo Croce
  2021-05-10 16:52 ` [PATCH net-next 1/2] mvpp2: remove unused parameter Matteo Croce
  2021-05-10 16:52 ` [PATCH net-next 2/2] mvpp2: suppress warning Matteo Croce
@ 2021-05-10 22:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-10 22:20 UTC (permalink / raw)
  To: Matteo Croce; +Cc: mw, linux, netdev, davem, kuba, linux-kernel

Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Mon, 10 May 2021 18:52:30 +0200 you wrote:
> From: Matteo Croce <mcroce@microsoft.com>
> 
> Just two small changes to suppress two warnings.
> 
> Matteo Croce (2):
>   mvpp2: remove unused parameter
>   mvpp2: suppress warning
> 
> [...]

Here is the summary with links:
  - [net-next,1/2] mvpp2: remove unused parameter
    https://git.kernel.org/netdev/net-next/c/376d68929d5b
  - [net-next,2/2] mvpp2: suppress warning
    https://git.kernel.org/netdev/net-next/c/4c598e5e679c

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] 4+ messages in thread

end of thread, other threads:[~2021-05-10 22:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 16:52 [PATCH net-next 0/2] mvpp2: resolve two warnings Matteo Croce
2021-05-10 16:52 ` [PATCH net-next 1/2] mvpp2: remove unused parameter Matteo Croce
2021-05-10 16:52 ` [PATCH net-next 2/2] mvpp2: suppress warning Matteo Croce
2021-05-10 22:20 ` [PATCH net-next 0/2] mvpp2: resolve two warnings 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.