Message ID | 1460000983-28170-7-git-send-email-konrad.wilk@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Konrad Rzeszutek Wilk writes ("[PATCH v6 06/24] 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. I have no opinion on this patch. I guess it was CC'd to me due to some quirk of the way MAINTAINERS works. IMO it needs an ack from the x86 maintainers (only). Ian.
On 07/04/16 04:49, Konrad Rzeszutek Wilk wrote: > 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> I don't see the point, but this doesn't introduce any problems. Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
On Thu, Apr 07, 2016 at 09:13:58PM +0100, Andrew Cooper wrote: > On 07/04/16 04:49, Konrad Rzeszutek Wilk wrote: > > 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> > > I don't see the point, but this doesn't introduce any problems. Jan (on my patches) noticied that I had added a lot of function pointers on the typedefs and wanted it to be dropped. Since I am going to use one of these typedefs I figured I would preempt his keenly sense and have the typedef already worked out. > > Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> Oh, and it can go in now!
diff --git a/xen/arch/x86/alternative.c b/xen/arch/x86/alternative.c index 26ad2b9..f735ff8 100644 --- a/xen/arch/x86/alternative.c +++ b/xen/arch/x86/alternative.c @@ -192,7 +192,7 @@ static void __init apply_alternatives(struct alt_instr *start, struct alt_instr void __init alternative_instructions(void) { - nmi_callback_t saved_nmi_callback; + nmi_callback_t *saved_nmi_callback; arch_init_ideal_nops(); diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index ac52ede..93edf9c 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -3523,7 +3523,7 @@ static int dummy_nmi_callback(const struct cpu_user_regs *regs, int cpu) 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) { @@ -3553,9 +3553,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; diff --git a/xen/include/asm-x86/nmi.h b/xen/include/asm-x86/nmi.h index 2c92db9..fb0f57a 100644 --- a/xen/include/asm-x86/nmi.h +++ b/xen/include/asm-x86/nmi.h @@ -12,7 +12,7 @@ extern bool_t opt_watchdog; /* Watchdog force parameter from the command line */ 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 @@ -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. 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
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> --- Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Jan Beulich <jbeulich@suse.com> Cc: Keir Fraser <keir@xen.org> Cc: Tim Deegan <tim@xen.org> v6: New in patchset. --- --- xen/arch/x86/alternative.c | 2 +- xen/arch/x86/traps.c | 6 +++--- xen/include/asm-x86/nmi.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)