From 562894f0dc310f658284863ff329906e7737a0a0 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Tue, 14 Apr 2020 20:30:48 +0000 Subject: Centralize compatability translation macros. Copy the CP, PTRIN, etc macros from freebsd32.h into a sys/abi_compat.h and replace existing definitation with includes where required. This eliminates duplicate code and allows Linux and FreeBSD compatability headers to be included in the same files. Input from: cem, jhb Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24275 --- sys/dev/ipmi/ipmi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'sys/dev/ipmi') diff --git a/sys/dev/ipmi/ipmi.c b/sys/dev/ipmi/ipmi.c index da44e70dbcbc..25077500d835 100644 --- a/sys/dev/ipmi/ipmi.c +++ b/sys/dev/ipmi/ipmi.c @@ -55,6 +55,10 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef IPMICTL_SEND_COMMAND_32 +#include +#endif + /* * Driver request structures are allocated on the stack via alloca() to * avoid calling malloc(), especially for the watchdog handler. @@ -315,11 +319,6 @@ ipmi_handle_attn(struct ipmi_softc *sc) } #endif -#ifdef IPMICTL_SEND_COMMAND_32 -#define PTRIN(p) ((void *)(uintptr_t)(p)) -#define PTROUT(p) ((uintptr_t)(p)) -#endif - static int ipmi_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int flags, struct thread *td) -- cgit v1.3