2019-01-31 04:11:27

by Tobin C. Harding

[permalink] [raw]
Subject: [PATCH 0/3] slub: Do trivial comments fixes

From: "Tobin C. Harding" <[email protected]>

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



2019-01-31 04:11:30

by Tobin C. Harding

[permalink] [raw]
Subject: [PATCH 1/3] slub: Fix comment spelling mistake

From: "Tobin C. Harding" <[email protected]>

SLUB include file contains spelling mistake.

Fix up spelling mistake.

Signed-off-by: Tobin C. Harding <[email protected]>
---
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


2019-01-31 04:11:34

by Tobin C. Harding

[permalink] [raw]
Subject: [PATCH 2/3] slub: Capitialize comment string

From: "Tobin C. Harding" <[email protected]>

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

Capitialize comment string.

Signed-off-by: Tobin C. Harding <[email protected]>
---
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


2019-01-31 04:12:02

by Tobin C. Harding

[permalink] [raw]
Subject: [PATCH 3/3] slub: Use C89 comment style

From: "Tobin C. Harding" <[email protected]>

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 <[email protected]>
---
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


2019-01-31 06:07:18

by Pekka Enberg

[permalink] [raw]
Subject: Re: [PATCH 0/3] slub: Do trivial comments fixes

On 31/01/2019 6.10, Tobin C. Harding wrote:
> From: "Tobin C. Harding" <[email protected]>
>
> 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 <[email protected]>

2019-01-31 08:11:05

by William Kucharski

[permalink] [raw]
Subject: Re: [PATCH 1/3] slub: Fix comment spelling mistake



> On Jan 30, 2019, at 9:10 PM, Tobin C. Harding <[email protected]> wrote:
>
> Signed-off-by: Tobin C. Harding <[email protected]>
> ---
> 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.

2019-01-31 08:53:41

by Tobin C. Harding

[permalink] [raw]
Subject: Re: [PATCH 1/3] slub: Fix comment spelling mistake

On Thu, Jan 31, 2019 at 01:10:21AM -0700, William Kucharski wrote:
>
>
> > On Jan 30, 2019, at 9:10 PM, Tobin C. Harding <[email protected]> wrote:
> >
> > Signed-off-by: Tobin C. Harding <[email protected]>
> > ---
> > 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.

2019-01-31 08:54:35

by Tobin C. Harding

[permalink] [raw]
Subject: Re: [PATCH 0/3] slub: Do trivial comments fixes

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" <[email protected]>
> >
> > 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 <[email protected]>

Thanks for the review Pekka.


Tobin