Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (5835): saa7146/dvb-ttpci: Fix signedness warnings (gcc 4.1.1, kernel 2.6.22)

Fix signedness warnings (gcc 4.1.1, kernel 2.6.22).

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>

authored by

Oliver Endriss and committed by
Mauro Carvalho Chehab
804b4458 372280d2

+23 -23
+4 -4
drivers/media/common/saa7146_core.c
··· 27 27 28 28 unsigned int saa7146_debug; 29 29 30 - module_param(saa7146_debug, int, 0644); 30 + module_param(saa7146_debug, uint, 0644); 31 31 MODULE_PARM_DESC(saa7146_debug, "debug level (default: 0)"); 32 32 33 33 #if 0 ··· 130 130 /********************************************************************************/ 131 131 /* common page table functions */ 132 132 133 - char *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa7146_pgtable *pt) 133 + void *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa7146_pgtable *pt) 134 134 { 135 135 int pages = (length+PAGE_SIZE-1)/PAGE_SIZE; 136 - char *mem = vmalloc_32(length); 136 + void *mem = vmalloc_32(length); 137 137 int slen = 0; 138 138 139 139 if (NULL == mem) ··· 168 168 return NULL; 169 169 } 170 170 171 - void saa7146_vfree_destroy_pgtable(struct pci_dev *pci, char *mem, struct saa7146_pgtable *pt) 171 + void saa7146_vfree_destroy_pgtable(struct pci_dev *pci, void *mem, struct saa7146_pgtable *pt) 172 172 { 173 173 pci_unmap_sg(pci, pt->slist, pt->nents, PCI_DMA_FROMDEVICE); 174 174 saa7146_pgtable_free(pci, pt);
+4 -4
drivers/media/common/saa7146_video.c
··· 889 889 890 890 DEB_EE(("VIDIOC_QUERYCAP\n")); 891 891 892 - strcpy(cap->driver, "saa7146 v4l2"); 893 - strlcpy(cap->card, dev->ext->name, sizeof(cap->card)); 894 - sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci)); 892 + strcpy((char *)cap->driver, "saa7146 v4l2"); 893 + strlcpy((char *)cap->card, dev->ext->name, sizeof(cap->card)); 894 + sprintf((char *)cap->bus_info,"PCI:%s", pci_name(dev->pci)); 895 895 cap->version = SAA7146_VERSION_CODE; 896 896 cap->capabilities = 897 897 V4L2_CAP_VIDEO_CAPTURE | ··· 968 968 } 969 969 memset(f,0,sizeof(*f)); 970 970 f->index = index; 971 - strlcpy(f->description,formats[index].name,sizeof(f->description)); 971 + strlcpy((char *)f->description,formats[index].name,sizeof(f->description)); 972 972 f->pixelformat = formats[index].pixelformat; 973 973 break; 974 974 }
+4 -4
drivers/media/dvb/ttpci/av7110_av.c
··· 391 391 ****************************************************************************/ 392 392 393 393 static inline long aux_ring_buffer_write(struct dvb_ringbuffer *rbuf, 394 - const char *buf, unsigned long count) 394 + const u8 *buf, unsigned long count) 395 395 { 396 396 unsigned long todo = count; 397 397 int free; ··· 436 436 #define FREE_COND (dvb_ringbuffer_free(&av7110->avout) >= 20 * 1024 && \ 437 437 dvb_ringbuffer_free(&av7110->aout) >= 20 * 1024) 438 438 439 - static ssize_t dvb_play(struct av7110 *av7110, const u8 __user *buf, 439 + static ssize_t dvb_play(struct av7110 *av7110, const char __user *buf, 440 440 unsigned long count, int nonblock, int type) 441 441 { 442 442 unsigned long todo = count, n; ··· 499 499 return count - todo; 500 500 } 501 501 502 - static ssize_t dvb_aplay(struct av7110 *av7110, const u8 __user *buf, 502 + static ssize_t dvb_aplay(struct av7110 *av7110, const char __user *buf, 503 503 unsigned long count, int nonblock, int type) 504 504 { 505 505 unsigned long todo = count, n; ··· 959 959 960 960 #define MIN_IFRAME 400000 961 961 962 - static int play_iframe(struct av7110 *av7110, u8 __user *buf, unsigned int len, int nonblock) 962 + static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len, int nonblock) 963 963 { 964 964 int i, n; 965 965
+2 -2
drivers/media/dvb/ttpci/av7110_ca.c
··· 151 151 { 152 152 int free; 153 153 int non_blocking = file->f_flags & O_NONBLOCK; 154 - char *page = (char *)__get_free_page(GFP_USER); 154 + u8 *page = (u8 *)__get_free_page(GFP_USER); 155 155 int res; 156 156 157 157 if (!page) ··· 208 208 return -EINVAL; 209 209 DVB_RINGBUFFER_SKIP(cibuf, 2); 210 210 211 - return dvb_ringbuffer_read(cibuf, buf, len, 1); 211 + return dvb_ringbuffer_read(cibuf, (u8 *)buf, len, 1); 212 212 } 213 213 214 214 static int dvb_ca_open(struct inode *inode, struct file *file)
+4 -4
drivers/media/dvb/ttpci/av7110_hw.c
··· 158 158 } 159 159 dprintk(4, "writing DRAM block %d\n", i); 160 160 mwdebi(av7110, DEBISWAB, bootblock, 161 - ((char*)data) + i * AV7110_BOOT_MAX_SIZE, AV7110_BOOT_MAX_SIZE); 161 + ((u8 *)data) + i * AV7110_BOOT_MAX_SIZE, AV7110_BOOT_MAX_SIZE); 162 162 bootblock ^= 0x1400; 163 163 iwdebi(av7110, DEBISWAB, AV7110_BOOT_BASE, swab32(base), 4); 164 164 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, AV7110_BOOT_MAX_SIZE, 2); ··· 173 173 } 174 174 if (rest > 4) 175 175 mwdebi(av7110, DEBISWAB, bootblock, 176 - ((char*)data) + i * AV7110_BOOT_MAX_SIZE, rest); 176 + ((u8 *)data) + i * AV7110_BOOT_MAX_SIZE, rest); 177 177 else 178 178 mwdebi(av7110, DEBISWAB, bootblock, 179 - ((char*)data) + i * AV7110_BOOT_MAX_SIZE - 4, rest + 4); 179 + ((u8 *)data) + i * AV7110_BOOT_MAX_SIZE - 4, rest + 4); 180 180 181 181 iwdebi(av7110, DEBISWAB, AV7110_BOOT_BASE, swab32(base), 4); 182 182 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, rest, 2); ··· 751 751 return 0; 752 752 } 753 753 754 - static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, u8* buf) 754 + static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, char *buf) 755 755 { 756 756 int i, ret; 757 757 unsigned long start;
+1 -1
drivers/media/dvb/ttpci/av7110_hw.h
··· 393 393 } 394 394 395 395 /* buffer writes */ 396 - static inline void mwdebi(struct av7110 *av7110, u32 config, int addr, char *val, int count) 396 + static inline void mwdebi(struct av7110 *av7110, u32 config, int addr, u8 *val, int count) 397 397 { 398 398 memcpy(av7110->debi_virt, val, count); 399 399 av7110_debiwrite(av7110, config, addr, 0, count);
+1 -1
drivers/media/dvb/ttpci/av7110_v4l.c
··· 333 333 return -EINVAL; 334 334 335 335 memset(t, 0, sizeof(*t)); 336 - strcpy(t->name, "Television"); 336 + strcpy((char *)t->name, "Television"); 337 337 338 338 t->type = V4L2_TUNER_ANALOG_TV; 339 339 t->capability = V4L2_TUNER_CAP_NORM | V4L2_TUNER_CAP_STEREO |
+3 -3
include/media/saa7146.h
··· 114 114 struct mutex lock; 115 115 116 116 unsigned char __iomem *mem; /* pointer to mapped IO memory */ 117 - int revision; /* chip revision; needed for bug-workarounds*/ 117 + u32 revision; /* chip revision; needed for bug-workarounds*/ 118 118 119 119 /* pci-device & irq stuff*/ 120 120 char name[32]; ··· 157 157 int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt); 158 158 void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt); 159 159 int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt, struct scatterlist *list, int length ); 160 - char *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa7146_pgtable *pt); 161 - void saa7146_vfree_destroy_pgtable(struct pci_dev *pci, char *mem, struct saa7146_pgtable *pt); 160 + void *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa7146_pgtable *pt); 161 + void saa7146_vfree_destroy_pgtable(struct pci_dev *pci, void *mem, struct saa7146_pgtable *pt); 162 162 void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data); 163 163 int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop); 164 164