aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-10-27 15:20:27 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-28 05:38:48 -0400
commit3eeba4a796ac7e04404ef12d41520fafb7e07588 (patch)
treec2089e93381f712ff18605be55b848779bb8ba78 /drivers/media
parent2827a4400a181437a2a3e0ccc2307f90bd204fdd (diff)
[media] saa7134,saa7164: warning: comparison of unsigned fixes
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>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/pci/saa7134/saa7134-core.c3
-rw-r--r--drivers/media/pci/saa7134/saa7134-video.c2
-rw-r--r--drivers/media/pci/saa7164/saa7164-core.c4
3 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/pci/saa7134/saa7134-core.c b/drivers/media/pci/saa7134/saa7134-core.c
index f2b37e05b964..8976d0e65813 100644
--- a/drivers/media/pci/saa7134/saa7134-core.c
+++ b/drivers/media/pci/saa7134/saa7134-core.c
@@ -944,8 +944,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
944 944
945 /* board config */ 945 /* board config */
946 dev->board = pci_id->driver_data; 946 dev->board = pci_id->driver_data;
947 if (card[dev->nr] >= 0 && 947 if ((unsigned)card[dev->nr] < saa7134_bcount)
948 card[dev->nr] < saa7134_bcount)
949 dev->board = card[dev->nr]; 948 dev->board = card[dev->nr];
950 if (SAA7134_BOARD_UNKNOWN == dev->board) 949 if (SAA7134_BOARD_UNKNOWN == dev->board)
951 must_configure_manually(0); 950 must_configure_manually(0);
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
index 4a77124ee70e..3abf52711e13 100644
--- a/drivers/media/pci/saa7134/saa7134-video.c
+++ b/drivers/media/pci/saa7134/saa7134-video.c
@@ -2511,7 +2511,7 @@ int saa7134_video_init1(struct saa7134_dev *dev)
2511 /* sanitycheck insmod options */ 2511 /* sanitycheck insmod options */
2512 if (gbuffers < 2 || gbuffers > VIDEO_MAX_FRAME) 2512 if (gbuffers < 2 || gbuffers > VIDEO_MAX_FRAME)
2513 gbuffers = 2; 2513 gbuffers = 2;
2514 if (gbufsize < 0 || gbufsize > gbufsize_max) 2514 if (gbufsize > gbufsize_max)
2515 gbufsize = gbufsize_max; 2515 gbufsize = gbufsize_max;
2516 gbufsize = (gbufsize + PAGE_SIZE - 1) & PAGE_MASK; 2516 gbufsize = (gbufsize + PAGE_SIZE - 1) & PAGE_MASK;
2517 2517
diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c
index 2c9ad878bef3..063047f56766 100644
--- a/drivers/media/pci/saa7164/saa7164-core.c
+++ b/drivers/media/pci/saa7164/saa7164-core.c
@@ -410,7 +410,7 @@ static void saa7164_work_enchandler(struct work_struct *w)
410 } else 410 } else
411 rp = (port->last_svc_rp + 1) % 8; 411 rp = (port->last_svc_rp + 1) % 8;
412 412
413 if ((rp < 0) || (rp > (port->hwcfg.buffercount - 1))) { 413 if (rp > (port->hwcfg.buffercount - 1)) {
414 printk(KERN_ERR "%s() illegal rp count %d\n", __func__, rp); 414 printk(KERN_ERR "%s() illegal rp count %d\n", __func__, rp);
415 break; 415 break;
416 } 416 }
@@ -486,7 +486,7 @@ static void saa7164_work_vbihandler(struct work_struct *w)
486 } else 486 } else
487 rp = (port->last_svc_rp + 1) % 8; 487 rp = (port->last_svc_rp + 1) % 8;
488 488
489 if ((rp < 0) || (rp > (port->hwcfg.buffercount - 1))) { 489 if (rp > (port->hwcfg.buffercount - 1)) {
490 printk(KERN_ERR "%s() illegal rp count %d\n", __func__, rp); 490 printk(KERN_ERR "%s() illegal rp count %d\n", __func__, rp);
491 break; 491 break;
492 } 492 }