From: Marek Lindner <lindner_marek@yahoo.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCHv2 3/3] batman-adv: Modified forwarding behaviour for multicast packets
Date: Wed, 29 May 2013 00:39:33 +0800 [thread overview]
Message-ID: <201305290039.34391.lindner_marek@yahoo.de> (raw)
In-Reply-To: <20130528154054.GC14466@pandem0nium>
On Tuesday, May 28, 2013 23:40:54 Simon Wunderlich wrote:
> You can safe an indendation below if you return -1 immediately here
> if the statement above is false. Also multiple statements might be better
> for readability and later changes, e.g.
>
> if (!atomic_read(&bat_priv->mcast_group_awareness))
> return 1;
>
> if (atomic_read(&bat_priv->mcast.num_non_aware))
> return 1;
>
> if (ntohs(ethhdr->h_proto) != ETH_P_IPV6)
> return 1;
A quick hint from my end: The kernel maintainer don't like code that returns
"random" values like 1/0/-1. Either use bool or meaningful defines instead of
raw numbers.
Cheers,
Marek
next prev parent reply other threads:[~2013-05-28 16:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-24 8:02 [B.A.T.M.A.N.] Basic Multicast Optimizations Linus Lüssing
2013-05-24 8:02 ` [B.A.T.M.A.N.] [PATCHv2 1/3] batman-adv: Multicast Listener Announcements via Translation Table Linus Lüssing
2013-05-28 15:26 ` Simon Wunderlich
2013-05-24 8:02 ` [B.A.T.M.A.N.] [PATCHv2 2/3] batman-adv: Announce new capability via multicast TVLV Linus Lüssing
2013-05-28 15:31 ` Simon Wunderlich
2013-05-24 8:02 ` [B.A.T.M.A.N.] [PATCHv2 3/3] batman-adv: Modified forwarding behaviour for multicast packets Linus Lüssing
2013-05-28 15:40 ` Simon Wunderlich
2013-05-28 16:39 ` Marek Lindner [this message]
2013-05-28 16:42 ` Antonio Quartulli
2013-05-24 9:00 ` [B.A.T.M.A.N.] Basic Multicast Optimizations Linus Lüssing
2013-05-24 9:06 ` Antonio Quartulli
2013-05-24 9:33 ` Marek Lindner
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=201305290039.34391.lindner_marek@yahoo.de \
--to=lindner_marek@yahoo.de \
--cc=b.a.t.m.a.n@lists.open-mesh.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