]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Dec 2017 11:59:01 +0000 (12:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Dec 2017 11:59:01 +0000 (12:59 +0100)
added patches:
drm-extra-printk-wrapper-macros.patch

queue-4.4/drm-extra-printk-wrapper-macros.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/drm-extra-printk-wrapper-macros.patch b/queue-4.4/drm-extra-printk-wrapper-macros.patch
new file mode 100644 (file)
index 0000000..d41a348
--- /dev/null
@@ -0,0 +1,74 @@
+From 30b0da8d556e65ff935a56cd82c05ba0516d3e4a Mon Sep 17 00:00:00 2001
+From: Dave Gordon <david.s.gordon@intel.com>
+Date: Thu, 18 Aug 2016 18:17:22 +0100
+Subject: drm: extra printk() wrapper macros
+
+From: Dave Gordon <david.s.gordon@intel.com>
+
+commit 30b0da8d556e65ff935a56cd82c05ba0516d3e4a upstream.
+
+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 both regular and
+once-only macros for each of the levels INFO, NOTICE, and WARNING, using
+a common underlying macro that does all the token-pasting.
+
+DRM_ERROR is unchanged, as it's not just a printk wrapper.
+
+v2:
+    Fix whitespace, missing ## (Eric Engestrom)
+
+Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
+Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
+Cc: dri-devel@lists.freedesktop.org
+Acked-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/drm/drmP.h |   26 ++++++++++++++++++++------
+ 1 file changed, 20 insertions(+), 6 deletions(-)
+
+--- a/include/drm/drmP.h
++++ b/include/drm/drmP.h
+@@ -158,6 +158,26 @@ void drm_err(const char *format, ...);
+ /** \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(, INFO, fmt, ##__VA_ARGS__)
++#define DRM_NOTE(fmt, ...)                                            \
++      _DRM_PRINTK(, NOTICE, fmt, ##__VA_ARGS__)
++#define DRM_WARN(fmt, ...)                                            \
++      _DRM_PRINTK(, WARNING, fmt, ##__VA_ARGS__)
++
++#define DRM_INFO_ONCE(fmt, ...)                                               \
++      _DRM_PRINTK(_once, INFO, 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__)
++
+ /**
+  * Error output.
+  *
+@@ -183,12 +203,6 @@ void drm_err(const char *format, ...);
+               drm_err(fmt, ##__VA_ARGS__);                            \
+ })
+-#define DRM_INFO(fmt, ...)                            \
+-      printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
+-
+-#define DRM_INFO_ONCE(fmt, ...)                               \
+-      printk_once(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
+-
+ /**
+  * Debug output.
+  *
index f19b2bf41bcea1ccb12d5fd3f6b8406bd0ca61b9..4cd61cbf7f07c7de67e48225053defeccfa05221 100644 (file)
@@ -36,3 +36,4 @@ scsi-storvsc-workaround-for-virtual-dvd-scsi-version.patch
 thp-reduce-indentation-level-in-change_huge_pmd.patch
 thp-fix-madv_dontneed-vs.-numa-balancing-race.patch
 mm-drop-unused-pmdp_huge_get_and_clear_notify.patch
+drm-extra-printk-wrapper-macros.patch