diff options
| author | Shiyang Ruan <ruansy.fnst@fujitsu.com> | 2025-01-08 04:52:23 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-03-17 08:05:56 +0300 |
| commit | 100bc3b877fca43e46485883eaf179aec7a11c86 (patch) | |
| tree | 6aa28a30793b98ee9365bafc3974fc5d9490d600 /include/linux | |
| parent | ad4c9bb5415232b452157002a48d58a1dc92d3c0 (diff) | |
| download | linux-100bc3b877fca43e46485883eaf179aec7a11c86.tar.xz | |
drivers/base/memory: simplify outputting of valid_zones_show()
No need to specify position at the first writing to the buf because the
@len is always 0 at this time. Use sysfs_emit() instead to simplify it.
Also avoid setting/checking default_zone with a conditional operator.
Link: https://lkml.kernel.org/r/20250108015223.1522887-1-ruansy.fnst@fujitsu.com
Signed-off-by: Shiyang Ruan <ruansy.fnst@fujitsu.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
