From: Suraj Upadhyay <usuraj35@gmail.com> To: srrj.967@gmail.com Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH 1/4] drm: mipi-dsi: Convert logging to drm_* functions. Date: Tue, 7 Jul 2020 21:58:48 +0530 [thread overview] Message-ID: <feeec2816debcf4105ac22af1661fd2d491d02b9.1594136880.git.usuraj35@gmail.com> (raw) In-Reply-To: <cover.1594136880.git.usuraj35@gmail.com> Convert logging errors from dev_err() to drm_err(). Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com> --- drivers/gpu/drm/drm_mipi_dsi.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index 07102d8da58f..5dd475e82995 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -34,6 +34,7 @@ #include <linux/slab.h> #include <drm/drm_dsc.h> +#include <drm/drm_print.h> #include <video/mipi_display.h> /** @@ -155,19 +156,18 @@ static int mipi_dsi_device_add(struct mipi_dsi_device *dsi) static struct mipi_dsi_device * of_mipi_dsi_device_add(struct mipi_dsi_host *host, struct device_node *node) { - struct device *dev = host->dev; struct mipi_dsi_device_info info = { }; int ret; u32 reg; if (of_modalias_node(node, info.type, sizeof(info.type)) < 0) { - dev_err(dev, "modalias failure on %pOF\n", node); + drm_err(host, "modalias failure on %pOF\n", node); return ERR_PTR(-EINVAL); } ret = of_property_read_u32(node, "reg", ®); if (ret) { - dev_err(dev, "device node %pOF has no valid reg property: %d\n", + drm_err(host, "device node %pOF has no valid reg property: %d\n", node, ret); return ERR_PTR(-EINVAL); } @@ -202,22 +202,21 @@ mipi_dsi_device_register_full(struct mipi_dsi_host *host, const struct mipi_dsi_device_info *info) { struct mipi_dsi_device *dsi; - struct device *dev = host->dev; int ret; if (!info) { - dev_err(dev, "invalid mipi_dsi_device_info pointer\n"); + drm_err(host, "invalid mipi_dsi_device_info pointer\n"); return ERR_PTR(-EINVAL); } if (info->channel > 3) { - dev_err(dev, "invalid virtual channel: %u\n", info->channel); + drm_err(host, "invalid virtual channel: %u\n", info->channel); return ERR_PTR(-EINVAL); } dsi = mipi_dsi_device_alloc(host); if (IS_ERR(dsi)) { - dev_err(dev, "failed to allocate DSI device %ld\n", + drm_err(host, "failed to allocate DSI device %ld\n", PTR_ERR(dsi)); return dsi; } @@ -228,7 +227,7 @@ mipi_dsi_device_register_full(struct mipi_dsi_host *host, ret = mipi_dsi_device_add(dsi); if (ret) { - dev_err(dev, "failed to add DSI device %d\n", ret); + drm_err(host, "failed to add DSI device %d\n", ret); kfree(dsi); return ERR_PTR(ret); } -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Suraj Upadhyay <usuraj35@gmail.com> To: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@linux.ie, daniel@ffwll.ch Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH 1/4] drm: mipi-dsi: Convert logging to drm_* functions. Date: Tue, 7 Jul 2020 22:05:23 +0530 [thread overview] Message-ID: <feeec2816debcf4105ac22af1661fd2d491d02b9.1594136880.git.usuraj35@gmail.com> (raw) Message-ID: <20200707163523.PwPcAv6_1v_SR3IAAo_qe5i0S3s1GQpj9eZ82v2LIWM@z> (raw) In-Reply-To: <cover.1594136880.git.usuraj35@gmail.com> [-- Attachment #1: Type: text/plain, Size: 2442 bytes --] Convert logging errors from dev_err() to drm_err(). Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com> --- drivers/gpu/drm/drm_mipi_dsi.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index 07102d8da58f..5dd475e82995 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -34,6 +34,7 @@ #include <linux/slab.h> #include <drm/drm_dsc.h> +#include <drm/drm_print.h> #include <video/mipi_display.h> /** @@ -155,19 +156,18 @@ static int mipi_dsi_device_add(struct mipi_dsi_device *dsi) static struct mipi_dsi_device * of_mipi_dsi_device_add(struct mipi_dsi_host *host, struct device_node *node) { - struct device *dev = host->dev; struct mipi_dsi_device_info info = { }; int ret; u32 reg; if (of_modalias_node(node, info.type, sizeof(info.type)) < 0) { - dev_err(dev, "modalias failure on %pOF\n", node); + drm_err(host, "modalias failure on %pOF\n", node); return ERR_PTR(-EINVAL); } ret = of_property_read_u32(node, "reg", ®); if (ret) { - dev_err(dev, "device node %pOF has no valid reg property: %d\n", + drm_err(host, "device node %pOF has no valid reg property: %d\n", node, ret); return ERR_PTR(-EINVAL); } @@ -202,22 +202,21 @@ mipi_dsi_device_register_full(struct mipi_dsi_host *host, const struct mipi_dsi_device_info *info) { struct mipi_dsi_device *dsi; - struct device *dev = host->dev; int ret; if (!info) { - dev_err(dev, "invalid mipi_dsi_device_info pointer\n"); + drm_err(host, "invalid mipi_dsi_device_info pointer\n"); return ERR_PTR(-EINVAL); } if (info->channel > 3) { - dev_err(dev, "invalid virtual channel: %u\n", info->channel); + drm_err(host, "invalid virtual channel: %u\n", info->channel); return ERR_PTR(-EINVAL); } dsi = mipi_dsi_device_alloc(host); if (IS_ERR(dsi)) { - dev_err(dev, "failed to allocate DSI device %ld\n", + drm_err(host, "failed to allocate DSI device %ld\n", PTR_ERR(dsi)); return dsi; } @@ -228,7 +227,7 @@ mipi_dsi_device_register_full(struct mipi_dsi_host *host, ret = mipi_dsi_device_add(dsi); if (ret) { - dev_err(dev, "failed to add DSI device %d\n", ret); + drm_err(host, "failed to add DSI device %d\n", ret); kfree(dsi); return ERR_PTR(ret); } -- 2.17.1 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-07-07 16:29 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-07 16:34 [PATCH 0/4] drm: core: Convert logging to drm_* functions Suraj Upadhyay 2020-07-07 16:28 ` Suraj Upadhyay [this message] 2020-07-07 16:35 ` [PATCH 1/4] drm: mipi-dsi: " Suraj Upadhyay 2020-07-10 18:01 ` Sam Ravnborg 2020-07-07 16:36 ` [PATCH 2/4] drm: mipi-dbi: " Suraj Upadhyay 2020-07-07 16:36 ` [PATCH 3/4] drm: edid: " Suraj Upadhyay 2020-07-08 6:10 ` Thomas Zimmermann 2020-07-07 16:37 ` [PATCH 4/4] drm: fb-helper: " Suraj Upadhyay 2020-07-08 6:10 ` Thomas Zimmermann 2020-07-10 18:02 ` Sam Ravnborg 2020-07-10 17:56 ` [PATCH 0/4] drm: core: " Sam Ravnborg 2020-07-11 15:11 ` Suraj Upadhyay 2020-07-11 18:16 ` Joe Perches 2020-07-12 18:54 ` Suraj Upadhyay 2020-07-12 19:07 ` Joe Perches 2020-07-13 13:58 ` Suraj Upadhyay 2020-07-16 20:19 ` Sam Ravnborg
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=feeec2816debcf4105ac22af1661fd2d491d02b9.1594136880.git.usuraj35@gmail.com \ --to=usuraj35@gmail.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-kernel@vger.kernel.org \ --cc=srrj.967@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).