[PATCH 3/5] drm/tinydrm/mi0283qt: Clarify error message
David Lechner
david at lechnology.com
Fri Jan 5 18:46:24 UTC 2018
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 at tronnes.org>
> ---
> 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 at lechnology.com>
More information about the dri-devel
mailing list