[PATCH 2/3] omap: Few fixes to build with musl

Tony Lindgren tony at atomide.com
Mon Jan 27 04:00:49 UTC 2020


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: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Cc: Matthijs van Duin <matthijsvanduin at gmail.com>
Cc: Merlijn Wajer <merlijn at wizzup.org>
Cc: Rob Clark <robdclark at chromium.org>
Cc: Sebastian Reichel <sre at kernel.org>
Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
Signed-off-by: Tony Lindgren <tony at 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.24.1


More information about the xorg-devel mailing list