From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Al Viro <viro@ZenIV.linux.org.uk>,
Joe Perches <joe@perches.com>,
Andrew Morton <akpm@linux-foundation.org>,
Patrick McHardy <kaber@trash.net>,
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org
Subject: Re: [PATCH 3/8] netfilter: Convert print_tuple functions to return void
Date: Thu, 6 Nov 2014 00:23:14 +0100 [thread overview]
Message-ID: <20141105232314.GA3195@salvia> (raw)
In-Reply-To: <20141105192544.214361386@goodmis.org>
On Wed, Nov 05, 2014 at 02:24:29PM -0500, Steven Rostedt wrote:
> From: Joe Perches <joe@perches.com>
>
> Since adding a new function to seq_file (seq_has_overflowed())
> there isn't any value for functions called from seq_show to
> return anything. Remove the int returns of the various
> print_tuple/<foo>_print_tuple functions.
>
> Link: http://lkml.kernel.org/p/f2e8cf8df433a197daa62cbaf124c900c708edc7.1412031505.git.joe@perches.com
>
> Cc: Pablo Neira Ayuso <pablo@netfilter.org>
> Cc: Patrick McHardy <kaber@trash.net>
> Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
> Cc: netfilter-devel@vger.kernel.org
> Cc: coreteam@netfilter.org
> Signed-off-by: Joe Perches <joe@perches.com>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
I replied to this yesterday, but it seems some spam filter also
munched it. One comment below.
> @@ -202,9 +203,8 @@ static int ct_seq_show(struct seq_file *s, void *v)
> if (l4proto->print_conntrack)
> l4proto->print_conntrack(s, ct);
>
> - if (print_tuple(s, &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
> - l3proto, l4proto))
> - goto release;
> + print_tuple(s, &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
> + l3proto, l4proto);
>
> if (seq_print_acct(s, ct, IP_CT_DIR_ORIGINAL))
> goto release;
seq_print_acct returns seq_printf which is now void. I guess you have
to remove this check too.
> @@ -213,9 +213,8 @@ static int ct_seq_show(struct seq_file *s, void *v)
> if (seq_printf(s, "[UNREPLIED] "))
> goto release;
>
> - if (print_tuple(s, &ct->tuplehash[IP_CT_DIR_REPLY].tuple,
> - l3proto, l4proto))
> - goto release;
> + print_tuple(s, &ct->tuplehash[IP_CT_DIR_REPLY].tuple,
> + l3proto, l4proto);
>
> if (seq_print_acct(s, ct, IP_CT_DIR_REPLY))
> goto release;
And here.
next prev parent reply other threads:[~2014-11-05 23:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20141105192426.348510548@goodmis.org>
2014-11-05 19:24 ` [PATCH 2/8] netfilter: Remove return values for print_conntrack callbacks Steven Rostedt
2014-11-05 19:24 ` [PATCH 3/8] netfilter: Convert print_tuple functions to return void Steven Rostedt
2014-11-05 23:23 ` Pablo Neira Ayuso [this message]
2014-11-05 23:26 ` Joe Perches
2014-11-05 19:24 ` [PATCH 4/8] netfilter: Remove checks of seq_printf() return values Steven Rostedt
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=20141105232314.GA3195@salvia \
--to=pablo@netfilter.org \
--cc=akpm@linux-foundation.org \
--cc=coreteam@netfilter.org \
--cc=joe@perches.com \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=viro@ZenIV.linux.org.uk \
/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).