x86: Alter nmi_callback_t typedef

Drop paranthesis and function pointer on nmi_callback_t typedef.

Make it more inline with how x86 maintainers want function
typedefs to be.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Konrad Rzeszutek Wilk committed 2016-04-08 18:48:30 -04:00
1 parent 75f9455e92
commit 3dac42fef8
3 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -192,7 +192,7 @@ static void __init apply_alternatives(struct alt_instr *start, struct alt_instr
void __init alternative_instructions(void) void __init alternative_instructions(void)
{ {
nmi_callback_t saved_nmi_callback; nmi_callback_t *saved_nmi_callback;
arch_init_ideal_nops(); arch_init_ideal_nops();
+3 -3
View File
@@ -3611,7 +3611,7 @@ static int dummy_nmi_callback(const struct cpu_user_regs *regs, int cpu)
return 0; return 0;
} }
static nmi_callback_t nmi_callback = dummy_nmi_callback; static nmi_callback_t *nmi_callback = dummy_nmi_callback;
void do_nmi(const struct cpu_user_regs *regs) void do_nmi(const struct cpu_user_regs *regs)
{ {
@@ -3641,9 +3641,9 @@ void do_nmi(const struct cpu_user_regs *regs)
} }
} }
nmi_callback_t set_nmi_callback(nmi_callback_t callback) nmi_callback_t *set_nmi_callback(nmi_callback_t *callback)
{ {
nmi_callback_t old_nmi_callback = nmi_callback; nmi_callback_t *old_nmi_callback = nmi_callback;
nmi_callback = callback; nmi_callback = callback;
+2 -2
View File
@@ -12,7 +12,7 @@ extern bool_t opt_watchdog;
/* Watchdog force parameter from the command line */ /* Watchdog force parameter from the command line */
extern bool_t watchdog_force; extern bool_t watchdog_force;
typedef int (*nmi_callback_t)(const struct cpu_user_regs *regs, int cpu); typedef int nmi_callback_t(const struct cpu_user_regs *regs, int cpu);
/** /**
* set_nmi_callback * set_nmi_callback
@@ -20,7 +20,7 @@ typedef int (*nmi_callback_t)(const struct cpu_user_regs *regs, int cpu);
* Set a handler for an NMI. Only one handler may be * Set a handler for an NMI. Only one handler may be
* set. Return the old nmi callback handler. * set. Return the old nmi callback handler.
*/ */
nmi_callback_t set_nmi_callback(nmi_callback_t callback); nmi_callback_t *set_nmi_callback(nmi_callback_t *callback);
/** /**
* unset_nmi_callback * unset_nmi_callback
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.