linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: pdowney@brocade.com
Cc: kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org,
	kaber@trash.net, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH] IGMP: Inhibit reports for local multicast groups
Date: Tue, 25 Aug 2015 14:20:05 -0700 (PDT)	[thread overview]
Message-ID: <20150825.142005.1823541352876560634.davem@davemloft.net> (raw)
In-Reply-To: <1c262ff7179d56eefb2c723538d1daaa88892730.1440415003.git.pdowney@brocade.com>

From: Philip Downey <pdowney@brocade.com>
Date: Mon, 24 Aug 2015 12:39:17 +0100

> +extern int sysctl_igmp_link_local_reports;
 ...
> +/* IGMP reports for link-local multicast groups are enabled by default */
> +#define IGMP_ENABLE_LLM         1
> +
> +int sysctl_igmp_link_local_reports __read_mostly = IGMP_ENABLE_LLM;
> +
> +#define IGMP_INHIBIT_LINK_LOCAL_REPORTS(_ipaddr) \
> +	(ipv4_is_local_multicast(_ipaddr) && \
> +	 (sysctl_igmp_link_local_reports == 0))
> +

People know that "1" and "0" means enable and disable respectively, so this
macros is pretty excessive.  Just remove it.

Also, simplify the name of the sysctl to something like
"sysctl_igmp_llm_reports" or similar, and simplify the test against 0
to be in the canonical "!x" format.  Then the test can fit on one
line:

	(ipv4_is_local_multicast(_ipaddr) && !sysctl_igmp_llm_reports)


  reply	other threads:[~2015-08-25 21:20 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1>
2009-03-14 21:39 ` [PATCH 00/09][Staging] Checkpatch.pl fixes for the agnx driver Erik Andrén
2009-03-14 21:39   ` [PATCH 01/09] Checkpatch.pl: Fixup agnx.h Erik Andrén
2009-03-14 21:39     ` [PATCH 02/09] Checkpatch.pl: Fixup debug.h Erik Andrén
2009-03-14 21:39       ` [PATCH 03/09] Checkpatch.pl: Fixup pci.c Erik Andrén
2009-03-14 21:39         ` [PATCH 04/09] Checkpatch.pl: Fixup phy.c Erik Andrén
2009-03-14 21:39           ` [PATCH 05/09] Checkpatch.pl: Fixup rf.c Erik Andrén
2009-03-14 21:39             ` [PATCH 06/09] Checkpatch.pl: Fixup sta.c Erik Andrén
2009-03-14 21:39               ` [PATCH 07/09] Checkpatch.pl: Fixup sta.h Erik Andrén
2009-03-14 21:39                 ` [PATCH 08/09] Checkpatch.pl: Fixup table.c Erik Andrén
2009-03-14 21:39                   ` [PATCH 09/09] Checkpatch.pl: Fixup xmit.c Erik Andrén
2009-03-19 20:47 ` [Staging] Checkpatch fixes for altpciechdma Erik Andrén
2009-03-19 20:47   ` [PATCH 1/1] Checkpatch.pl: Fixup altpciechdma.c Erik Andrén
2009-03-19 20:57 ` [Staging] Fixup asus_oled Erik Andrén
2009-03-19 20:57   ` [PATCH 1/1] Fixup asus_oled.c Erik Andrén
2009-03-19 21:05     ` Erik Andrén
2012-04-18 16:51 ` [PATCH 2/2] staging:android:fix line over 80 characters issue in binders.c this patch fixes line over 80 characters warning that was found using checkpatch.pl tool Signed-off-by:Anirudh Bhat <abhat38@gmail.com> anirudh bhat
2012-04-18 23:50   ` Greg KH
2012-04-19  8:22 ` David Howells
2012-04-25  1:11   ` Calvin Walton
2015-08-24 11:39 ` [PATCH] IGMP: Inhibit reports for local multicast groups Philip Downey
2015-08-25 21:20   ` David Miller [this message]
2015-08-26  9:23     ` Philip Downey
2015-08-27 15:46 ` Philip Downey
2015-08-28 20:29   ` David Miller
2015-08-28 21:19   ` Cong Wang
2015-08-31 10:33     ` Philip Downey
     [not found] ` <1477112061-12868-1-git-send-email-gakula@caviumnetworks.com>
2016-10-24 13:44   ` [PATCH] arm64: SMMU-v2: Workaround for Cavium ThunderX erratum 28168 Marc Zyngier
2016-10-24 20:54     ` Thomas Gleixner
2015-08-12 16:13 [PATCH] IGMP: Inhibit reports for local multicast groups Philip Downey
2015-08-12 23:45 ` David Miller
2015-08-13 14:48   ` Philip Downey
2015-08-13 16:06     ` Andrew Lunn
2015-08-13 16:52       ` Philip Downey
2015-08-13 17:01         ` Andrew Lunn
2015-08-13 18:08           ` Thadeu Lima de Souza Cascardo
2015-08-14  8:55             ` Philip Downey
2015-08-14  8:56           ` Philip Downey
2015-08-14 13:35             ` Andrew Lunn
2015-08-14 14:36               ` Philip Downey

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=20150825.142005.1823541352876560634.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pdowney@brocade.com \
    --cc=yoshfuji@linux-ipv6.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).