linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: Capitalize letters for readability
@ 2024-07-25 19:28 Steven Davis
  2024-07-25 20:21 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Davis @ 2024-07-25 19:28 UTC (permalink / raw)
  To: akpm, urezki, hch, hannes, yosryahmed, nphamcs, chengming.zhou
  Cc: linux-mm, linux-kernel, Steven Davis

This patch capitalizes the first letters of error and
debug messages to enhance readability. This is important
for adhering to the style of other error messages in the
kernel, and making it easier and clearer to read the 
messages upon the (likely dark) terminal.
 
Signed-off-by: Steven Davis <goldside000@outlook.com>
---
 mm/execmem.c | 2 +-
 mm/vmalloc.c | 2 +-
 mm/zpool.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/execmem.c b/mm/execmem.c
index 0c4b36bc6d10..ce4334087b1b 100644
--- a/mm/execmem.c
+++ b/mm/execmem.c
@@ -40,7 +40,7 @@ static void *__execmem_alloc(struct execmem_range *range, size_t size)
 	}
 
 	if (!p) {
-		pr_warn_ratelimited("execmem: unable to allocate memory\n");
+		pr_warn_ratelimited("execmem: Unable to allocate memory\n");
 		return NULL;
 	}
 
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 6b783baf12a1..131b05aef593 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -108,7 +108,7 @@ static int vmap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
 		if (!pte_none(ptep_get(pte))) {
 			if (pfn_valid(pfn)) {
 				page = pfn_to_page(pfn);
-				dump_page(page, "remapping already mapped page");
+				dump_page(page, "Remapping already mapped page");
 			}
 			BUG();
 		}
diff --git a/mm/zpool.c b/mm/zpool.c
index b9fda1fa857d..3c766a1d065b 100644
--- a/mm/zpool.c
+++ b/mm/zpool.c
@@ -198,7 +198,7 @@ struct zpool *zpool_create_pool(const char *type, const char *name, gfp_t gfp)
  */
 void zpool_destroy_pool(struct zpool *zpool)
 {
-	pr_debug("destroying pool type %s\n", zpool->driver->type);
+	pr_debug("Destroying pool type %s\n", zpool->driver->type);
 
 	zpool->driver->destroy(zpool->pool);
 	zpool_put_driver(zpool->driver);
-- 
2.45.2



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

* Re: [PATCH] mm: Capitalize letters for readability
  2024-07-25 19:28 [PATCH] mm: Capitalize letters for readability Steven Davis
@ 2024-07-25 20:21 ` Andrew Morton
  2024-07-25 20:49   ` Steven Davis
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2024-07-25 20:21 UTC (permalink / raw)
  To: Steven Davis
  Cc: urezki, hch, hannes, yosryahmed, nphamcs, chengming.zhou,
	linux-mm, linux-kernel

On Thu, 25 Jul 2024 15:28:29 -0400 Steven Davis <goldside000@outlook.com> wrote:

> This patch capitalizes the first letters of error and
> debug messages to enhance readability. This is important
> for adhering to the style of other error messages in the
> kernel, and making it easier and clearer to read the 
> messages upon the (likely dark) terminal.

hm.

x1:/usr/src/25> grep "  pr_[^(]*.*: [A-Z]" mm/*.c | wc -l
34
x1:/usr/src/25> grep "  pr_[^(]*.*: [a-z]" mm/*.c | wc -l 
97

If we're going to make this change then we should change everything,
add a checkpatch rule, etc.

But I do think such a change is too trivial to justify churning the
code around.


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

* Re: [PATCH] mm: Capitalize letters for readability
  2024-07-25 20:21 ` Andrew Morton
@ 2024-07-25 20:49   ` Steven Davis
  2024-07-25 21:27     ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Davis @ 2024-07-25 20:49 UTC (permalink / raw)
  To: akpm
  Cc: chengming.zhou, goldside000, hannes, hch, linux-kernel, linux-mm,
	nphamcs, urezki, yosryahmed

On Thu, 25 Jul 2024 13:21:24 -0700, Andrew Morton <akpm@linux-foundation.org> wrote:

> x1:/usr/src/25> grep "  pr_[^(]*.*: [A-Z]" mm/*.c | wc -l
> 34
> x1:/usr/src/25> grep "  pr_[^(]*.*: [a-z]" mm/*.c | wc -l
> 97

Huh. I guess I missed a lot of them.

> If we're going to make this change then we should change everything,
> add a checkpatch rule, etc.

If that approach works, we could do it, I guess. Sounds like a lot of
work for capitalization changes.

> But I do think such a change is too trivial to justify churning the
> code around.

So how do we proceed? I could move onto another patch, or, as you said,
change everything and add a checkpatch rule.

You're the boss.

		Steven


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

* Re: [PATCH] mm: Capitalize letters for readability
  2024-07-25 20:49   ` Steven Davis
@ 2024-07-25 21:27     ` Andrew Morton
  2024-07-26 12:08       ` David Hildenbrand
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2024-07-25 21:27 UTC (permalink / raw)
  To: Steven Davis
  Cc: chengming.zhou, hannes, hch, linux-kernel, linux-mm, nphamcs,
	urezki, yosryahmed

On Thu, 25 Jul 2024 16:49:51 -0400 Steven Davis <goldside000@outlook.com> wrote:

> > But I do think such a change is too trivial to justify churning the
> > code around.
> 
> So how do we proceed? I could move onto another patch, or, as you said,
> change everything and add a checkpatch rule.

Let's not bother with this, unless others feel more strongly than I.


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

* Re: [PATCH] mm: Capitalize letters for readability
  2024-07-25 21:27     ` Andrew Morton
@ 2024-07-26 12:08       ` David Hildenbrand
  0 siblings, 0 replies; 5+ messages in thread
From: David Hildenbrand @ 2024-07-26 12:08 UTC (permalink / raw)
  To: Andrew Morton, Steven Davis
  Cc: chengming.zhou, hannes, hch, linux-kernel, linux-mm, nphamcs,
	urezki, yosryahmed

On 25.07.24 23:27, Andrew Morton wrote:
> On Thu, 25 Jul 2024 16:49:51 -0400 Steven Davis <goldside000@outlook.com> wrote:
> 
>>> But I do think such a change is too trivial to justify churning the
>>> code around.
>>
>> So how do we proceed? I could move onto another patch, or, as you said,
>> change everything and add a checkpatch rule.
> 
> Let's not bother with this, unless others feel more strongly than I.

I don't think it's worth the churn. I'll note that

"mm: Capitalize letters for readability"

is inconsistent with most other MM commits where would have instead

"mm: capitalize letters for readability"

:P

-- 
Cheers,

David / dhildenb



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

end of thread, other threads:[~2024-07-26 12:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-25 19:28 [PATCH] mm: Capitalize letters for readability Steven Davis
2024-07-25 20:21 ` Andrew Morton
2024-07-25 20:49   ` Steven Davis
2024-07-25 21:27     ` Andrew Morton
2024-07-26 12:08       ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox