From: David Miller <davem@davemloft.net>
To: amwang@redhat.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 2/3] ipv6, route: remove BACKTRACK() macro
Date: Mon, 10 Sep 2012 21:42:45 -0400 (EDT) [thread overview]
Message-ID: <20120910.214245.368123682481775366.davem@davemloft.net> (raw)
In-Reply-To: <1347326362.30731.9.camel@cr0>
From: Cong Wang <amwang@redhat.com>
Date: Tue, 11 Sep 2012 09:19:22 +0800
> On Mon, 2012-09-10 at 16:32 -0400, David Miller wrote:
>> From: Cong Wang <amwang@redhat.com>
>> Date: Mon, 10 Sep 2012 20:48:45 +0800
>>
>> > It doesn't save any code, nor it helps readability.
>> >
>> > Signed-off-by: Cong Wang <amwang@redhat.com>
>>
>> I'm not applying this.
>>
>> Having two copies of the same exact logic means we will accumulate
>> bugs in the future if someone fixes the problem only in one
>> copy.
>
> Makes sense, but BACKTRACK() is not well written, as it jumps out of its
> definition. :(
Anyone who has worked with longest-matching-prefix TRIE traversal
functions will have a pretty good idea what is going on here.
Yes, I know this conflicts with cases like how we killed all of
the netlink macros with embedded gotos.
But this patch made things worse and added code duplication. Fix
it without the code duplication side effect and it'll be fine.
next prev parent reply other threads:[~2012-09-11 1:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 12:48 [PATCH 1/3] ipv6: remove some useless RCU read lock Cong Wang
2012-09-10 12:48 ` [PATCH 2/3] ipv6, route: remove BACKTRACK() macro Cong Wang
2012-09-10 13:43 ` Shan Wei
2012-09-11 1:22 ` Cong Wang
2012-09-10 13:54 ` David Laight
2012-09-11 1:07 ` Cong Wang
2012-09-10 20:32 ` David Miller
2012-09-11 1:19 ` Cong Wang
2012-09-11 1:42 ` David Miller [this message]
2012-09-11 8:39 ` Cong Wang
2012-09-10 12:48 ` [PATCH 3/3] fib6: remove some useless empty lines and comments Cong Wang
2012-09-10 20:33 ` David Miller
2012-09-11 1:09 ` Cong Wang
2012-09-10 20:31 ` [PATCH 1/3] ipv6: remove some useless RCU read lock 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=20120910.214245.368123682481775366.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=amwang@redhat.com \
--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).