slub: Do trivial comments fixes
cover 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(-)
Signature · 1 line
2.20.1
PATCH 1/3 slub: Fix comment spelling mistake
From: "Tobin C. Harding" <[email protected]>
SLUB include file contains spelling mistake.
Fix up spelling mistake.
--- include/linux/slub_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/slub_def.h +1 -1
@@ -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 */
Signature · 1 line
2.20.1
Re: [PATCH 1/3] slub: Fix comment spelling mistake
Quoted 15 lines · Tobin C. Harding
Signed-off-by Tobin C. Harding <[email protected]>---
include/linux/slub_def.h| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)include/linux/slub_def.h +0
-0
include/linux/slub_def.h struct kmem_cache_order_objects { · line 87
Quoted 8 lines
include/linux/slub_def.h +1
-1@@ -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.
Re: [PATCH 1/3] slub: Fix comment spelling mistake
Quoted 26 lines · William Kucharski
Quoted 15 lines · Tobin C. Harding
Signed-off-by Tobin C. Harding <[email protected]>---
include/linux/slub_def.h| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)include/linux/slub_def.h +0
-0include/linux/slub_def.h struct kmem_cache_order_objects { · line 87
Quoted 8 lines
include/linux/slub_def.h +1
-1@@ -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:
Quoted 1 line
/* Used for retrieving partial slabs, etc. */
Nice grammar, I didn't know to put a comma there. Will fix and re-spin.
Quoted 9 lines
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.
PATCH 2/3 slub: Capitialize comment string
In reply to Tobin C. HardingFrom: "Tobin C. Harding" <[email protected]>
SLUB include file has particularly clean comments, one comment string is holding us back.
Capitialize comment string.
--- include/linux/slub_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/slub_def.h +1 -1
@@ -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;
Signature · 1 line
2.20.1
PATCH 3/3 slub: Use C89 comment style
In reply to Tobin C. HardingFrom: "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.
--- include/linux/slub_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/slub_def.h +1 -1
@@ -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
Signature · 1 line
2.20.1
Quoted 9 lines · Tobin C. Harding
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
Quoted 5 lines
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:
Quoted 12 lines · Pekka Enberg
Quoted 11 lines · Tobin C. Harding
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.
Quoted 7 lines
Quoted 3 lines
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