From: Hans de Goede <hdegoede@redhat.com>
To: "Noralf Trønnes" <noralf@tronnes.org>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <maxime.ripard@bootlin.com>,
"Sean Paul" <seanpaul@chromium.org>,
"Daniel Vetter" <daniel.vetter@intel.com>,
"David Airlie" <airlied@linux.ie>
Cc: Hans de Goede <hdegoede@redhat.com>,
Sam Ravnborg <sam@ravnborg.org>,
dri-devel@lists.freedesktop.org
Subject: [PATCH 2/2] drm: gm12u320: Use DRM_DEV_ERROR everywhere
Date: Tue, 30 Jul 2019 15:38:57 +0200 [thread overview]
Message-ID: <20190730133857.30778-2-hdegoede@redhat.com> (raw)
In-Reply-To: <20190730133857.30778-1-hdegoede@redhat.com>
Previously the driver was using a mix of DRM_ERROR and dev_err, be
consisent and use DRM_DEV_ERROR everywhere instead.
Cc: Sam Ravnborg <sam@ravnborg.org>
Suggested-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/gpu/drm/gm12u320/gm12u320.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/gm12u320/gm12u320.c b/drivers/gpu/drm/gm12u320/gm12u320.c
index a60854d7c14c..4c47aa4de09b 100644
--- a/drivers/gpu/drm/gm12u320/gm12u320.c
+++ b/drivers/gpu/drm/gm12u320/gm12u320.c
@@ -44,6 +44,9 @@ MODULE_PARM_DESC(eco_mode, "Turn on Eco mode (less bright, more silent)");
#define GM12U320_BLOCK_COUNT 20
+#define GM12U320_ERR(fmt, ...) \
+ DRM_DEV_ERROR(&gm12u320->udev->dev, fmt, ##__VA_ARGS__)
+
#define MISC_RCV_EPT 1
#define DATA_RCV_EPT 2
#define DATA_SND_EPT 3
@@ -219,7 +222,7 @@ static int gm12u320_misc_request(struct gm12u320_device *gm12u320,
usb_sndbulkpipe(gm12u320->udev, MISC_SND_EPT),
gm12u320->cmd_buf, CMD_SIZE, &len, CMD_TIMEOUT);
if (ret || len != CMD_SIZE) {
- dev_err(&gm12u320->udev->dev, "Misc. req. error %d\n", ret);
+ GM12U320_ERR("Misc. req. error %d\n", ret);
return -EIO;
}
@@ -229,7 +232,7 @@ static int gm12u320_misc_request(struct gm12u320_device *gm12u320,
gm12u320->cmd_buf, MISC_VALUE_SIZE, &len,
DATA_TIMEOUT);
if (ret || len != MISC_VALUE_SIZE) {
- dev_err(&gm12u320->udev->dev, "Misc. value error %d\n", ret);
+ GM12U320_ERR("Misc. value error %d\n", ret);
return -EIO;
}
/* cmd_buf[0] now contains the read value, which we don't use */
@@ -240,7 +243,7 @@ static int gm12u320_misc_request(struct gm12u320_device *gm12u320,
gm12u320->cmd_buf, READ_STATUS_SIZE, &len,
CMD_TIMEOUT);
if (ret || len != READ_STATUS_SIZE) {
- dev_err(&gm12u320->udev->dev, "Misc. status error %d\n", ret);
+ GM12U320_ERR("Misc. status error %d\n", ret);
return -EIO;
}
@@ -277,7 +280,7 @@ static void gm12u320_copy_fb_to_blocks(struct gm12u320_device *gm12u320)
vaddr = drm_gem_shmem_vmap(fb->obj[0]);
if (IS_ERR(vaddr)) {
- DRM_ERROR("failed to vmap fb: %ld\n", PTR_ERR(vaddr));
+ GM12U320_ERR("failed to vmap fb: %ld\n", PTR_ERR(vaddr));
goto put_fb;
}
@@ -285,7 +288,7 @@ static void gm12u320_copy_fb_to_blocks(struct gm12u320_device *gm12u320)
ret = dma_buf_begin_cpu_access(
fb->obj[0]->import_attach->dmabuf, DMA_FROM_DEVICE);
if (ret) {
- DRM_ERROR("dma_buf_begin_cpu_access err: %d\n", ret);
+ GM12U320_ERR("dma_buf_begin_cpu_access err: %d\n", ret);
goto vunmap;
}
}
@@ -328,7 +331,7 @@ static void gm12u320_copy_fb_to_blocks(struct gm12u320_device *gm12u320)
ret = dma_buf_end_cpu_access(fb->obj[0]->import_attach->dmabuf,
DMA_FROM_DEVICE);
if (ret)
- DRM_ERROR("dma_buf_end_cpu_access err: %d\n", ret);
+ GM12U320_ERR("dma_buf_end_cpu_access err: %d\n", ret);
}
vunmap:
drm_gem_shmem_vunmap(fb->obj[0], vaddr);
@@ -430,7 +433,7 @@ static void gm12u320_fb_update_work(struct work_struct *work)
err:
/* Do not log errors caused by module unload or device unplug */
if (ret != -ECONNRESET && ret != -ESHUTDOWN)
- dev_err(&gm12u320->udev->dev, "Frame update error: %d\n", ret);
+ GM12U320_ERR("Frame update error: %d\n", ret);
}
static void gm12u320_fb_mark_dirty(struct drm_framebuffer *fb,
--
2.21.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-07-30 13:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 13:38 [PATCH 1/2] drm: gm12u320: Some minor cleanups Hans de Goede
2019-07-30 13:38 ` Hans de Goede [this message]
2019-08-01 14:59 ` [PATCH 2/2] drm: gm12u320: Use DRM_DEV_ERROR everywhere Sam Ravnborg
2019-08-01 14:59 ` [PATCH 1/2] drm: gm12u320: Some minor cleanups Sam Ravnborg
2019-08-11 13:47 ` Hans de Goede
2019-08-12 19:33 ` Hans de Goede
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=20190730133857.30778-2-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=maxime.ripard@bootlin.com \
--cc=noralf@tronnes.org \
--cc=sam@ravnborg.org \
--cc=seanpaul@chromium.org \
/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: link
Be 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