Few fixes to allow building xf86-video-omap with musl: 1. We are trying to print info about a NULL chipset which cause warnings, let's just remove that
2. We get warnings about duplicate debug macros as we already have them also in omap_driver.h, let's just remove the dpulicates 3. Use standard __func__ instead of __FUNCTION__ Cc: Ivaylo Dimitrov <ivo.g.dimitrov...@gmail.com> Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Cc: Matthijs van Duin <matthijsvand...@gmail.com> Cc: Merlijn Wajer <merl...@wizzup.org> Cc: Rob Clark <robdcl...@chromium.org> Cc: Sebastian Reichel <s...@kernel.org> Cc: Tomi Valkeinen <tomi.valkei...@ti.com> Signed-off-by: Tony Lindgren <t...@atomide.com> --- src/omap_driver.c | 2 +- src/omap_driver.h | 6 +++--- src/omap_util.h | 30 ------------------------------ 3 files changed, 4 insertions(+), 34 deletions(-) diff --git a/src/omap_driver.c b/src/omap_driver.c --- a/src/omap_driver.c +++ b/src/omap_driver.c @@ -542,7 +542,7 @@ OMAPPreInit(ScrnInfoPtr pScrn, int flags) } if (!pScrn->chipset) { - ERROR_MSG("Unknown chipset: %s", pScrn->chipset); + ERROR_MSG("Unknown chipset"); goto fail; } diff --git a/src/omap_driver.h b/src/omap_driver.h --- 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 --- 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 -- 2.25.0 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel