Commit 0816a653 authored by Mika Kukkonen's avatar Mika Kukkonen Committed by Linus Torvalds

[PATCH] sparse: fix ugly include/linux/efi.h typedef

efi.h declares a function type, and then uses that as an argument to
another function, and expects the compiler to magically demote the
function to a function pointer.

Even a gcc person (rth) was surprised that this was legal, and it
doesn't match any other use of a function pointer in the kernel, and
sparse doesn't like the implicit type-conversion.

So make the type sane in the first place, instead of depending on
a very weird corner case of the C language.
parent 7df8818d
...@@ -108,7 +108,7 @@ typedef struct { ...@@ -108,7 +108,7 @@ typedef struct {
#endif #endif
} efi_memory_desc_t; } efi_memory_desc_t;
typedef int efi_freemem_callback_t (unsigned long start, unsigned long end, void *arg); typedef int (*efi_freemem_callback_t) (unsigned long start, unsigned long end, void *arg);
/* /*
* Types and defines for Time Services * Types and defines for Time Services
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment