Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1317971 > unrolled thread

[PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in comments

Started byAndreas Ziegler <andreas.ziegler@fau.de>
First post2016-01-26 15:40 +0100
Last post2016-01-26 16:40 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in comments Andreas Ziegler <andreas.ziegler@fau.de> - 2016-01-26 15:40 +0100
    RE: [PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in  comments "Rosen, Rami" <rami.rosen@intel.com> - 2016-01-26 16:10 +0100
      Re: [PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in  comments Andreas Ziegler <andreas.ziegler@fau.de> - 2016-01-26 16:20 +0100
        Re: [PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in  comments Johannes Weiner <hannes@cmpxchg.org> - 2016-01-26 16:40 +0100

#1317971 — [PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in comments

FromAndreas Ziegler <andreas.ziegler@fau.de>
Date2016-01-26 15:40 +0100
Subject[PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in comments
Message-ID<qVcWK-5sj-21@gated-at.bofh.it>
Commit bd1060a1d671 ("sock, cgroup: add sock->sk_cgroup") added new
code guarded by an #ifdef CONFIG_SOCK_CGROUP_DATA to
include/linux/cgroup.h.

In the comments for the corresponding #else and #endifs, however,
the option is misspelled as CONFIG_CGROUP_DATA. Fix those comments.

Signed-off-by: Andreas Ziegler <andreas.ziegler@fau.de>
---
 include/linux/cgroup.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 2162dca..48ce12f 100644
--- 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
 }
 
-#else	/* CONFIG_CGROUP_DATA */
+#else	/* CONFIG_SOCK_CGROUP_DATA */
 
 static inline void cgroup_sk_alloc(struct sock_cgroup_data *skcd) {}
 static inline void cgroup_sk_free(struct sock_cgroup_data *skcd) {}
 
-#endif	/* CONFIG_CGROUP_DATA */
+#endif	/* CONFIG_SOCK_CGROUP_DATA */
 
 #endif /* _LINUX_CGROUP_H */
-- 
1.9.1

[toc] | [next] | [standalone]


#1318031 — RE: [PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in comments

From"Rosen, Rami" <rami.rosen@intel.com>
Date2016-01-26 16:10 +0100
SubjectRE: [PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in comments
Message-ID<qVdpM-5RZ-31@gated-at.bofh.it>
In reply to#1317971
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 */
 

Regards,
Rami Rosen
Intel Corporation

[toc] | [prev] | [next] | [standalone]


#1318035 — Re: [PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in comments

FromAndreas Ziegler <andreas.ziegler@fau.de>
Date2016-01-26 16:20 +0100
SubjectRe: [PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in comments
Message-ID<qVdzs-5Vw-1@gated-at.bofh.it>
In reply to#1318031
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

I don't mind changing it, I'm just not sure if that's what we want.

Regards,

Andreas

[toc] | [prev] | [next] | [standalone]


#1318066 — Re: [PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in comments

FromJohannes Weiner <hannes@cmpxchg.org>
Date2016-01-26 16:40 +0100
SubjectRe: [PATCH] cgroup: Fix misspelling of CONFIG_SOCK_CGROUP_DATA in comments
Message-ID<qVdSP-644-29@gated-at.bofh.it>
In reply to#1318035
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!

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web