From patchwork Fri Sep 29 07:48: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: 9979255 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 CAAC06034B for ; Sat, 30 Sep 2017 08:23:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B53C729509 for ; Sat, 30 Sep 2017 08:23:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A8D992989D; Sat, 30 Sep 2017 08:23:13 +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 2DA1329509 for ; Sat, 30 Sep 2017 08:23:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 598766E1BE; Sat, 30 Sep 2017 08:23:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 255D76EA6D for ; Fri, 29 Sep 2017 07:50:45 +0000 (UTC) Received: by mail-pg0-x244.google.com with SMTP id j16so782920pga.2 for ; Fri, 29 Sep 2017 00:50:45 -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=FW2MAOf4fKQxNuiszKt3k96vC6UiTkx4l7Yu8fpmlzY=; b=TPQy8GX34T9cYzq3Cp3TpEw0mbFC4TBnstGPhIJvScdFivW7Y/v48SpcHZRv/t262b QwhKD6kD75q4UZHWqIl1xOoB8dH36GVJlIBs+CfQAM7a2MmeqtA62rX3vofLUg/6CxyR QvMR5AOnuvhYh8j76b33yyA6jTBd4I16Kgu2dKm5FUq204PJTzZxNOszsJ2seN9cb6pZ /gbKqMJDReHAclhrYMs/aSdaziT5aBAeM5BbeVJ+qbB8mtc2wJKFnx+qAjX2eFAy4Y7h J2O5Gbwi/nPsyZ3We10GEoPMaWU4934E2s2/+ZNAz15q9XuzS56Kt3+Cne7l8vzJORey aozA== 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=FW2MAOf4fKQxNuiszKt3k96vC6UiTkx4l7Yu8fpmlzY=; b=R4NrAnMVFw+MUgLU7FdzgRjhwty0+x5kGOuEnkZr+25mnZeVdPu/b3g/qLyuNvh3qU qb0RTahH4VLSMvj039Xwvmnon27na6aAqKZ60nLAbU2EsIBuj3hqeoQhJKbKJJg6+Twm ePnyihrjPnxXTGdo19Soas90GPV3AiwaZgPd2tgUh7h2dozkDGfrTKZNtZ4CaJjYaMEo US0NwLelkbTgqJRj8+gOEPC7SCC9ivtXjJPmODwB4jwA24RFwiRkGCN2rCa71B+P+Skl qhOzuSQUlSGWJ+D4pXOt/GN+gPJCQoYBOSHRPGIxRFWcRmVR9VR4N8nv3yg3CFIcCAh4 +3xA== X-Gm-Message-State: AHPjjUj1J/gufcuX+qipX5UYge4/YQ03yo76OFeCxl7KXX9LxTdPkFJu VfDhuw5v1fCHXvfIKcGA3Js= X-Google-Smtp-Source: AOwi7QCsH7arxlt1FoMl6he/7a45u2ItldoIAz0Uq5L0PkGOOEUkgoiVzMMiuiqBkomRWYRs3yyWsg== X-Received: by 10.98.247.21 with SMTP id h21mr6580849pfi.233.1506671445518; Fri, 29 Sep 2017 00:50:45 -0700 (PDT) Received: from harryPotter.iitr.ernet.in ([103.37.201.122]) by smtp.gmail.com with ESMTPSA id q136sm6001536pfq.10.2017.09.29.00.50.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Sep 2017 00:50:45 -0700 (PDT) From: Harsha Sharma To: noralf@tronnes.org Subject: [PATCH v2] drm/tinydrm: Replace dev_error with DRM_DEV_ERROR Date: Fri, 29 Sep 2017 13:18:38 +0530 Message-Id: <1506671318-5121-1-git-send-email-harshasharmaiitr@gmail.com> X-Mailer: git-send-email 1.9.1 X-Mailman-Approved-At: Sat, 30 Sep 2017 08:23:06 +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 v2: -Fix alignment issues drivers/gpu/drm/tinydrm/mi0283qt.c | 8 ++++---- drivers/gpu/drm/tinydrm/repaper.c | 26 +++++++++++++------------- drivers/gpu/drm/tinydrm/st7586.c | 6 +++--- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/tinydrm/mi0283qt.c b/drivers/gpu/drm/tinydrm/mi0283qt.c index 7e5bb7d..7dded50 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 30dc97b..bd152bb 100644 --- a/drivers/gpu/drm/tinydrm/repaper.c +++ b/drivers/gpu/drm/tinydrm/repaper.c @@ -473,7 +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", + DRM_DEV_ERROR(&epd->spi->dev, "Failed to get temperature (%d)\n", ret); return; } @@ -629,7 +629,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 +703,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 +725,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 +767,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 +779,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 +959,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 +967,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 +975,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 +983,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,7 +991,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", + DRM_DEV_ERROR(dev, "Failed to get thermal zone: %s\n", thermal_zone); return PTR_ERR(epd->thermal); } @@ -1033,7 +1033,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 b439956..14361a5 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); }