All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-vmscan-use-sysfs_emit-to-instead-of-scnprintf.patch added to mm-unstable branch
@ 2022-11-24 21:50 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-11-24 21:50 UTC (permalink / raw)
  To: mm-commits, yang.yang29, xu.panda, akpm


The patch titled
     Subject: mm: vmscan: use sysfs_emit() to instead of scnprintf()
has been added to the -mm mm-unstable branch.  Its filename is
     mm-vmscan-use-sysfs_emit-to-instead-of-scnprintf.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-vmscan-use-sysfs_emit-to-instead-of-scnprintf.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Xu Panda <xu.panda@zte.com.cn>
Subject: mm: vmscan: use sysfs_emit() to instead of scnprintf()
Date: Thu, 24 Nov 2022 19:29:01 +0800 (CST)

Replace open-coded snprintf() with sysfs_emit() to simplify the code.

Link: https://lkml.kernel.org/r/202211241929015476424@zte.com.cn
Signed-off-by: Xu Panda <xu.panda@zte.com.cn>
Signed-off-by: Yang Yang <yang.yang29@zte.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/vmscan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/vmscan.c~mm-vmscan-use-sysfs_emit-to-instead-of-scnprintf
+++ a/mm/vmscan.c
@@ -5407,7 +5407,7 @@ static ssize_t show_enabled(struct kobje
 	if (arch_has_hw_nonleaf_pmd_young() && get_cap(LRU_GEN_NONLEAF_YOUNG))
 		caps |= BIT(LRU_GEN_NONLEAF_YOUNG);
 
-	return snprintf(buf, PAGE_SIZE, "0x%04x\n", caps);
+	return sysfs_emit(buf, "0x%04x\n", caps);
 }
 
 /* see Documentation/admin-guide/mm/multigen_lru.rst for details */
_

Patches currently in -mm which might be from xu.panda@zte.com.cn are

mm-vmscan-use-sysfs_emit-to-instead-of-scnprintf.patch
relay-use-strscpy-is-more-robust-and-safer.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-24 21:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24 21:50 + mm-vmscan-use-sysfs_emit-to-instead-of-scnprintf.patch added to mm-unstable branch Andrew Morton

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.