Function u64_range is pretty useless now, better open-code the operation. Signed-off-by: Jean Delvare <jdelv...@suse.de> --- dmidecode.c | 2 +- util.c | 6 ------ util.h | 1 - 3 files changed, 1 insertion(+), 8 deletions(-)
--- dmidecode.orig/dmidecode.c +++ dmidecode/dmidecode.c @@ -3147,7 +3147,7 @@ static void dmi_mapped_address_extended_ if (start == end) pr_attr("Range Size", "Invalid"); else - dmi_print_memory_size("Range Size", u64_range(start, end), 0); + dmi_print_memory_size("Range Size", end - start + 1, 0); } /* --- dmidecode.orig/util.c +++ dmidecode/util.c @@ -261,9 +261,3 @@ void *mem_chunk(off_t base, size_t len, return p; } - -/* Returns end - start + 1, assuming start < end */ -u64 u64_range(u64 start, u64 end) -{ - return end - start + 1; -} --- dmidecode.orig/util.h +++ dmidecode/util.h @@ -27,4 +27,3 @@ int checksum(const u8 *buf, size_t len); void *read_file(off_t base, size_t *len, const char *filename); void *mem_chunk(off_t base, size_t len, const char *devmem); -u64 u64_range(u64 start, u64 end); -- Jean Delvare SUSE L3 Support