diff mbox series

[1/3] slub: Fix comment spelling mistake

Message ID 20190131041003.15772-2-me@tobin.cc (mailing list archive)
State New, archived
Headers show
Series slub: Do trivial comments fixes | expand

Commit Message

Tobin Harding Jan. 31, 2019, 4:10 a.m. UTC
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(-)

Comments

William Kucharski Jan. 31, 2019, 8:10 a.m. UTC | #1
> 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.
Tobin Harding Jan. 31, 2019, 8:51 a.m. UTC | #2
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.
diff mbox series

Patch

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 */