Skip to contentSkip to conversation

slub: Do trivial comments fixes

PATCH In review Tobin C. Harding 4 participants 7 messages Feb 4, 2019 – Feb 6, 2019 Memory management

lore
Share & tools
lore
#0 lore raw

v2 cover slub: Do trivial comments fixes

Hi,

Here is v2 of the comments fixes [to single SLUB header file].

thanks,
Tobin.

Changes since v1:

- Re-order patches (put the easy acceptable ones from v1 first).
- Do grammar/punctuation fixes thoroughly (thanks William).
- Send the set to Andrew instead of Christopher since we are going in through his tree.

Tobin C. Harding (3):
slub: Capitialize comment string
slub: Use C89 comment style
slub: Correct grammar/punctuation in comments

 include/linux/slub_def.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/3 slub: Capitialize comment string

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
index 3a1a1dbc6f49..541b082ffcaf 100644
@@ -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
#2 lore raw

PATCH v2 2/3 slub: Use C89 comment style

In reply to Tobin C. Harding

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
index 541b082ffcaf..a3f1fc7e52a6 100644
@@ -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
#3 lore raw

PATCH v2 3/3 slub: Correct grammar/punctuation in comments

In reply to Tobin C. Harding

Currently there are a few minor grammatical errors in the comments. While we are at it we can fix punctuation to be correct and uniform also.

Correct grammar/punctuation in comments.

---
 include/linux/slub_def.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
include/linux/slub_def.h +4 -4
index a3f1fc7e52a6..d2153789bd9f 100644
@@ -81,12 +81,12 @@ 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 */
-	unsigned int object_size;/* The size of an object without meta data */
-	unsigned int offset;	/* Free pointer offset. */
+	unsigned int size;	/* The size of an object including metadata */
+	unsigned int object_size;/* The size of an object without metadata */
+	unsigned int offset;	/* Free pointer offset */
 #ifdef CONFIG_SLUB_CPU_PARTIAL
 	/* Number of per cpu partial objects to keep around */
 	unsigned int cpu_partial;
Signature · 1 line
2.20.1
#5 lore raw
Quoted 5 lines · Andrew Morton
Quoted 1 line · On Mon, 4 Feb 2019 11:57:10 +1100 "Tobin C. Harding" <[email protected]> wrote:

Here is v2 of the comments fixes [to single SLUB header file]

Thanks. I think I'll put these into a single patch.

Awesome, thank you.