Skip to content

Commit

Permalink
coverity: fix printk()'s argument types
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
Reported-by: Coverity Scan (CID: 421500, 420271, 42070, 420269)
  • Loading branch information
wipawel committed Nov 6, 2023
1 parent ecb0d1f commit b2fef3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions arch/x86/boot/multiboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ void init_multiboot(unsigned long *addr, const char **cmdline) {
case MULTIBOOT2_TAG_TYPE_EFI32: {
struct multiboot2_tag_efi32 *efi32 = (struct multiboot2_tag_efi32 *) tag;

printk("[multiboot2] EFI32 Pointer: 0x%p\n", efi32->pointer);
printk("[multiboot2] EFI32 Pointer: 0x%x\n", efi32->pointer);
} break;

case MULTIBOOT2_TAG_TYPE_EFI64: {
struct multiboot2_tag_efi64 *efi64 = (struct multiboot2_tag_efi64 *) tag;

printk("[multiboot2] EFI64 Pointer: 0x%p\n", efi64->pointer);
printk("[multiboot2] EFI64 Pointer: 0x%lx\n", efi64->pointer);
} break;

case MULTIBOOT2_TAG_TYPE_ACPI_OLD: {
Expand All @@ -170,7 +170,7 @@ void init_multiboot(unsigned long *addr, const char **cmdline) {
struct multiboot2_tag_load_base_addr *addr =
(struct multiboot2_tag_load_base_addr *) tag;

printk("[multiboot2] Load base address: 0x%p\n", addr->load_base_addr);
printk("[multiboot2] Load base address: 0x%x\n", addr->load_base_addr);
} break;

default:
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/extables.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
void init_extables(void) {
for (extable_entry_t *cur = __start_extables; cur < __stop_extables; ++cur) {
if (!cur->fixup && !cur->cb)
warning("extable entry #%d for addr 0x%lx lacks fixup and callback!",
warning("extable entry #%lu for addr 0x%lx lacks fixup and callback!",
cur - __start_extables, cur->fault_addr);
}
}

0 comments on commit b2fef3a

Please sign in to comment.