From patchwork Fri Oct 6 22:17:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: harsha sharma X-Patchwork-Id: 9991861 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0238E60231 for ; Sun, 8 Oct 2017 15:43:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA13B285D2 for ; Sun, 8 Oct 2017 15:43:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEFCA285E0; Sun, 8 Oct 2017 15:43:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 17CEE285D2 for ; Sun, 8 Oct 2017 15:43:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D2DE26E2D9; Sun, 8 Oct 2017 15:42:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id A656A6E9ED for ; Fri, 6 Oct 2017 22:19:51 +0000 (UTC) Received: by mail-pg0-x243.google.com with SMTP id b11so10422007pgn.0 for ; Fri, 06 Oct 2017 15:19:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=1c3SWui+34B5lxv8RJsvVwwTVw01KSXWDzZRa0dWYpc=; b=uSrekRQF4maT95hCpKzujlF4kTqi8naU8ssL/vTKVc0JVJujQSLyOZx965Sc0O/n7m Lo4JCyTOeXDO5z/Eo2EPcJd4pOoZdjmUx2/eXtkb3Dxc3e4OY3NPCdNAYzhWiHSADbrl BQUpYwLdO9aZ9DgLf+gKip8t88OT6F+YGmHLqcEcHagkS4iNzydxP1KsuiFoIrghEzlq Ym/QwJW2fYdtUMvMLG6Lu0EAICEFEtQKFNhYZoAox+NNYvaCTBQIsaPeZmuNeRgdrgTn iDqZZauNx1YjkL7iBArWTi6lJgHgJvC3qnAdNKhngwgkvYxOf9MLTpz8GTQZGepQ0Pgs 4tqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1c3SWui+34B5lxv8RJsvVwwTVw01KSXWDzZRa0dWYpc=; b=J+7mA1P96OO2yJ8vdN+Q5ly6gv/kvielftBtaPv1dG1QCvLw/ldhmqbwwBAY5AnSrO gsebbQCTZNbTbvChz1rn4BcTh8kmBxXxjW/oS1B/RzYQJbUCdmZ8E4dkQ/wFMVYRLKDQ uOE14IK6+/y9GajUkFyEKBuJbTrVeOeqjaG5yvXmKtis/Mf5zBhZiY7euiXgllX1O00C shSMPFJ9mkRvNaxlF1bsAXZBUXzCPSs7NsCo5yR6U5Qc+MhA9kRkivPybZhmTDLtR0bF X1/qE1vXnSeEbA43KvFB3jQ1A40qpSUqDmdlM+TVkVgMPhQG4UxLHw/VPKAUtUl7r4ek Yyxg== X-Gm-Message-State: AMCzsaVdBGmS3xH18r9P1AmOiKKr/aBo6FvfBIYu6QF3Mz4/Tia5wHmW 4NAcjvd7S1OMnpvvcQD6u3k= X-Google-Smtp-Source: AOwi7QBTka2KQ8N4I85EkF83CdZCP/ifYHWp8qzvPSorkbkqlvmoZ58LzetwvXPhHOnMwNbbKDKMYw== X-Received: by 10.98.40.74 with SMTP id o71mr3472530pfo.326.1507328391038; Fri, 06 Oct 2017 15:19:51 -0700 (PDT) Received: from localhost.localdomain ([103.37.201.27]) by smtp.gmail.com with ESMTPSA id n2sm3790913pgs.89.2017.10.06.15.19.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Oct 2017 15:19:50 -0700 (PDT) From: Harsha Sharma To: noralf@tronnes.org Subject: [PATCH v3] drm/tinydrm: Replace dev_error with DRM_DEV_ERROR Date: Sat, 7 Oct 2017 03:47:38 +0530 Message-Id: <20171006221738.30200-1-harshasharmaiitr@gmail.com> X-Mailer: git-send-email 2.11.0 X-Mailman-Approved-At: Sun, 08 Oct 2017 15:42:41 +0000 Cc: outreachy-kernel@googlegroups.com, Harsha Sharma , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Convert instances of dev_error to DRM_DEV_ERROR as we have DRM_DEV_ERROR variants of drm print macros. Signed-off-by: Harsha Sharma --- Changes in v3: -Solve merge conflicts Changes in v2: -Fix alignment issues drivers/gpu/drm/tinydrm/mi0283qt.c | 8 ++++---- drivers/gpu/drm/tinydrm/repaper.c | 28 +++++++++++++--------------- drivers/gpu/drm/tinydrm/st7586.c | 6 +++--- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/tinydrm/mi0283qt.c b/drivers/gpu/drm/tinydrm/mi0283qt.c index 7e5bb7d6f655..7dded506ba8c 100644 --- a/drivers/gpu/drm/tinydrm/mi0283qt.c +++ b/drivers/gpu/drm/tinydrm/mi0283qt.c @@ -31,7 +31,7 @@ static int mi0283qt_init(struct mipi_dbi *mipi) ret = regulator_enable(mipi->regulator); if (ret) { - dev_err(dev, "Failed to enable regulator %d\n", ret); + DRM_DEV_ERROR(dev, "Failed to enable regulator %d\n", ret); return ret; } @@ -42,7 +42,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) { - dev_err(dev, "Error sending command %d\n", ret); + DRM_DEV_ERROR(dev, "Error sending command %d\n", ret); regulator_disable(mipi->regulator); return ret; } @@ -175,13 +175,13 @@ static int mi0283qt_probe(struct spi_device *spi) mipi->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(mipi->reset)) { - dev_err(dev, "Failed to get gpio 'reset'\n"); + DRM_DEV_ERROR(dev, "Failed to get gpio 'reset'\n"); return PTR_ERR(mipi->reset); } dc = devm_gpiod_get_optional(dev, "dc", GPIOD_OUT_LOW); if (IS_ERR(dc)) { - dev_err(dev, "Failed to get gpio 'dc'\n"); + DRM_DEV_ERROR(dev, "Failed to get gpio 'dc'\n"); return PTR_ERR(dc); } diff --git a/drivers/gpu/drm/tinydrm/repaper.c b/drivers/gpu/drm/tinydrm/repaper.c index 30dc97b3ff21..028d428d4ab9 100644 --- a/drivers/gpu/drm/tinydrm/repaper.c +++ b/drivers/gpu/drm/tinydrm/repaper.c @@ -473,8 +473,7 @@ static void repaper_get_temperature(struct repaper_epd *epd) ret = thermal_zone_get_temp(epd->thermal, &temperature); if (ret) { - dev_err(&epd->spi->dev, "Failed to get temperature (%d)\n", - ret); + DRM_DEV_ERROR(&epd->spi->dev, "Failed to get temperature (%d)\n", ret); return; } @@ -629,7 +628,7 @@ static int repaper_fb_dirty(struct drm_framebuffer *fb, mutex_unlock(&tdev->dirty_lock); if (ret) - dev_err(fb->dev->dev, "Failed to update display (%d)\n", ret); + DRM_DEV_ERROR(fb->dev->dev, "Failed to update display (%d)\n", ret); kfree(buf); return ret; @@ -703,7 +702,7 @@ static void repaper_pipe_enable(struct drm_simple_display_pipe *pipe, } if (!i) { - dev_err(dev, "timeout waiting for panel to become ready.\n"); + DRM_DEV_ERROR(dev, "timeout waiting for panel to become ready.\n"); power_off(epd); return; } @@ -725,9 +724,9 @@ static void repaper_pipe_enable(struct drm_simple_display_pipe *pipe, ret = repaper_read_val(spi, 0x0f); if (ret < 0 || !(ret & 0x80)) { if (ret < 0) - dev_err(dev, "failed to read chip (%d)\n", ret); + DRM_DEV_ERROR(dev, "failed to read chip (%d)\n", ret); else - dev_err(dev, "panel is reported broken\n"); + DRM_DEV_ERROR(dev, "panel is reported broken\n"); power_off(epd); return; } @@ -767,7 +766,7 @@ static void repaper_pipe_enable(struct drm_simple_display_pipe *pipe, /* check DC/DC */ ret = repaper_read_val(spi, 0x0f); if (ret < 0) { - dev_err(dev, "failed to read chip (%d)\n", ret); + DRM_DEV_ERROR(dev, "failed to read chip (%d)\n", ret); power_off(epd); return; } @@ -779,7 +778,7 @@ static void repaper_pipe_enable(struct drm_simple_display_pipe *pipe, } if (!dc_ok) { - dev_err(dev, "dc/dc failed\n"); + DRM_DEV_ERROR(dev, "dc/dc failed\n"); power_off(epd); return; } @@ -959,7 +958,7 @@ static int repaper_probe(struct spi_device *spi) if (IS_ERR(epd->panel_on)) { ret = PTR_ERR(epd->panel_on); if (ret != -EPROBE_DEFER) - dev_err(dev, "Failed to get gpio 'panel-on'\n"); + DRM_DEV_ERROR(dev, "Failed to get gpio 'panel-on'\n"); return ret; } @@ -967,7 +966,7 @@ static int repaper_probe(struct spi_device *spi) if (IS_ERR(epd->discharge)) { ret = PTR_ERR(epd->discharge); if (ret != -EPROBE_DEFER) - dev_err(dev, "Failed to get gpio 'discharge'\n"); + DRM_DEV_ERROR(dev, "Failed to get gpio 'discharge'\n"); return ret; } @@ -975,7 +974,7 @@ static int repaper_probe(struct spi_device *spi) if (IS_ERR(epd->reset)) { ret = PTR_ERR(epd->reset); if (ret != -EPROBE_DEFER) - dev_err(dev, "Failed to get gpio 'reset'\n"); + DRM_DEV_ERROR(dev, "Failed to get gpio 'reset'\n"); return ret; } @@ -983,7 +982,7 @@ static int repaper_probe(struct spi_device *spi) if (IS_ERR(epd->busy)) { ret = PTR_ERR(epd->busy); if (ret != -EPROBE_DEFER) - dev_err(dev, "Failed to get gpio 'busy'\n"); + DRM_DEV_ERROR(dev, "Failed to get gpio 'busy'\n"); return ret; } @@ -991,8 +990,7 @@ static int repaper_probe(struct spi_device *spi) &thermal_zone)) { epd->thermal = thermal_zone_get_zone_by_name(thermal_zone); if (IS_ERR(epd->thermal)) { - dev_err(dev, "Failed to get thermal zone: %s\n", - thermal_zone); + DRM_DEV_ERROR(dev, "Failed to get thermal zone: %s\n", thermal_zone); return PTR_ERR(epd->thermal); } } @@ -1033,7 +1031,7 @@ static int repaper_probe(struct spi_device *spi) if (IS_ERR(epd->border)) { ret = PTR_ERR(epd->border); if (ret != -EPROBE_DEFER) - dev_err(dev, "Failed to get gpio 'border'\n"); + DRM_DEV_ERROR(dev, "Failed to get gpio 'border'\n"); return ret; } diff --git a/drivers/gpu/drm/tinydrm/st7586.c b/drivers/gpu/drm/tinydrm/st7586.c index b439956a07f4..14361a5e9deb 100644 --- a/drivers/gpu/drm/tinydrm/st7586.c +++ b/drivers/gpu/drm/tinydrm/st7586.c @@ -187,7 +187,7 @@ static void st7586_pipe_enable(struct drm_simple_display_pipe *pipe, mipi_dbi_hw_reset(mipi); ret = mipi_dbi_command(mipi, ST7586_AUTO_READ_CTRL, 0x9f); if (ret) { - dev_err(dev, "Error sending command %d\n", ret); + DRM_DEV_ERROR(dev, "Error sending command %d\n", ret); return; } @@ -355,13 +355,13 @@ static int st7586_probe(struct spi_device *spi) mipi->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(mipi->reset)) { - dev_err(dev, "Failed to get gpio 'reset'\n"); + DRM_DEV_ERROR(dev, "Failed to get gpio 'reset'\n"); return PTR_ERR(mipi->reset); } a0 = devm_gpiod_get(dev, "a0", GPIOD_OUT_LOW); if (IS_ERR(a0)) { - dev_err(dev, "Failed to get gpio 'a0'\n"); + DRM_DEV_ERROR(dev, "Failed to get gpio 'a0'\n"); return PTR_ERR(a0); }