diff options
author | Thorsten Blum <thorsten.blum@toblux.com> | 2024-03-18 11:47:23 +0100 |
---|---|---|
committer | Dave Hansen <dave.hansen@linux.intel.com> | 2024-04-03 08:32:04 -0700 |
commit | 0049f04c7dfe977a0f8f6935071db3416e641837 (patch) | |
tree | be620d6f2e6a5eb10bce66635f627528def60f05 /scripts/gdb/linux/mm.py | |
parent | 39cd87c4eb2b893354f3b850f916353f2658ae6f (diff) |
x86/apic: Improve data types to fix Coccinelle warnings
Given that acpi_pm_read_early() returns a u32 (masked to 24 bits), several
variables that store its return value are improved by adjusting their data
types from unsigned long to u32. Specifically, change deltapm's type from
long to u32 because its value fits into 32 bits and it cannot be negative.
These data type improvements resolve the following two Coccinelle/
coccicheck warnings reported by do_div.cocci:
arch/x86/kernel/apic/apic.c:734:1-7: WARNING: do_div() does a 64-by-32
division, please consider using div64_long instead.
arch/x86/kernel/apic/apic.c:742:2-8: WARNING: do_div() does a 64-by-32
division, please consider using div64_long instead.
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20240318104721.117741-3-thorsten.blum%40toblux.com
Diffstat (limited to 'scripts/gdb/linux/mm.py')
0 files changed, 0 insertions, 0 deletions