]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] saa7134,saa7164: warning: comparison of unsigned fixes
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 27 Oct 2012 19:20:27 +0000 (16:20 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 28 Oct 2012 09:38:48 +0000 (07:38 -0200)
drivers/media/pci/saa7134/saa7134-core.c:947:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/saa7164/saa7164-core.c:413:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
drivers/media/pci/saa7164/saa7164-core.c:489:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
drivers/media/pci/saa7134/saa7134-video.c:2514:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/pci/saa7134/saa7134-core.c
drivers/media/pci/saa7134/saa7134-video.c
drivers/media/pci/saa7164/saa7164-core.c

index f2b37e05b96479e7f534537a3208d120b408f661..8976d0e65813d26d7c2761d7172fd7549899d1d4 100644 (file)
@@ -944,8 +944,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
 
        /* board config */
        dev->board = pci_id->driver_data;
-       if (card[dev->nr] >= 0 &&
-           card[dev->nr] < saa7134_bcount)
+       if ((unsigned)card[dev->nr] < saa7134_bcount)
                dev->board = card[dev->nr];
        if (SAA7134_BOARD_UNKNOWN == dev->board)
                must_configure_manually(0);
index 4a77124ee70e2cbda80a414413a85346b7a832c3..3abf52711e132cfa24e8b4e16bf198eb5cc35cc3 100644 (file)
@@ -2511,7 +2511,7 @@ int saa7134_video_init1(struct saa7134_dev *dev)
        /* sanitycheck insmod options */
        if (gbuffers < 2 || gbuffers > VIDEO_MAX_FRAME)
                gbuffers = 2;
-       if (gbufsize < 0 || gbufsize > gbufsize_max)
+       if (gbufsize > gbufsize_max)
                gbufsize = gbufsize_max;
        gbufsize = (gbufsize + PAGE_SIZE - 1) & PAGE_MASK;
 
index 2c9ad878bef3dedab9c91a19019d7443d151affb..063047f567669f1bdc6c33bcfdca33528d56f5a3 100644 (file)
@@ -410,7 +410,7 @@ static void saa7164_work_enchandler(struct work_struct *w)
                } else
                        rp = (port->last_svc_rp + 1) % 8;
 
-               if ((rp < 0) || (rp > (port->hwcfg.buffercount - 1))) {
+               if (rp > (port->hwcfg.buffercount - 1)) {
                        printk(KERN_ERR "%s() illegal rp count %d\n", __func__, rp);
                        break;
                }
@@ -486,7 +486,7 @@ static void saa7164_work_vbihandler(struct work_struct *w)
                } else
                        rp = (port->last_svc_rp + 1) % 8;
 
-               if ((rp < 0) || (rp > (port->hwcfg.buffercount - 1))) {
+               if (rp > (port->hwcfg.buffercount - 1)) {
                        printk(KERN_ERR "%s() illegal rp count %d\n", __func__, rp);
                        break;
                }