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>
This commit is contained in:
Родитель
372280d2a3
Коммит
804b445894
|
@ -27,7 +27,7 @@ static int saa7146_num;
|
|||
|
||||
unsigned int saa7146_debug;
|
||||
|
||||
module_param(saa7146_debug, int, 0644);
|
||||
module_param(saa7146_debug, uint, 0644);
|
||||
MODULE_PARM_DESC(saa7146_debug, "debug level (default: 0)");
|
||||
|
||||
#if 0
|
||||
|
@ -130,10 +130,10 @@ static struct scatterlist* vmalloc_to_sg(unsigned char *virt, int nr_pages)
|
|||
/********************************************************************************/
|
||||
/* common page table functions */
|
||||
|
||||
char *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa7146_pgtable *pt)
|
||||
void *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa7146_pgtable *pt)
|
||||
{
|
||||
int pages = (length+PAGE_SIZE-1)/PAGE_SIZE;
|
||||
char *mem = vmalloc_32(length);
|
||||
void *mem = vmalloc_32(length);
|
||||
int slen = 0;
|
||||
|
||||
if (NULL == mem)
|
||||
|
@ -168,7 +168,7 @@ err_null:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void saa7146_vfree_destroy_pgtable(struct pci_dev *pci, char *mem, struct saa7146_pgtable *pt)
|
||||
void saa7146_vfree_destroy_pgtable(struct pci_dev *pci, void *mem, struct saa7146_pgtable *pt)
|
||||
{
|
||||
pci_unmap_sg(pci, pt->slist, pt->nents, PCI_DMA_FROMDEVICE);
|
||||
saa7146_pgtable_free(pci, pt);
|
||||
|
|
|
@ -889,9 +889,9 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
|
|||
|
||||
DEB_EE(("VIDIOC_QUERYCAP\n"));
|
||||
|
||||
strcpy(cap->driver, "saa7146 v4l2");
|
||||
strlcpy(cap->card, dev->ext->name, sizeof(cap->card));
|
||||
sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci));
|
||||
strcpy((char *)cap->driver, "saa7146 v4l2");
|
||||
strlcpy((char *)cap->card, dev->ext->name, sizeof(cap->card));
|
||||
sprintf((char *)cap->bus_info,"PCI:%s", pci_name(dev->pci));
|
||||
cap->version = SAA7146_VERSION_CODE;
|
||||
cap->capabilities =
|
||||
V4L2_CAP_VIDEO_CAPTURE |
|
||||
|
@ -968,7 +968,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
|
|||
}
|
||||
memset(f,0,sizeof(*f));
|
||||
f->index = index;
|
||||
strlcpy(f->description,formats[index].name,sizeof(f->description));
|
||||
strlcpy((char *)f->description,formats[index].name,sizeof(f->description));
|
||||
f->pixelformat = formats[index].pixelformat;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -391,7 +391,7 @@ static int get_video_format(struct av7110 *av7110, u8 *buf, int count)
|
|||
****************************************************************************/
|
||||
|
||||
static inline long aux_ring_buffer_write(struct dvb_ringbuffer *rbuf,
|
||||
const char *buf, unsigned long count)
|
||||
const u8 *buf, unsigned long count)
|
||||
{
|
||||
unsigned long todo = count;
|
||||
int free;
|
||||
|
@ -436,7 +436,7 @@ static void play_audio_cb(u8 *buf, int count, void *priv)
|
|||
#define FREE_COND (dvb_ringbuffer_free(&av7110->avout) >= 20 * 1024 && \
|
||||
dvb_ringbuffer_free(&av7110->aout) >= 20 * 1024)
|
||||
|
||||
static ssize_t dvb_play(struct av7110 *av7110, const u8 __user *buf,
|
||||
static ssize_t dvb_play(struct av7110 *av7110, const char __user *buf,
|
||||
unsigned long count, int nonblock, int type)
|
||||
{
|
||||
unsigned long todo = count, n;
|
||||
|
@ -499,7 +499,7 @@ static ssize_t dvb_play_kernel(struct av7110 *av7110, const u8 *buf,
|
|||
return count - todo;
|
||||
}
|
||||
|
||||
static ssize_t dvb_aplay(struct av7110 *av7110, const u8 __user *buf,
|
||||
static ssize_t dvb_aplay(struct av7110 *av7110, const char __user *buf,
|
||||
unsigned long count, int nonblock, int type)
|
||||
{
|
||||
unsigned long todo = count, n;
|
||||
|
@ -959,7 +959,7 @@ static u8 iframe_header[] = { 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x
|
|||
|
||||
#define MIN_IFRAME 400000
|
||||
|
||||
static int play_iframe(struct av7110 *av7110, u8 __user *buf, unsigned int len, int nonblock)
|
||||
static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len, int nonblock)
|
||||
{
|
||||
int i, n;
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ static ssize_t ci_ll_write(struct dvb_ringbuffer *cibuf, struct file *file,
|
|||
{
|
||||
int free;
|
||||
int non_blocking = file->f_flags & O_NONBLOCK;
|
||||
char *page = (char *)__get_free_page(GFP_USER);
|
||||
u8 *page = (u8 *)__get_free_page(GFP_USER);
|
||||
int res;
|
||||
|
||||
if (!page)
|
||||
|
@ -208,7 +208,7 @@ static ssize_t ci_ll_read(struct dvb_ringbuffer *cibuf, struct file *file,
|
|||
return -EINVAL;
|
||||
DVB_RINGBUFFER_SKIP(cibuf, 2);
|
||||
|
||||
return dvb_ringbuffer_read(cibuf, buf, len, 1);
|
||||
return dvb_ringbuffer_read(cibuf, (u8 *)buf, len, 1);
|
||||
}
|
||||
|
||||
static int dvb_ca_open(struct inode *inode, struct file *file)
|
||||
|
|
|
@ -158,7 +158,7 @@ static int load_dram(struct av7110 *av7110, u32 *data, int len)
|
|||
}
|
||||
dprintk(4, "writing DRAM block %d\n", i);
|
||||
mwdebi(av7110, DEBISWAB, bootblock,
|
||||
((char*)data) + i * AV7110_BOOT_MAX_SIZE, AV7110_BOOT_MAX_SIZE);
|
||||
((u8 *)data) + i * AV7110_BOOT_MAX_SIZE, AV7110_BOOT_MAX_SIZE);
|
||||
bootblock ^= 0x1400;
|
||||
iwdebi(av7110, DEBISWAB, AV7110_BOOT_BASE, swab32(base), 4);
|
||||
iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, AV7110_BOOT_MAX_SIZE, 2);
|
||||
|
@ -173,10 +173,10 @@ static int load_dram(struct av7110 *av7110, u32 *data, int len)
|
|||
}
|
||||
if (rest > 4)
|
||||
mwdebi(av7110, DEBISWAB, bootblock,
|
||||
((char*)data) + i * AV7110_BOOT_MAX_SIZE, rest);
|
||||
((u8 *)data) + i * AV7110_BOOT_MAX_SIZE, rest);
|
||||
else
|
||||
mwdebi(av7110, DEBISWAB, bootblock,
|
||||
((char*)data) + i * AV7110_BOOT_MAX_SIZE - 4, rest + 4);
|
||||
((u8 *)data) + i * AV7110_BOOT_MAX_SIZE - 4, rest + 4);
|
||||
|
||||
iwdebi(av7110, DEBISWAB, AV7110_BOOT_BASE, swab32(base), 4);
|
||||
iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, rest, 2);
|
||||
|
@ -751,7 +751,7 @@ static int FlushText(struct av7110 *av7110)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, u8* buf)
|
||||
static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, char *buf)
|
||||
{
|
||||
int i, ret;
|
||||
unsigned long start;
|
||||
|
|
|
@ -393,7 +393,7 @@ static inline void iwdebi(struct av7110 *av7110, u32 config, int addr, u32 val,
|
|||
}
|
||||
|
||||
/* buffer writes */
|
||||
static inline void mwdebi(struct av7110 *av7110, u32 config, int addr, char *val, int count)
|
||||
static inline void mwdebi(struct av7110 *av7110, u32 config, int addr, u8 *val, int count)
|
||||
{
|
||||
memcpy(av7110->debi_virt, val, count);
|
||||
av7110_debiwrite(av7110, config, addr, 0, count);
|
||||
|
|
|
@ -333,7 +333,7 @@ static int av7110_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
|
|||
return -EINVAL;
|
||||
|
||||
memset(t, 0, sizeof(*t));
|
||||
strcpy(t->name, "Television");
|
||||
strcpy((char *)t->name, "Television");
|
||||
|
||||
t->type = V4L2_TUNER_ANALOG_TV;
|
||||
t->capability = V4L2_TUNER_CAP_NORM | V4L2_TUNER_CAP_STEREO |
|
||||
|
|
|
@ -114,7 +114,7 @@ struct saa7146_dev
|
|||
struct mutex lock;
|
||||
|
||||
unsigned char __iomem *mem; /* pointer to mapped IO memory */
|
||||
int revision; /* chip revision; needed for bug-workarounds*/
|
||||
u32 revision; /* chip revision; needed for bug-workarounds*/
|
||||
|
||||
/* pci-device & irq stuff*/
|
||||
char name[32];
|
||||
|
@ -157,8 +157,8 @@ struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc);
|
|||
int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt);
|
||||
void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt);
|
||||
int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt, struct scatterlist *list, int length );
|
||||
char *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa7146_pgtable *pt);
|
||||
void saa7146_vfree_destroy_pgtable(struct pci_dev *pci, char *mem, struct saa7146_pgtable *pt);
|
||||
void *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa7146_pgtable *pt);
|
||||
void saa7146_vfree_destroy_pgtable(struct pci_dev *pci, void *mem, struct saa7146_pgtable *pt);
|
||||
void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data);
|
||||
int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче