From: Joe Perches <joe@perches.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org,
mareklindner@neomailbox.ch, antonio@meshcoding.com,
linux-kernel@vger.kernel.org
Subject: [B.A.T.M.A.N.] [PATCH net-next] batman-adv: Fix use of seq_has_overflowed()
Date: Sun, 22 Feb 2015 13:47:56 -0800 [thread overview]
Message-ID: <1424641676.20944.18.camel@perches.com> (raw)
In-Reply-To: <20150220.151843.902196140727344622.davem@davemloft.net>
net-next commit 6d91147d183c ("batman-adv: Remove uses of return value
of seq_printf") incorrectly changed the overflow occurred return from
-1 to 1. Change it back so that the test of batadv_write_buffer_text's
return value in batadv_gw_client_seq_print_text works properly.
Signed-off-by: Joe Perches <joe@perches.com>
---
sorry 'bout that.
I believe this won't have any real effect unless there
are something like 500+ entries in the gateway list.
net/batman-adv/gateway_client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c
index a0876ea..090828c 100644
--- a/net/batman-adv/gateway_client.c
+++ b/net/batman-adv/gateway_client.c
@@ -601,7 +601,7 @@ static int batadv_write_buffer_text(struct batadv_priv *bat_priv,
gw_node->bandwidth_down % 10,
gw_node->bandwidth_up / 10,
gw_node->bandwidth_up % 10);
- ret = seq_has_overflowed(seq);
+ ret = seq_has_overflowed(seq) ? -1 : 0;
if (curr_gw)
batadv_gw_node_free_ref(curr_gw);
next prev parent reply other threads:[~2015-02-22 21:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-17 1:31 [B.A.T.M.A.N.] [PATCH] batman-adv: Remove uses of return value of seq_printf Joe Perches
2015-02-17 12:15 ` Antonio Quartulli
2015-02-20 20:18 ` David Miller
2015-02-22 21:47 ` Joe Perches [this message]
2015-02-22 22:00 ` [B.A.T.M.A.N.] [PATCH net-next] batman-adv: Fix use of seq_has_overflowed() David Miller
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=1424641676.20944.18.camel@perches.com \
--to=joe@perches.com \
--cc=antonio@meshcoding.com \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mareklindner@neomailbox.ch \
--cc=netdev@vger.kernel.org \
/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).