All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
To: Andreas Ziegler <andreas.ziegler-d40JDW7QUjc@public.gmane.org>
Cc: "Rosen,
	Rami" <rami.rosen-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	"cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in comments
Date: Tue, 26 Jan 2016 10:34:02 -0500	[thread overview]
Message-ID: <20160126153402.GA3366@cmpxchg.org> (raw)
In-Reply-To: <56A78D56.2030902-d40JDW7QUjc@public.gmane.org>

On Tue, Jan 26, 2016 at 04:14:30PM +0100, Andreas Ziegler wrote:
> On 01/26/2016 16:08, Rosen, Rami wrote:
> > Hi, 
> > 
> > --- a/include/linux/cgroup.h
> > +++ b/include/linux/cgroup.h
> > @@ -604,11 +604,11 @@ static inline struct cgroup *sock_cgroup_ptr(struct sock_cgroup_data *skcd)
> >  #endif
> >  }
> > 
> > In this occasion, seems that maybe something else is also missing:
> > Shouldn't it be hereafter : +#else /* !CONFIG_SOCK_CGROUP_DATA */ 
> > instead ? 
> >    
> > -#else	/* CONFIG_CGROUP_DATA */
> > +#else	/* CONFIG_SOCK_CGROUP_DATA */
> 
> It seems that there is no real consensus among the developers for that
> particular case:
> 
> ziegler@box:~/linux$ git grep "#else \/\* \!CONFIG_" | wc -l
> 327
> ziegler@box:~/linux$ git grep "#else \/\* CONFIG_" | wc -l
> 564

The comments after #ifdef, #ifndef, #else, #endif name the condition
that is being branched on, not the condition that is in effect after
a specific line. Case in point: #endif /* CONFIG_SOCK_CGROUP_DATA */

Stick with the majority, and save a byte!

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: Andreas Ziegler <andreas.ziegler@fau.de>
Cc: "Rosen, Rami" <rami.rosen@intel.com>, Tejun Heo <tj@kernel.org>,
	Li Zefan <lizefan@huawei.com>,
	"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in comments
Date: Tue, 26 Jan 2016 10:34:02 -0500	[thread overview]
Message-ID: <20160126153402.GA3366@cmpxchg.org> (raw)
In-Reply-To: <56A78D56.2030902@fau.de>

On Tue, Jan 26, 2016 at 04:14:30PM +0100, Andreas Ziegler wrote:
> On 01/26/2016 16:08, Rosen, Rami wrote:
> > Hi, 
> > 
> > --- a/include/linux/cgroup.h
> > +++ b/include/linux/cgroup.h
> > @@ -604,11 +604,11 @@ static inline struct cgroup *sock_cgroup_ptr(struct sock_cgroup_data *skcd)
> >  #endif
> >  }
> > 
> > In this occasion, seems that maybe something else is also missing:
> > Shouldn't it be hereafter : +#else /* !CONFIG_SOCK_CGROUP_DATA */ 
> > instead ? 
> >    
> > -#else	/* CONFIG_CGROUP_DATA */
> > +#else	/* CONFIG_SOCK_CGROUP_DATA */
> 
> It seems that there is no real consensus among the developers for that
> particular case:
> 
> ziegler@box:~/linux$ git grep "#else \/\* \!CONFIG_" | wc -l
> 327
> ziegler@box:~/linux$ git grep "#else \/\* CONFIG_" | wc -l
> 564

The comments after #ifdef, #ifndef, #else, #endif name the condition
that is being branched on, not the condition that is in effect after
a specific line. Case in point: #endif /* CONFIG_SOCK_CGROUP_DATA */

Stick with the majority, and save a byte!

  parent reply	other threads:[~2016-01-26 15:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26 14:39 [PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in comments Andreas Ziegler
     [not found] ` <1453819158-25380-1-git-send-email-andreas.ziegler-d40JDW7QUjc@public.gmane.org>
2016-01-26 15:08   ` Rosen, Rami
2016-01-26 15:08     ` Rosen, Rami
2016-01-26 15:14     ` Andreas Ziegler
     [not found]       ` <56A78D56.2030902-d40JDW7QUjc@public.gmane.org>
2016-01-26 15:34         ` Johannes Weiner [this message]
2016-01-26 15:34           ` Johannes Weiner

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=20160126153402.GA3366@cmpxchg.org \
    --to=hannes-druugvl0lcnafugrpc6u6w@public.gmane.org \
    --cc=andreas.ziegler-d40JDW7QUjc@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=rami.rosen-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.