util/kconfig: Uprev to Linux 6.7's kconfig

Just a memory leak fix in Linux 6.7.

Change-Id: I1ff302dafa01e78429a30ff18e21ffe0b45ce46e
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80263
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Patrick Georgi 2024-01-30 23:37:11 +01:00
parent cc2ab49525
commit 3e397ddacb
3 changed files with 21 additions and 23 deletions

View File

@ -33,7 +33,7 @@ Index: kconfig/symbol.c
enum symbol_type sym_get_type(struct symbol *sym)
{
@@ -319,12 +320,14 @@ static void sym_warn_unmet_dep(struct sy
@@ -317,12 +318,14 @@ static void sym_warn_unmet_dep(struct sy
" Selected by [m]:\n");
fputs(str_get(&gs), stderr);
@ -48,7 +48,7 @@ Index: kconfig/symbol.c
struct expr *e;
if (!sym)
@@ -340,8 +343,9 @@ void sym_calc_value(struct symbol *sym)
@@ -338,8 +341,9 @@ void sym_calc_value(struct symbol *sym)
sym_calc_value(prop_get_symbol(prop));
}
@ -59,7 +59,7 @@ Index: kconfig/symbol.c
oldval = sym->curr;
switch (sym->type) {
@@ -432,6 +436,9 @@ void sym_calc_value(struct symbol *sym)
@@ -430,6 +434,9 @@ void sym_calc_value(struct symbol *sym)
;
}

View File

@ -123,9 +123,9 @@ static long long sym_get_range_val(struct symbol *sym, int base)
static void sym_validate_range(struct symbol *sym)
{
struct property *prop;
struct symbol *range_sym;
int base;
long long val, val2;
char str[64];
switch (sym->type) {
case S_INT:
@ -141,17 +141,15 @@ static void sym_validate_range(struct symbol *sym)
if (!prop)
return;
val = strtoll(sym->curr.val, NULL, base);
val2 = sym_get_range_val(prop->expr->left.sym, base);
range_sym = prop->expr->left.sym;
val2 = sym_get_range_val(range_sym, base);
if (val >= val2) {
val2 = sym_get_range_val(prop->expr->right.sym, base);
range_sym = prop->expr->right.sym;
val2 = sym_get_range_val(range_sym, base);
if (val <= val2)
return;
}
if (sym->type == S_INT)
sprintf(str, "%lld", val2);
else
sprintf(str, "0x%llx", val2);
sym->curr.val = xstrdup(str);
sym->curr.val = range_sym->curr.val;
}
static void sym_set_changed(struct symbol *sym)