Skip to contentSkip to conversation

drm: two more (drm_)printk() wrapper macros (fixup)

PATCH New Dave Gordon 2 participants 2 messages Sep 7, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v6 1/1 drm: two more (drm_)printk() wrapper macros (fixup)

Between v2 and v3 of this patch,
c4e68a583202 ("drm: Introduce DRM_DEV_* log messages")
was introduced upstream, and this was the reason for the rewrite as v3. Unfortunately a maintainer pushed the earlier version to drm-intel-next
30b0da8d556e ("drm: extra printk() wrapper macros")
creating a conflict with upstream. This patch is equivalent to reverting v2 and then correctly applying v3. AFAICT, it could be squashed into
30b0da8d556e ("drm: extra printk() wrapper macros")
or can be left as a subsequent correction.

Original commentary:
We had only DRM_INFO() and DRM_ERROR(), whereas the underlying printk() provides several other useful intermediate levels such as NOTICE and WARNING. So this patch fills out the set by providing simple macros for the additional levels. We don't provide _DEV_ or _ONCE or RATELIMITED versions yet as it seems unlikely that they'll be as useful.

v2:
Fix whitespace, missing ## (Eric Engestrom)
v3:
Much simplified after underlying functions were reworked.
v6:
Fixup, effectively revert v2 and apply v3

---
 include/drm/drmP.h | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)
include/drm/drmP.h +4 -15
index f62f6e3..cd52624 100644
@@ -168,21 +168,12 @@ void drm_printk(const char *level, unsigned int category,
 /** \name Macros to make printk easier */
 /*@{*/
 
-#define _DRM_PRINTK(once, level, fmt, ...)				\
-	do {								\
-		printk##once(KERN_##level "[" DRM_NAME "] " fmt,	\
-			     ##__VA_ARGS__);				\
-	} while (0)
-
+#define DRM_INFO(fmt, ...)						\
+	drm_printk(KERN_INFO, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__)
 #define DRM_NOTE(fmt, ...)						\
-	_DRM_PRINTK(, NOTICE, fmt, ##__VA_ARGS__)
+	drm_printk(KERN_NOTICE, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__)
 #define DRM_WARN(fmt, ...)						\
-	_DRM_PRINTK(, WARNING, fmt, ##__VA_ARGS__)
-
-#define DRM_NOTE_ONCE(fmt, ...)						\
-	_DRM_PRINTK(_once, NOTICE, fmt, ##__VA_ARGS__)
-#define DRM_WARN_ONCE(fmt, ...)						\
-	_DRM_PRINTK(_once, WARNING, fmt, ##__VA_ARGS__)
+	drm_printk(KERN_WARNING, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__)
 
 /**
  * Error output.
@@ -218,8 +209,6 @@ void drm_printk(const char *level, unsigned int category,
 #define DRM_DEV_INFO(dev, fmt, ...)					\
 	drm_dev_printk(dev, KERN_INFO, DRM_UT_NONE, __func__, "", fmt,	\
 		       ##__VA_ARGS__)
-#define DRM_INFO(fmt, ...)						\
-	drm_printk(KERN_INFO, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__)
 
 #define DRM_DEV_INFO_ONCE(dev, fmt, ...)				\
 ({									\
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Fi.CI.BAT: failure for drm: two more (drm_)printk() wrapper macros (fixup)

== Series Details ==

== Series Details ==

Series: drm: two more (drm_)printk() wrapper macros (fixup)
URL : https://patchwork.freedesktop.org/series/12130/
State : failure

== Summary ==

Series 12130v1 drm: two more (drm_)printk() wrapper macros (fixup)
http://patchwork.freedesktop.org/api/1.0/series/12130/revisions/1/mbox/

Test kms_pipe_crc_basic:

        Subgroup suspend-read-crc-pipe-c:
                pass       -> INCOMPLETE (fi-hsw-4770k)
fi-bdw-5557u     total:252  pass:233  dwarn:2   dfail:1   fail:1   skip:15 
fi-bsw-n3050     total:252  pass:203  dwarn:1   dfail:1   fail:1   skip:46 
fi-byt-n2820     total:252  pass:206  dwarn:2   dfail:1   fail:2   skip:41 
fi-hsw-4770k     total:216  pass:192  dwarn:2   dfail:1   fail:0   skip:20 
fi-hsw-4770r     total:252  pass:222  dwarn:2   dfail:1   fail:1   skip:26 
fi-ilk-650       total:252  pass:179  dwarn:2   dfail:1   fail:3   skip:67 
fi-ivb-3520m     total:252  pass:217  dwarn:2   dfail:1   fail:1   skip:31 
fi-ivb-3770      total:252  pass:217  dwarn:2   dfail:1   fail:1   skip:31 
fi-skl-6260u     total:252  pass:234  dwarn:2   dfail:1   fail:1   skip:14 
fi-skl-6700k     total:252  pass:219  dwarn:3   dfail:1   fail:1   skip:28 
fi-snb-2520m     total:252  pass:205  dwarn:1   dfail:1   fail:2   skip:43 
fi-snb-2600      total:252  pass:205  dwarn:2   dfail:1   fail:1   skip:43 

Results at /archive/results/CI_IGT_test/Patchwork_2484/

7f8bc957b96e7e5f4923a8d0eed2875869073c2a drm-intel-nightly: 2016y-09m-07d-14h-47m-42s UTC integration manifest d11e096 drm: two more (drm_)printk() wrapper macros (fixup)

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx