* [PATCH] xen-netback: remove unused variables pending_idx and index
@ 2023-02-26 16:34 Tom Rix
2023-02-27 8:29 ` Juergen Gross
2023-02-28 0:46 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Tom Rix @ 2023-02-26 16:34 UTC (permalink / raw
To: wei.liu, paul, davem, edumazet, kuba, pabeni
Cc: xen-devel, netdev, linux-kernel, Tom Rix
building with gcc and W=1 reports
drivers/net/xen-netback/netback.c:886:21: error: variable
‘pending_idx’ set but not used [-Werror=unused-but-set-variable]
886 | u16 pending_idx;
| ^~~~~~~~~~~
pending_idx is not used so remove it. Since index was only
used to set pending_idx, remove index as well.
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/net/xen-netback/netback.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index bf627af723bf..1b42676ca141 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -883,11 +883,9 @@ static void xenvif_tx_build_gops(struct xenvif_queue *queue,
struct xen_netif_tx_request txfrags[XEN_NETBK_LEGACY_SLOTS_MAX];
struct xen_netif_extra_info extras[XEN_NETIF_EXTRA_TYPE_MAX-1];
unsigned int extra_count;
- u16 pending_idx;
RING_IDX idx;
int work_to_do;
unsigned int data_len;
- pending_ring_idx_t index;
if (queue->tx.sring->req_prod - queue->tx.req_cons >
XEN_NETIF_TX_RING_SIZE) {
@@ -983,9 +981,6 @@ static void xenvif_tx_build_gops(struct xenvif_queue *queue,
break;
}
- index = pending_index(queue->pending_cons);
- pending_idx = queue->pending_ring[index];
-
if (ret >= XEN_NETBK_LEGACY_SLOTS_MAX - 1 && data_len < txreq.size)
data_len = txreq.size;
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] xen-netback: remove unused variables pending_idx and index
2023-02-26 16:34 [PATCH] xen-netback: remove unused variables pending_idx and index Tom Rix
@ 2023-02-27 8:29 ` Juergen Gross
2023-02-27 23:35 ` Jakub Kicinski
2023-02-28 0:46 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Juergen Gross @ 2023-02-27 8:29 UTC (permalink / raw
To: Tom Rix, wei.liu, paul, davem, edumazet, kuba, pabeni
Cc: xen-devel, netdev, linux-kernel
[-- Attachment #1.1.1: Type: text/plain, Size: 525 bytes --]
On 26.02.23 17:34, Tom Rix wrote:
> building with gcc and W=1 reports
> drivers/net/xen-netback/netback.c:886:21: error: variable
> ‘pending_idx’ set but not used [-Werror=unused-but-set-variable]
> 886 | u16 pending_idx;
> | ^~~~~~~~~~~
>
> pending_idx is not used so remove it. Since index was only
> used to set pending_idx, remove index as well.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xen-netback: remove unused variables pending_idx and index
2023-02-27 8:29 ` Juergen Gross
@ 2023-02-27 23:35 ` Jakub Kicinski
0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2023-02-27 23:35 UTC (permalink / raw
To: Tom Rix
Cc: Juergen Gross, wei.liu, paul, davem, edumazet, pabeni, xen-devel,
netdev, linux-kernel
On Mon, 27 Feb 2023 09:29:30 +0100 Juergen Gross wrote:
> On 26.02.23 17:34, Tom Rix wrote:
> > building with gcc and W=1 reports
> > drivers/net/xen-netback/netback.c:886:21: error: variable
> > ‘pending_idx’ set but not used [-Werror=unused-but-set-variable]
> > 886 | u16 pending_idx;
> > | ^~~~~~~~~~~
> >
> > pending_idx is not used so remove it. Since index was only
> > used to set pending_idx, remove index as well.
> >
> > Signed-off-by: Tom Rix <trix@redhat.com>
>
> Reviewed-by: Juergen Gross <jgross@suse.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xen-netback: remove unused variables pending_idx and index
2023-02-26 16:34 [PATCH] xen-netback: remove unused variables pending_idx and index Tom Rix
2023-02-27 8:29 ` Juergen Gross
@ 2023-02-28 0:46 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-28 0:46 UTC (permalink / raw
To: Tom Rix
Cc: wei.liu, paul, davem, edumazet, kuba, pabeni, xen-devel, netdev,
linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sun, 26 Feb 2023 11:34:29 -0500 you wrote:
> building with gcc and W=1 reports
> drivers/net/xen-netback/netback.c:886:21: error: variable
> ‘pending_idx’ set but not used [-Werror=unused-but-set-variable]
> 886 | u16 pending_idx;
> | ^~~~~~~~~~~
>
> pending_idx is not used so remove it. Since index was only
> used to set pending_idx, remove index as well.
>
> [...]
Here is the summary with links:
- xen-netback: remove unused variables pending_idx and index
https://git.kernel.org/netdev/net-next/c/ccf8f7d71424
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:[~2023-02-28 0:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-26 16:34 [PATCH] xen-netback: remove unused variables pending_idx and index Tom Rix
2023-02-27 8:29 ` Juergen Gross
2023-02-27 23:35 ` Jakub Kicinski
2023-02-28 0:46 ` patchwork-bot+netdevbpf
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 read-only IMAP folder(s) and NNTP newsgroup(s).