diff options
author | Tony Lindgren <tony@atomide.com> | 2020-02-04 10:33:59 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-08-21 12:35:51 -0700 |
commit | f5928392e174341264df9da275ff5b3e35e14730 (patch) | |
tree | 2f56fdc01e0a1da3f37585bd0bc8afb0b8f300d2 | |
parent | 2cbb5ddc525b93be221e52b2eade77861408a6db (diff) |
omap: Few fixes to build with musl
Few fixes to allow building xf86-video-omap with musl:
1. We get warnings about duplicate debug macros as we already have them
also in omap_driver.h, let's just remove the dpulicates
2. Use standard __func__ instead of __FUNCTION__
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | src/omap_driver.h | 6 | ||||
-rw-r--r-- | src/omap_util.h | 30 |
2 files changed, 3 insertions, 33 deletions
diff --git a/src/omap_driver.h b/src/omap_driver.h index 8277e25..d518aaa 100644 --- a/src/omap_driver.h +++ b/src/omap_driver.h @@ -84,13 +84,13 @@ extern _X_EXPORT Bool omapDebug; */ #define TRACE_ENTER() \ do { if (omapDebug) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%s:%d: Entering\n",\ - __FUNCTION__, __LINE__); } while (0) + __func__, __LINE__); } while (0) #define TRACE_EXIT() \ do { if (omapDebug) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%s:%d: Exiting\n",\ - __FUNCTION__, __LINE__); } while (0) + __func__, __LINE__); } while (0) #define DEBUG_MSG(fmt, ...) \ do { if (omapDebug) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%s:%d " fmt "\n",\ - __FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0) + __func__, __LINE__, ##__VA_ARGS__); } while (0) #define INFO_MSG(fmt, ...) \ do { xf86DrvMsg(pScrn->scrnIndex, X_INFO, fmt "\n",\ ##__VA_ARGS__); } while (0) diff --git a/src/omap_util.h b/src/omap_util.h index 1e19f67..9fa94a6 100644 --- a/src/omap_util.h +++ b/src/omap_util.h @@ -40,36 +40,6 @@ */ extern _X_EXPORT Bool omapDebug; - -/* Various logging/debug macros for use in the X driver and the external - * sub-modules: - */ -#define TRACE_ENTER() \ - do { if (omapDebug) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%s:%d: Entering\n",\ - __FUNCTION__, __LINE__); } while (0) -#define TRACE_EXIT() \ - do { if (omapDebug) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%s:%d: Exiting\n",\ - __FUNCTION__, __LINE__); } while (0) -#define DEBUG_MSG(fmt, ...) \ - do { if (omapDebug) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%s:%d " fmt "\n",\ - __FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0) -#define INFO_MSG(fmt, ...) \ - do { xf86DrvMsg(pScrn->scrnIndex, X_INFO, fmt "\n",\ - ##__VA_ARGS__); } while (0) -#define CONFIG_MSG(fmt, ...) \ - do { xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, fmt "\n",\ - ##__VA_ARGS__); } while (0) -#define WARNING_MSG(fmt, ...) \ - do { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "WARNING: " fmt "\n",\ - ##__VA_ARGS__); } while (0) -#define ERROR_MSG(fmt, ...) \ - do { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "ERROR: " fmt "\n",\ - ##__VA_ARGS__); } while (0) -#define EARLY_ERROR_MSG(fmt, ...) \ - do { xf86Msg(X_ERROR, "ERROR: " fmt "\n",\ - ##__VA_ARGS__); } while (0) - - extern unsigned int OMAPCalculateStride(unsigned int fbWidth, unsigned int bitsPerPixel); extern unsigned int |