From: Corentin Labbe <clabbe@baylibre.com>
To: gregkh@linuxfoundation.org, laurent.pinchart@skynet.be,
mchehab@kernel.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org, Corentin Labbe <clabbe@baylibre.com>
Subject: [PATCH RFT/RFC 09/49] staging: media: zoran: convert dprintk warn
Date: Mon, 21 Sep 2020 10:19:44 +0000 [thread overview]
Message-ID: <1600683624-5863-10-git-send-email-clabbe@baylibre.com> (raw)
In-Reply-To: <1600683624-5863-1-git-send-email-clabbe@baylibre.com>
This patch convert dprintk(warn) to pci_warn.
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
drivers/staging/media/zoran/zoran_card.c | 18 ++++----------
drivers/staging/media/zoran/zoran_device.c | 13 +++-------
drivers/staging/media/zoran/zoran_driver.c | 29 +++++-----------------
3 files changed, 14 insertions(+), 46 deletions(-)
diff --git a/drivers/staging/media/zoran/zoran_card.c b/drivers/staging/media/zoran/zoran_card.c
index 006f209c40ea..26f58e687333 100644
--- a/drivers/staging/media/zoran/zoran_card.c
+++ b/drivers/staging/media/zoran/zoran_card.c
@@ -933,19 +933,14 @@ static int zr36057_init(struct zoran *zr)
zr->timing = zr->card.tvn[2];
}
if (!zr->timing) {
- dprintk(1,
- KERN_WARNING
- "%s: %s - default TV standard not supported by hardware. PAL will be used.\n",
- ZR_DEVNAME(zr), __func__);
+ pci_warn(zr->pci_dev, "%s - default TV standard not supported by hardware. PAL will be used.\n", __func__);
zr->norm = V4L2_STD_PAL;
zr->timing = zr->card.tvn[0];
}
if (default_input > zr->card.inputs - 1) {
- dprintk(1,
- KERN_WARNING
- "%s: default_input value %d out of range (0-%d)\n",
- ZR_DEVNAME(zr), default_input, zr->card.inputs - 1);
+ pci_warn(zr->pci_dev, "default_input value %d out of range (0-%d)\n",
+ default_input, zr->card.inputs - 1);
default_input = 0;
}
zr->input = default_input;
@@ -1369,11 +1364,8 @@ static int __init zoran_init(void)
}
/* some mainboards might not do PCI-PCI data transfer well */
- if (pci_pci_problems & (PCIPCI_FAIL | PCIAGP_FAIL | PCIPCI_ALIMAGIK)) {
- dprintk(1,
- KERN_WARNING
- "%s: chipset does not support reliable PCI-PCI DMA\n", ZORAN_NAME);
- }
+ if (pci_pci_problems & (PCIPCI_FAIL | PCIAGP_FAIL | PCIPCI_ALIMAGIK))
+ pr_warn("%s: chipset does not support reliable PCI-PCI DMA\n", ZORAN_NAME);
res = pci_register_driver(&zoran_driver);
if (res) {
diff --git a/drivers/staging/media/zoran/zoran_device.c b/drivers/staging/media/zoran/zoran_device.c
index d7c85787e9c0..a04fbae30745 100644
--- a/drivers/staging/media/zoran/zoran_device.c
+++ b/drivers/staging/media/zoran/zoran_device.c
@@ -547,10 +547,7 @@ void zr36057_set_memgrab(struct zoran *zr, int mode)
* will be stuck at 1 until capturing is turned back on.
*/
if (btread(ZR36057_VSSFGR) & ZR36057_VSSFGR_SnapShot)
- dprintk(1,
- KERN_WARNING
- "%s: zr36057_set_memgrab(1) with SnapShot on!?\n",
- ZR_DEVNAME(zr));
+ pci_warn(zr->pci_dev, "zr36057_set_memgrab(1) with SnapShot on!?\n");
/* switch on VSync interrupts */
btwrite(IRQ_MASK, ZR36057_ISR); // Clear Interrupts
@@ -1284,10 +1281,7 @@ irqreturn_t zoran_irq(int irq, void *dev_id)
if (zr->v4l_memgrab_active) {
/* A lot more checks should be here ... */
if ((btread(ZR36057_VSSFGR) & ZR36057_VSSFGR_SnapShot) == 0)
- dprintk(1,
- KERN_WARNING
- "%s: BuzIRQ with SnapShot off ???\n",
- ZR_DEVNAME(zr));
+ pci_warn(zr->pci_dev, "BuzIRQ with SnapShot off ???\n");
if (zr->v4l_grab_frame != NO_GRAB_ACTIVE) {
/* There is a grab on a frame going on, check if it has finished */
@@ -1406,8 +1400,7 @@ irqreturn_t zoran_irq(int irq, void *dev_id)
count++;
if (count > 10) {
- dprintk(2, KERN_WARNING "%s: irq loop %d\n",
- ZR_DEVNAME(zr), count);
+ pci_warn(zr->pci_dev, "irq loop %d\n", count);
if (count > 20) {
btand(~ZR36057_ICR_IntPinEn, ZR36057_ICR);
pci_err(zr->pci_dev, "IRQ lockup, cleared int mask\n");
diff --git a/drivers/staging/media/zoran/zoran_driver.c b/drivers/staging/media/zoran/zoran_driver.c
index 4082d5e53a24..3b061c3e4a82 100644
--- a/drivers/staging/media/zoran/zoran_driver.c
+++ b/drivers/staging/media/zoran/zoran_driver.c
@@ -210,10 +210,7 @@ static int v4l_fbuffer_alloc(struct zoran_fh *fh)
for (i = 0; i < fh->buffers.num_buffers; i++) {
if (fh->buffers.buffer[i].v4l.fbuffer)
- dprintk(2,
- KERN_WARNING
- "%s: %s - buffer %d already allocated!?\n",
- ZR_DEVNAME(zr), __func__, i);
+ pci_warn(zr->pci_dev, "%s - buffer %d already allocated!?\n", __func__, i);
//udelay(20);
mem = kmalloc(fh->buffers.buffer_size, GFP_KERNEL | __GFP_NOWARN);
@@ -300,10 +297,7 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh)
for (i = 0; i < fh->buffers.num_buffers; i++) {
if (fh->buffers.buffer[i].jpg.frag_tab)
- dprintk(2,
- KERN_WARNING
- "%s: %s - buffer %d already allocated!?\n",
- ZR_DEVNAME(zr), __func__, i);
+ pci_warn(zr->pci_dev, "%s - buffer %d already allocated!?\n", __func__, i);
/* Allocate fragment table for this buffer */
@@ -490,10 +484,7 @@ static int zoran_v4l_queue_frame(struct zoran_fh *fh, int num)
res = -EBUSY; /* what are you doing? */
break;
case BUZ_STATE_DONE:
- dprintk(2,
- KERN_WARNING
- "%s: %s - queueing buffer %d in state DONE!?\n",
- ZR_DEVNAME(zr), __func__, num);
+ pci_warn(zr->pci_dev, "%s - queueing buffer %d in state DONE!?\n", __func__, num);
/* fallthrough */
case BUZ_STATE_USER:
/* since there is at least one unused buffer there's room for at least
@@ -627,10 +618,7 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num,
if (!res) {
switch (zr->jpg_buffers.buffer[num].state) {
case BUZ_STATE_DONE:
- dprintk(2,
- KERN_WARNING
- "%s: %s - queuing frame in BUZ_STATE_DONE state!?\n",
- ZR_DEVNAME(zr), __func__);
+ pci_warn(zr->pci_dev, "%s - queuing frame in BUZ_STATE_DONE state!?\n", __func__);
/* fallthrough */
case BUZ_STATE_USER:
/* since there is at least one unused buffer there's room for at
@@ -1330,10 +1318,7 @@ static int zoran_set_input(struct zoran *zr, int input)
if (zr->v4l_buffers.active != ZORAN_FREE ||
zr->jpg_buffers.active != ZORAN_FREE) {
- dprintk(1,
- KERN_WARNING
- "%s: %s called while in playback/capture mode\n",
- ZR_DEVNAME(zr), __func__);
+ pci_warn(zr->pci_dev, "%s called while in playback/capture mode\n", __func__);
return -EBUSY;
}
@@ -2285,9 +2270,7 @@ static int zoran_s_jpegcomp(struct file *file, void *__fh,
settings.jpg_comp = *params;
if (fh->buffers.active != ZORAN_FREE) {
- dprintk(1, KERN_WARNING
- "%s: VIDIOC_S_JPEGCOMP called while in playback/capture mode\n",
- ZR_DEVNAME(zr));
+ pci_warn(zr->pci_dev, "VIDIOC_S_JPEGCOMP called while in playback/capture mode\n");
res = -EBUSY;
return res;
}
--
2.26.2
next prev parent reply other threads:[~2020-09-21 10:20 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 10:19 [PATCH RFT/RFC 00/49] staging: media: bring back zoran driver Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 01/49] staging: media: Revert "media: zoran: remove deprecated driver" Corentin Labbe
2020-09-22 5:16 ` Christoph Hellwig
2020-09-22 19:15 ` LABBE Corentin
2020-09-21 10:19 ` [PATCH RFT/RFC 02/49] MAINTAINERS: change maintainer of the zoran driver Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 03/49] staging: media: zoran: datasheet is no longer available from zoran.com Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 04/49] staging: media: zoran: Documentation: fix typo Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 05/49] staging: media: zoran: fix checkpatch issue Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 06/49] staging: media: zoran: unsplit lines Corentin Labbe
2020-09-22 5:13 ` Christoph Hellwig
2020-09-21 10:19 ` [PATCH RFT/RFC 07/49] staging: media: zoran: do not forward declare zr36057_init_vfe Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 08/49] staging: media: zoran: convert all error dprintk to pci_err/pr_err Corentin Labbe
2020-09-21 10:19 ` Corentin Labbe [this message]
2020-09-21 10:19 ` [PATCH RFT/RFC 10/49] staging: media: zoran: convert dprintk info to pci_info Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 11/49] staging: media: zoran: convert dprintk debug Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 12/49] staging: media: zoran: zoran_device.c: convert pr_x to pci_x Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 13/49] staging: media: zoran: remove proc_fs Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 14/49] staging: media: zoran: use VFL_TYPE_VIDEO Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 15/49] staging: media: zoran: use v4l2_buffer_set_timestamp Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 16/49] staging: media: zoran: do not print random guest 0 Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 17/49] staging: media: zoran: move buffer_size out of zoran_fh Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 18/49] staging: media: zoran: move v4l_settings " Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 19/49] staging: media: zoran: move jpg_settings " Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 20/49] staging: media: zoran: move overlay_settings " Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 21/49] staging: media: zoran: Use video_drvdata to get struct zoran Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 22/49] staging: media: zoran: Change zoran_v4l_set_format parameter from zoran_fh to zoran Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 23/49] staging: media: zoran: remove overlay Corentin Labbe
2020-09-21 10:19 ` [PATCH RFT/RFC 24/49] staging: media: zoran: Use DMA coherent for stat_com Corentin Labbe
2020-09-22 5:14 ` Christoph Hellwig
2020-09-21 10:20 ` [PATCH RFT/RFC 25/49] staging: media: zoran: use ZR_NORM Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 26/49] staging: media: zoran: zoran does not support STD_ALL Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 27/49] staging: media: zoran: convert irq to pci irq Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 28/49] staging: media: zoran: convert zoran alloc to devm Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 29/49] staging: media: zoran: convert mdelay to udelay Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 30/49] staging: media: zoran: use devm for videocodec_master alloc Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 31/49] staging: media: zoran: use pci_request_regions Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 32/49] staging: media: zoran: use devm_ioremap Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 33/49] staging: media: zoran: add stat_com buffer Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 34/49] staging: media: zoran: constify struct tvnorm Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 35/49] staging: media: zoran: constify codec_name Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 36/49] staging: media: zoran: Add more check for compliance Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 37/49] staging: media: zoran: add fallthrough keyword Corentin Labbe
2020-09-21 10:59 ` Dan Carpenter
2020-09-24 18:03 ` LABBE Corentin
2020-09-21 10:20 ` [PATCH RFT/RFC 38/49] staging: media: zoran: Add vb_queue Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 39/49] staging: media: zoran: disable output Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 40/49] staging: media: zoran: device support only 32bit DMA address Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 41/49] staging: media: zoran: enable makefile Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 42/49] staging: media: zoran: remove framebuffer support Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 43/49] staging: media: zoran: add vidioc_g_parm Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 44/49] staging: media: zoran: remove test_interrupts Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 45/49] staging: media: zoran: fix use of buffer_size and sizeimage Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 46/49] staging: media: zoran: fix some compliance test Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 47/49] staging: media: zoran: remove deprecated .vidioc_g_jpegcomp Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 48/49] staging: media: zoran: convert to vb2 Corentin Labbe
2020-09-21 10:20 ` [PATCH RFT/RFC 49/49] staging: media: zoran: update TODO Corentin Labbe
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=1600683624-5863-10-git-send-email-clabbe@baylibre.com \
--to=clabbe@baylibre.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=laurent.pinchart@skynet.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.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
all inboxes | Powered by JetHome®