linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] slub: Do trivial comments fixes
@ 2019-01-31  4:10 Tobin C. Harding
  2019-01-31  4:10 ` [PATCH 1/3] slub: Fix comment spelling mistake Tobin C. Harding
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Tobin C. Harding @ 2019-01-31  4:10 UTC (permalink / raw)
  To: Christopher Lameter
  Cc: Tobin C. Harding, Pekka Enberg, David Rientjes, Joonsoo Kim,
	Andrew Morton, linux-mm, linux-kernel

From: "Tobin C. Harding" <tobin@kernel.org>

Hi Christopher,

Here is a trivial patchset to wet my toes. This is my first patchset to
mm, if there are some mm specific nuances in relation to when in the dev
cycle (if ever) that minor (*cough* trivial) pathsets are acceptable
please say so

This patchset fixes comments strings in the SLUB subsystem.

As per discussion at LCA I am working on getting my head around the SLUB
allocator.  If you specifically do *not* want me to do minor clean up
while I'm reading please say so, I will not be offended.

thanks,
Tobin.


Tobin C. Harding (3):
  slub: Fix comment spelling mistake
  slub: Capitialize comment string
  slub: Use C89 comment style

 include/linux/slub_def.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] slub: Fix comment spelling mistake
  2019-01-31  4:10 [PATCH 0/3] slub: Do trivial comments fixes Tobin C. Harding
@ 2019-01-31  4:10 ` Tobin C. Harding
  2019-01-31  8:10   ` William Kucharski
  2019-01-31  4:10 ` [PATCH 2/3] slub: Capitialize comment string Tobin C. Harding
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Tobin C. Harding @ 2019-01-31  4:10 UTC (permalink / raw)
  To: Christopher Lameter
  Cc: Tobin C. Harding, Pekka Enberg, David Rientjes, Joonsoo Kim,
	Andrew Morton, linux-mm, linux-kernel

From: "Tobin C. Harding" <tobin@kernel.org>

SLUB include file contains spelling mistake.

Fix up spelling mistake.

Signed-off-by: Tobin C. Harding <tobin@kernel.org>
---
 include/linux/slub_def.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 3a1a1dbc6f49..201a635be846 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -81,7 +81,7 @@ struct kmem_cache_order_objects {
  */
 struct kmem_cache {
 	struct kmem_cache_cpu __percpu *cpu_slab;
-	/* Used for retriving partial slabs etc */
+	/* Used for retrieving partial slabs etc */
 	slab_flags_t flags;
 	unsigned long min_partial;
 	unsigned int size;	/* The size of an object including meta data */
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] slub: Capitialize comment string
  2019-01-31  4:10 [PATCH 0/3] slub: Do trivial comments fixes Tobin C. Harding
  2019-01-31  4:10 ` [PATCH 1/3] slub: Fix comment spelling mistake Tobin C. Harding
@ 2019-01-31  4:10 ` Tobin C. Harding
  2019-01-31  4:10 ` [PATCH 3/3] slub: Use C89 comment style Tobin C. Harding
  2019-01-31  6:06 ` [PATCH 0/3] slub: Do trivial comments fixes Pekka Enberg
  3 siblings, 0 replies; 8+ messages in thread
From: Tobin C. Harding @ 2019-01-31  4:10 UTC (permalink / raw)
  To: Christopher Lameter
  Cc: Tobin C. Harding, Pekka Enberg, David Rientjes, Joonsoo Kim,
	Andrew Morton, linux-mm, linux-kernel

From: "Tobin C. Harding" <tobin@kernel.org>

SLUB include file has particularly clean comments, one comment string is
holding us back.

Capitialize comment string.

Signed-off-by: Tobin C. Harding <tobin@kernel.org>
---
 include/linux/slub_def.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 201a635be846..d12d0e9300f5 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -110,7 +110,7 @@ struct kmem_cache {
 #endif
 #ifdef CONFIG_MEMCG
 	struct memcg_cache_params memcg_params;
-	/* for propagation, maximum size of a stored attr */
+	/* For propagation, maximum size of a stored attr */
 	unsigned int max_attr_size;
 #ifdef CONFIG_SYSFS
 	struct kset *memcg_kset;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] slub: Use C89 comment style
  2019-01-31  4:10 [PATCH 0/3] slub: Do trivial comments fixes Tobin C. Harding
  2019-01-31  4:10 ` [PATCH 1/3] slub: Fix comment spelling mistake Tobin C. Harding
  2019-01-31  4:10 ` [PATCH 2/3] slub: Capitialize comment string Tobin C. Harding
@ 2019-01-31  4:10 ` Tobin C. Harding
  2019-01-31  6:06 ` [PATCH 0/3] slub: Do trivial comments fixes Pekka Enberg
  3 siblings, 0 replies; 8+ messages in thread
From: Tobin C. Harding @ 2019-01-31  4:10 UTC (permalink / raw)
  To: Christopher Lameter
  Cc: Tobin C. Harding, Pekka Enberg, David Rientjes, Joonsoo Kim,
	Andrew Morton, linux-mm, linux-kernel

From: "Tobin C. Harding" <tobin@kernel.org>

SLUB include file uses a c99 comment style.  In line with the rest of
the kernel lets use c89 comment style.

Use C89 comment style.

Signed-off-by: Tobin C. Harding <tobin@kernel.org>
---
 include/linux/slub_def.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index d12d0e9300f5..c8e52206a761 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -151,7 +151,7 @@ struct kmem_cache {
 #else
 #define slub_cpu_partial(s)		(0)
 #define slub_set_cpu_partial(s, n)
-#endif // CONFIG_SLUB_CPU_PARTIAL
+#endif /* CONFIG_SLUB_CPU_PARTIAL */
 
 #ifdef CONFIG_SYSFS
 #define SLAB_SUPPORTS_SYSFS
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] slub: Do trivial comments fixes
  2019-01-31  4:10 [PATCH 0/3] slub: Do trivial comments fixes Tobin C. Harding
                   ` (2 preceding siblings ...)
  2019-01-31  4:10 ` [PATCH 3/3] slub: Use C89 comment style Tobin C. Harding
@ 2019-01-31  6:06 ` Pekka Enberg
  2019-01-31  8:52   ` Tobin C. Harding
  3 siblings, 1 reply; 8+ messages in thread
From: Pekka Enberg @ 2019-01-31  6:06 UTC (permalink / raw)
  To: Tobin C. Harding, Christopher Lameter
  Cc: Tobin C. Harding, Pekka Enberg, David Rientjes, Joonsoo Kim,
	Andrew Morton, linux-mm, linux-kernel

On 31/01/2019 6.10, Tobin C. Harding wrote:
> From: "Tobin C. Harding" <tobin@kernel.org>
> 
> Hi Christopher,
> 
> Here is a trivial patchset to wet my toes. This is my first patchset to
> mm, if there are some mm specific nuances in relation to when in the dev
> cycle (if ever) that minor (*cough* trivial) pathsets are acceptable
> please say so
> 
> This patchset fixes comments strings in the SLUB subsystem.
> 
> As per discussion at LCA I am working on getting my head around the SLUB
> allocator.  If you specifically do *not* want me to do minor clean up
> while I'm reading please say so, I will not be offended.

For the series:

Reviewed-by: Pekka Enberg <penberg@kernel.org>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] slub: Fix comment spelling mistake
  2019-01-31  4:10 ` [PATCH 1/3] slub: Fix comment spelling mistake Tobin C. Harding
@ 2019-01-31  8:10   ` William Kucharski
  2019-01-31  8:51     ` Tobin C. Harding
  0 siblings, 1 reply; 8+ messages in thread
From: William Kucharski @ 2019-01-31  8:10 UTC (permalink / raw)
  To: Tobin C. Harding
  Cc: Christopher Lameter, Tobin C. Harding, Pekka Enberg,
	David Rientjes, Joonsoo Kim, Andrew Morton, linux-mm,
	linux-kernel



> On Jan 30, 2019, at 9:10 PM, Tobin C. Harding <me@tobin.cc> wrote:
> 
> Signed-off-by: Tobin C. Harding <tobin@kernel.org>
> ---
> include/linux/slub_def.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
> index 3a1a1dbc6f49..201a635be846 100644
> --- a/include/linux/slub_def.h
> +++ b/include/linux/slub_def.h
> @@ -81,7 +81,7 @@ struct kmem_cache_order_objects {
>  */
> struct kmem_cache {
> 	struct kmem_cache_cpu __percpu *cpu_slab;
> -	/* Used for retriving partial slabs etc */
> +	/* Used for retrieving partial slabs etc */
> 	slab_flags_t flags;
> 	unsigned long min_partial;
> 	unsigned int size;	/* The size of an object including meta data */
> -- 

If you're going to do this cleanup, make the comment in line 84 grammatical:

/* Used for retrieving partial slabs, etc. */

Then change lines 87 and 88 to remove the space between "meta" and "data" as the
word is "metadata" (as can be seen at line 102) and remove the period at the end
of the comment on line 89 ("Free pointer offset.")

You might also want to change lines 125-127 to be a single line comment:

/* Defragmentation by allocating from a remote node */

so the commenting style is consistent throughout.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] slub: Fix comment spelling mistake
  2019-01-31  8:10   ` William Kucharski
@ 2019-01-31  8:51     ` Tobin C. Harding
  0 siblings, 0 replies; 8+ messages in thread
From: Tobin C. Harding @ 2019-01-31  8:51 UTC (permalink / raw)
  To: William Kucharski
  Cc: Christopher Lameter, Tobin C. Harding, Pekka Enberg,
	David Rientjes, Joonsoo Kim, Andrew Morton, linux-mm,
	linux-kernel

On Thu, Jan 31, 2019 at 01:10:21AM -0700, William Kucharski wrote:
> 
> 
> > On Jan 30, 2019, at 9:10 PM, Tobin C. Harding <me@tobin.cc> wrote:
> > 
> > Signed-off-by: Tobin C. Harding <tobin@kernel.org>
> > ---
> > include/linux/slub_def.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
> > index 3a1a1dbc6f49..201a635be846 100644
> > --- a/include/linux/slub_def.h
> > +++ b/include/linux/slub_def.h
> > @@ -81,7 +81,7 @@ struct kmem_cache_order_objects {
> >  */
> > struct kmem_cache {
> > 	struct kmem_cache_cpu __percpu *cpu_slab;
> > -	/* Used for retriving partial slabs etc */
> > +	/* Used for retrieving partial slabs etc */
> > 	slab_flags_t flags;
> > 	unsigned long min_partial;
> > 	unsigned int size;	/* The size of an object including meta data */
> > -- 
> 
> If you're going to do this cleanup, make the comment in line 84 grammatical:
> 
> /* Used for retrieving partial slabs, etc. */

Nice grammar, I didn't know to put a comma there.  Will fix and re-spin.

> Then change lines 87 and 88 to remove the space between "meta" and "data" as the
> word is "metadata" (as can be seen at line 102) and remove the period at the end
> of the comment on line 89 ("Free pointer offset.")
> 
> You might also want to change lines 125-127 to be a single line comment:
> 
> /* Defragmentation by allocating from a remote node */
> 
> so the commenting style is consistent throughout.

Will do with pleasure, thanks for the tips (and the review).

thanks,
Tobin.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] slub: Do trivial comments fixes
  2019-01-31  6:06 ` [PATCH 0/3] slub: Do trivial comments fixes Pekka Enberg
@ 2019-01-31  8:52   ` Tobin C. Harding
  0 siblings, 0 replies; 8+ messages in thread
From: Tobin C. Harding @ 2019-01-31  8:52 UTC (permalink / raw)
  To: Pekka Enberg
  Cc: Christopher Lameter, Tobin C. Harding, Pekka Enberg,
	David Rientjes, Joonsoo Kim, Andrew Morton, linux-mm,
	linux-kernel

On Thu, Jan 31, 2019 at 08:06:31AM +0200, Pekka Enberg wrote:
> On 31/01/2019 6.10, Tobin C. Harding wrote:
> > From: "Tobin C. Harding" <tobin@kernel.org>
> > 
> > Hi Christopher,
> > 
> > Here is a trivial patchset to wet my toes. This is my first patchset to
> > mm, if there are some mm specific nuances in relation to when in the dev
> > cycle (if ever) that minor (*cough* trivial) pathsets are acceptable
> > please say so
> > 
> > This patchset fixes comments strings in the SLUB subsystem.
> > 
> > As per discussion at LCA I am working on getting my head around the SLUB
> > allocator.  If you specifically do *not* want me to do minor clean up
> > while I'm reading please say so, I will not be offended.
> 
> For the series:
> 
> Reviewed-by: Pekka Enberg <penberg@kernel.org>

Thanks for the review Pekka.


	Tobin


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-01-31  8:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-31  4:10 [PATCH 0/3] slub: Do trivial comments fixes Tobin C. Harding
2019-01-31  4:10 ` [PATCH 1/3] slub: Fix comment spelling mistake Tobin C. Harding
2019-01-31  8:10   ` William Kucharski
2019-01-31  8:51     ` Tobin C. Harding
2019-01-31  4:10 ` [PATCH 2/3] slub: Capitialize comment string Tobin C. Harding
2019-01-31  4:10 ` [PATCH 3/3] slub: Use C89 comment style Tobin C. Harding
2019-01-31  6:06 ` [PATCH 0/3] slub: Do trivial comments fixes Pekka Enberg
2019-01-31  8:52   ` Tobin C. Harding

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).