summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2026-05-18 14:31:47 +0200
committerPetr Mladek <pmladek@suse.com>2026-06-03 13:37:42 +0200
commit26ea7f319a1fe48cfcf0714a5f459443742aca31 (patch)
treeaea63d928d135ddc7b7a667569309752c3136548 /lib
parent6a579050f8300adb794f09a5d1f4ff435d43ced5 (diff)
lib/vsprintf: replace min_t/max_t with min/max
Use the simpler min()/max() macros since the values are all compatible. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20260518123145.79411-3-thorsten.blum@linux.dev Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/vsprintf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 90b267b59254..6c0aff78b3bc 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1209,7 +1209,7 @@ char *hex_string(char *buf, char *end, u8 *addr, struct printf_spec spec,
}
if (spec.field_width > 0)
- len = min_t(int, spec.field_width, 64);
+ len = min(spec.field_width, 64);
for (i = 0; i < len; ++i) {
if (buf < end)
@@ -1234,7 +1234,7 @@ char *bitmap_string(char *buf, char *end, const unsigned long *bitmap,
struct printf_spec spec, const char *fmt)
{
const int CHUNKSZ = 32;
- int nr_bits = max_t(int, spec.field_width, 0);
+ int nr_bits = max(spec.field_width, 0);
int i, chunksz;
bool first = true;
@@ -1277,7 +1277,7 @@ static noinline_for_stack
char *bitmap_list_string(char *buf, char *end, const unsigned long *bitmap,
struct printf_spec spec, const char *fmt)
{
- int nr_bits = max_t(int, spec.field_width, 0);
+ int nr_bits = max(spec.field_width, 0);
bool first = true;
int rbot, rtop;