netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bailey Forrest <bcf@google.com>
To: Bailey Forrest <bcf@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Willem de Bruijn <willemb@google.com>
Subject: [PATCH net-next] gve: Fix warnings reported for DQO patchset
Date: Thu, 24 Jun 2021 15:08:52 -0700	[thread overview]
Message-ID: <20210624220852.3733930-1-bcf@google.com> (raw)

https://patchwork.kernel.org/project/netdevbpf/list/?series=506637&state=*

- Remove unused variable
- Use correct integer type for string formatting.
- Remove `inline` in C files

Fixes: 9c1a59a2f4bc ("gve: DQO: Add ring allocation and initialization")
Fixes: a57e5de476be ("gve: DQO: Add TX path")
Signed-off-by: Bailey Forrest <bcf@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
---
 drivers/net/ethernet/google/gve/gve_main.c   | 2 +-
 drivers/net/ethernet/google/gve/gve_tx_dqo.c | 9 ++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
index 1bf446836724..ac4819c25aca 100644
--- a/drivers/net/ethernet/google/gve/gve_main.c
+++ b/drivers/net/ethernet/google/gve/gve_main.c
@@ -696,7 +696,7 @@ static int gve_destroy_rings(struct gve_priv *priv)
 	return 0;
 }
 
-static inline void gve_rx_free_rings(struct gve_priv *priv)
+static void gve_rx_free_rings(struct gve_priv *priv)
 {
 	if (gve_is_gqi(priv))
 		gve_rx_free_rings_gqi(priv);
diff --git a/drivers/net/ethernet/google/gve/gve_tx_dqo.c b/drivers/net/ethernet/google/gve/gve_tx_dqo.c
index a4906b9df540..05ddb6a75c38 100644
--- a/drivers/net/ethernet/google/gve/gve_tx_dqo.c
+++ b/drivers/net/ethernet/google/gve/gve_tx_dqo.c
@@ -261,7 +261,7 @@ void gve_tx_free_rings_dqo(struct gve_priv *priv)
 }
 
 /* Returns the number of slots available in the ring */
-static inline u32 num_avail_tx_slots(const struct gve_tx_ring *tx)
+static u32 num_avail_tx_slots(const struct gve_tx_ring *tx)
 {
 	u32 num_used = (tx->dqo_tx.tail - tx->dqo_tx.head) & tx->mask;
 
@@ -727,9 +727,8 @@ static void remove_from_list(struct gve_tx_ring *tx,
 			     struct gve_index_list *list,
 			     struct gve_tx_pending_packet_dqo *pending_packet)
 {
-	s16 index, prev_index, next_index;
+	s16 prev_index, next_index;
 
-	index = pending_packet - tx->dqo.pending_packets;
 	prev_index = pending_packet->prev;
 	next_index = pending_packet->next;
 
@@ -890,9 +889,9 @@ static void remove_miss_completions(struct gve_priv *priv,
 		dev_kfree_skb_any(pending_packet->skb);
 		pending_packet->skb = NULL;
 		tx->dropped_pkt++;
-		net_err_ratelimited("%s: No reinjection completion was received for: %ld.\n",
+		net_err_ratelimited("%s: No reinjection completion was received for: %d.\n",
 				    priv->dev->name,
-				    (pending_packet - tx->dqo.pending_packets));
+				    (int)(pending_packet - tx->dqo.pending_packets));
 
 		pending_packet->state = GVE_PACKET_STATE_TIMED_OUT_COMPL;
 		pending_packet->timeout_jiffies =
-- 
2.32.0.93.g670b81a890-goog


             reply	other threads:[~2021-06-24 22:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24 22:08 Bailey Forrest [this message]
2021-06-24 22:40 ` [PATCH net-next] gve: Fix warnings reported for DQO patchset patchwork-bot+netdevbpf

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=20210624220852.3733930-1-bcf@google.com \
    --to=bcf@google.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=willemb@google.com \
    /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).