lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190131192619.9763-13-sam@ravnborg.org>
Date:   Thu, 31 Jan 2019 20:26:12 +0100
From:   Sam Ravnborg <sam@...nborg.org>
To:     Thierry Reding <thierry.reding@...il.com>,
        dri-devel@...ts.freedesktop.org
Cc:     Daniel Vetter <daniel@...ll.ch>, David Airlie <airlied@...ux.ie>,
        Linus Walleij <linus.walleij@...aro.org>,
        Stefan Mavrodiev <stefan@...mex.com>,
        linux-kernel@...r.kernel.org, Sam Ravnborg <sam@...nborg.org>
Subject: [PATCH v1 12/19] drm/panel: olimex: use DRM_DEV*

Introduce use of DRM_DEV* for logging.
This makes logging in the drm subsystem more consistent.

Signed-off-by: Sam Ravnborg <sam@...nborg.org>
Cc: Stefan Mavrodiev <stefan@...mex.com>
Cc: Thierry Reding <thierry.reding@...il.com>
Cc: David Airlie <airlied@...ux.ie>
Cc: Daniel Vetter <daniel@...ll.ch>
---
 drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c | 26 +++++++++++++---------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c b/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c
index c8704be9caa3..efb223b35594 100644
--- a/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c
+++ b/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c
@@ -18,6 +18,7 @@
 #include <drm/drm_device.h>
 #include <drm/drm_modes.h>
 #include <drm/drm_panel.h>
+#include <drm/drm_print.h>
 
 #include <video/videomode.h>
 #include <video/display_timing.h>
@@ -157,10 +158,11 @@ static int lcd_olinuxino_get_modes(struct drm_panel *panel)
 
 		mode = drm_mode_create(drm);
 		if (!mode) {
-			dev_err(drm->dev, "failed to add mode %ux%u@%u\n",
-				lcd_mode->hactive,
-				lcd_mode->vactive,
-				lcd_mode->refresh);
+			DRM_DEV_ERROR(drm->dev,
+				      "failed to add mode %ux%u@%u\n",
+				      lcd_mode->hactive,
+				      lcd_mode->vactive,
+				      lcd_mode->refresh);
 				continue;
 		}
 
@@ -242,7 +244,8 @@ static int lcd_olinuxino_probe(struct i2c_client *client,
 						    (u8 *)&lcd->eeprom + i);
 		mutex_unlock(&lcd->mutex);
 		if (ret < 0) {
-			dev_err(dev, "error reading from device at %02x\n", i);
+			DRM_DEV_ERROR(dev,
+				      "error reading from device at %02x\n", i);
 			return ret;
 		}
 	}
@@ -250,20 +253,21 @@ static int lcd_olinuxino_probe(struct i2c_client *client,
 	/* Check configuration checksum */
 	checksum = ~crc32(~0, (u8 *)&lcd->eeprom, 252);
 	if (checksum != lcd->eeprom.checksum) {
-		dev_err(dev, "configuration checksum does not match!\n");
+		DRM_DEV_ERROR(dev,
+			      "configuration checksum does not match!\n");
 		return -EINVAL;
 	}
 
 	/* Check magic header */
 	if (lcd->eeprom.header != LCD_OLINUXINO_HEADER_MAGIC) {
-		dev_err(dev, "magic header does not match\n");
+		DRM_DEV_ERROR(dev, "magic header does not match\n");
 		return -EINVAL;
 	}
 
-	dev_info(dev, "Detected %s, Rev. %s, Serial: %08x\n",
-		 lcd->eeprom.info.name,
-		 lcd->eeprom.revision,
-		 lcd->eeprom.serial);
+	DRM_DEV_INFO(dev, "Detected %s, Rev. %s, Serial: %08x\n",
+		     lcd->eeprom.info.name,
+		     lcd->eeprom.revision,
+		     lcd->eeprom.serial);
 
 	/*
 	 * The eeprom can hold up to 4 modes.
-- 
2.12.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ