]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: zoran: convert dprintk warn
authorCorentin Labbe <clabbe@baylibre.com>
Fri, 25 Sep 2020 18:30:18 +0000 (20:30 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 1 Oct 2020 07:34:45 +0000 (09:34 +0200)
This patch convert dprintk(warn) to pci_warn.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/zoran/zoran_card.c
drivers/staging/media/zoran/zoran_device.c
drivers/staging/media/zoran/zoran_driver.c

index 27a79fffb01de002031e216a535c73b6603d8489..d0b93141df5ba299715f73c3ca1607fe2b7f0f20 100644 (file)
@@ -938,19 +938,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;
@@ -1378,11 +1373,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) {
index 806c7285a5e31ae3020381be66386b9bb8f5048b..f090ee92f0c89d0f08a6e6960cf3f1d8fa4e4f4f 100644 (file)
@@ -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
@@ -1300,10 +1297,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 */
@@ -1422,8 +1416,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");
index f23e9c0639192d6812adbbb5062c6ed67ca67066..aed2ac82bfee4502359ce5cea5a0baa3fcf7bce3 100644 (file)
@@ -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;
        }
 
@@ -2294,9 +2279,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;
        }