From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754553AbbERPxP (ORCPT ); Mon, 18 May 2015 11:53:15 -0400 Received: from mail.us.es ([193.147.175.20]:38095 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754514AbbERPw4 (ORCPT ); Mon, 18 May 2015 11:52:56 -0400 X-Qmail-Scanner-Diagnostics: from 127.0.0.1 by antivirus2 (envelope-from , uid 501) with qmail-scanner-2.10 (clamdscan: 0.98.7/20480. spamassassin: 3.4.0. Clear:RC:1(127.0.0.1):SA:0(-103.2/7.5):. Processed in 1.978022 secs); 18 May 2015 15:52:52 -0000 X-Spam-ASN: AS12715 87.216.0.0/16 X-Envelope-From: pneira@us.es Date: Mon, 18 May 2015 17:57:38 +0200 From: Pablo Neira Ayuso To: Joe Perches Cc: Patrick McHardy , Jozsef Kadlecsik , "David S. Miller" , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] netfilter: Use correct return for seq_show functions Message-ID: <20150518155738.GA3854@salvia> References: <1431480503.2884.110.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431480503.2884.110.camel@perches.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 12, 2015 at 06:28:23PM -0700, Joe Perches wrote: > Using seq_has_overflowed doesn't produce the right return value. > Either 0 or -1 is, but 0 is much more common and works well when > seq allocation retries. > > I believe this doesn't matter as the initial allocation is always > sufficient, this is just a correctness patch. > > Miscellanea: > > o Don't use strlen, use *ptr to determine if a string > should be emitted like all the other tests here > o Delete unnecessary return statements Applied, thanks.