diff mbox

batman-adv: Remove uses of return value of seq_printf

Message ID 1424136699.8287.10.camel@perches.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Joe Perches Feb. 17, 2015, 1:31 a.m. UTC
This function is soon going to return void so remove the
return value use.

Convert the return value to test seq_has_overflowed() instead.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/batman-adv/gateway_client.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Antonio Quartulli Feb. 17, 2015, 12:15 p.m. UTC | #1
Hi Joe,

thank you very much for this patch.

On 17/02/15 02:31, Joe Perches wrote:
> This function is soon going to return void so remove the
> return value use.
> 
> Convert the return value to test seq_has_overflowed() instead.
> 
> Signed-off-by: Joe Perches <joe@perches.com>


Acked-by: Antonio Quartulli <antonio@meshcoding.com>
David Miller Feb. 20, 2015, 8:18 p.m. UTC | #2
From: Joe Perches <joe@perches.com>
Date: Mon, 16 Feb 2015 17:31:39 -0800

> This function is soon going to return void so remove the
> return value use.
> 
> Convert the return value to test seq_has_overflowed() instead.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied to net-next.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c
index 27649e8..a0876ea 100644
--- a/net/batman-adv/gateway_client.c
+++ b/net/batman-adv/gateway_client.c
@@ -592,15 +592,16 @@  static int batadv_write_buffer_text(struct batadv_priv *bat_priv,
 
 	curr_gw = batadv_gw_get_selected_gw_node(bat_priv);
 
-	ret = seq_printf(seq, "%s %pM (%3i) %pM [%10s]: %u.%u/%u.%u MBit\n",
-			 (curr_gw == gw_node ? "=>" : "  "),
-			 gw_node->orig_node->orig,
-			 router_ifinfo->bat_iv.tq_avg, router->addr,
-			 router->if_incoming->net_dev->name,
-			 gw_node->bandwidth_down / 10,
-			 gw_node->bandwidth_down % 10,
-			 gw_node->bandwidth_up / 10,
-			 gw_node->bandwidth_up % 10);
+	seq_printf(seq, "%s %pM (%3i) %pM [%10s]: %u.%u/%u.%u MBit\n",
+		   (curr_gw == gw_node ? "=>" : "  "),
+		   gw_node->orig_node->orig,
+		   router_ifinfo->bat_iv.tq_avg, router->addr,
+		   router->if_incoming->net_dev->name,
+		   gw_node->bandwidth_down / 10,
+		   gw_node->bandwidth_down % 10,
+		   gw_node->bandwidth_up / 10,
+		   gw_node->bandwidth_up % 10);
+	ret = seq_has_overflowed(seq);
 
 	if (curr_gw)
 		batadv_gw_node_free_ref(curr_gw);