From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Ivy Lopez <skunkolee@gmail.com>, akpm@linux-foundation.org
Cc: ljs@kernel.org, liam@infradead.org, vbabka@kernel.org,
rppt@kernel.org, surenb@google.com, mhocko@suse.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/cma: fix stray newline in auto-generated CMA area name
Date: Tue, 11 Aug 2026 09:16:34 +0200 [thread overview]
Message-ID: <af459a71-8362-4f90-ad25-599a1e4a7224@kernel.org> (raw)
In-Reply-To: <20260811003441.63725-1-skunkolee@gmail.com>
On 8/11/26 02:34, Ivy Lopez wrote:
> When no explicit name is provided, cma_new_area() falls back to
> generating one via snprintf(), but the format string contains an
> embedded newline: "cma%d\n". This name is used as-is for the area's
> sysfs entry (cma_sysfs.c) and debugfs directory (cma_debug.c), so
> every auto-named CMA area ends up with a newline embedded in its
> sysfs/debugfs name.
>
> Drop the stray newline and the extra space after the size argument.
>
> Signed-off-by: Ivy Lopez <skunkolee@gmail.com>
> ---
> mm/cma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/cma.c b/mm/cma.c
> index a13ce4999b39..092cbb8f27ec 100644
> --- a/mm/cma.c
> +++ b/mm/cma.c
> @@ -240,7 +240,7 @@ static int __init cma_new_area(const char *name, phys_addr_t size,
> if (name)
> strscpy(cma->name, name);
> else
> - snprintf(cma->name, CMA_MAX_NAME, "cma%d\n", cma_area_count);
> + snprintf(cma->name, CMA_MAX_NAME, "cma%d", cma_area_count);
>
> cma->available_count = cma->count = size >> PAGE_SHIFT;
> cma->order_per_bit = order_per_bit;
Hi,
please see
https://lore.kernel.org/r/20260810093215.91419-1-hongfu.li@linux.dev
--
Cheers,
David
prev parent reply other threads:[~2026-08-11 7:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 0:34 [PATCH] mm/cma: fix stray newline in auto-generated CMA area name Ivy Lopez
2026-08-11 7:16 ` David Hildenbrand (Arm) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=af459a71-8362-4f90-ad25-599a1e4a7224@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=skunkolee@gmail.com \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.