Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752166AbbBVVsC (ORCPT ); Sun, 22 Feb 2015 16:48:02 -0500 Received: from smtprelay0032.hostedemail.com ([216.40.44.32]:55546 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752041AbbBVVsA (ORCPT ); Sun, 22 Feb 2015 16:48:00 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 48,2.914,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:418:541:800:960:966:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2559:2562:2691:2828:3138:3139:3140:3141:3142:3352:3865:3866:3867:3870:3872:3874:4385:5007:6261:9010:10004:10400:10450:10455:10848:11026:11658:11914:12043:12114:12296:12438:12517:12519:12555:13069:13311:13357:14096:14097:14394:19904:19999:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: cow29_62b20f15b6604 X-Filterd-Recvd-Size: 2021 Message-ID: <1424641676.20944.18.camel@perches.com> Subject: [PATCH net-next] batman-adv: Fix use of seq_has_overflowed() From: Joe Perches To: David Miller Cc: mareklindner@neomailbox.ch, antonio@meshcoding.com, b.a.t.m.a.n@lists.open-mesh.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sun, 22 Feb 2015 13:47:56 -0800 In-Reply-To: <20150220.151843.902196140727344622.davem@davemloft.net> References: <1424136699.8287.10.camel@perches.com> <20150220.151843.902196140727344622.davem@davemloft.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.7-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1296 Lines: 36 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 --- 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); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/