Re: [PATCH 3/5] drm/tinydrm/mi0283qt: Clarify error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/05/2018 10:55 AM, Noralf Trønnes wrote:
Make it clear that the printed value is the error and not the command
value itself.

Signed-off-by: Noralf Trønnes <noralf@xxxxxxxxxxx>
---
  drivers/gpu/drm/tinydrm/mi0283qt.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/tinydrm/mi0283qt.c b/drivers/gpu/drm/tinydrm/mi0283qt.c
index c69a4d958f24..5994140f1e1e 100644
--- a/drivers/gpu/drm/tinydrm/mi0283qt.c
+++ b/drivers/gpu/drm/tinydrm/mi0283qt.c
@@ -58,7 +58,7 @@ static int mi0283qt_init(struct mipi_dbi *mipi)
ret = regulator_enable(mipi->regulator);
  	if (ret) {
-		DRM_DEV_ERROR(dev, "Failed to enable regulator %d\n", ret);
+		DRM_DEV_ERROR(dev, "Failed to enable regulator: %d\n", ret);

It is more common to use parenthesis around the error value, so that would be
more clear to me.

 +		DRM_DEV_ERROR(dev, "Failed to enable regulator (%d)\n", ret);

  		return ret;
  	}
@@ -69,7 +69,7 @@ static int mi0283qt_init(struct mipi_dbi *mipi)
  	mipi_dbi_hw_reset(mipi);
  	ret = mipi_dbi_command(mipi, MIPI_DCS_SOFT_RESET);
  	if (ret) {
-		DRM_DEV_ERROR(dev, "Error sending command %d\n", ret);
+		DRM_DEV_ERROR(dev, "Error sending command: %d\n", ret);

ditto

  		regulator_disable(mipi->regulator);
  		return ret;
  	}


With that change:

Reviewed-by: David Lechner <david@xxxxxxxxxxxxxx>
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux