Commit e18828e4 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB (3179): Fix 64-bit compile warnings

- Fix 64-bit compile warnings
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@brturbo.com.br>
parent 67f1570a
...@@ -562,7 +562,7 @@ static void saa7146_set_position(struct saa7146_dev *dev, int w_x, int w_y, int ...@@ -562,7 +562,7 @@ static void saa7146_set_position(struct saa7146_dev *dev, int w_x, int w_y, int
int b_depth = vv->ov_fmt->depth; int b_depth = vv->ov_fmt->depth;
int b_bpl = vv->ov_fb.fmt.bytesperline; int b_bpl = vv->ov_fb.fmt.bytesperline;
u32 base = (u32)vv->ov_fb.base; u32 base = (u32)(unsigned long)vv->ov_fb.base;
struct saa7146_video_dma vdma1; struct saa7146_video_dma vdma1;
......
...@@ -788,7 +788,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, ...@@ -788,7 +788,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
case FE_DISHNETWORK_SEND_LEGACY_CMD: case FE_DISHNETWORK_SEND_LEGACY_CMD:
if (fe->ops->dishnetwork_send_legacy_command) { if (fe->ops->dishnetwork_send_legacy_command) {
err = fe->ops->dishnetwork_send_legacy_command(fe, (unsigned int) parg); err = fe->ops->dishnetwork_send_legacy_command(fe, (unsigned long) parg);
fepriv->state = FESTATE_DISEQC; fepriv->state = FESTATE_DISEQC;
fepriv->status = 0; fepriv->status = 0;
} else if (fe->ops->set_voltage) { } else if (fe->ops->set_voltage) {
...@@ -808,7 +808,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, ...@@ -808,7 +808,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
* initialization, so parg is 8 bits and does not * initialization, so parg is 8 bits and does not
* include the initialization or start bit * include the initialization or start bit
*/ */
unsigned int cmd = ((unsigned int) parg) << 1; unsigned int cmd = ((unsigned long) parg) << 1;
struct timeval nexttime; struct timeval nexttime;
struct timeval tv[10]; struct timeval tv[10];
int i; int i;
...@@ -855,7 +855,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, ...@@ -855,7 +855,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
case FE_ENABLE_HIGH_LNB_VOLTAGE: case FE_ENABLE_HIGH_LNB_VOLTAGE:
if (fe->ops->enable_high_lnb_voltage) if (fe->ops->enable_high_lnb_voltage)
err = fe->ops->enable_high_lnb_voltage(fe, (int) parg); err = fe->ops->enable_high_lnb_voltage(fe, (long) parg);
break; break;
case FE_SET_FRONTEND: { case FE_SET_FRONTEND: {
...@@ -934,7 +934,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, ...@@ -934,7 +934,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
break; break;
case FE_SET_FRONTEND_TUNE_MODE: case FE_SET_FRONTEND_TUNE_MODE:
fepriv->tune_mode_flags = (unsigned int) parg; fepriv->tune_mode_flags = (unsigned long) parg;
break; break;
}; };
......
...@@ -1296,9 +1296,9 @@ static int dvb_net_do_ioctl(struct inode *inode, struct file *file, ...@@ -1296,9 +1296,9 @@ static int dvb_net_do_ioctl(struct inode *inode, struct file *file,
if (!capable(CAP_SYS_ADMIN)) if (!capable(CAP_SYS_ADMIN))
return -EPERM; return -EPERM;
if ((unsigned int) parg >= DVB_NET_DEVICES_MAX) if ((unsigned long) parg >= DVB_NET_DEVICES_MAX)
return -EINVAL; return -EINVAL;
ret = dvb_net_remove_if(dvbnet, (unsigned int) parg); ret = dvb_net_remove_if(dvbnet, (unsigned long) parg);
if (!ret) if (!ret)
module_put(dvbdev->adapter->module); module_put(dvbdev->adapter->module);
return ret; return ret;
......
...@@ -623,13 +623,13 @@ static int bcm3510_download_firmware(struct dvb_frontend* fe) ...@@ -623,13 +623,13 @@ static int bcm3510_download_firmware(struct dvb_frontend* fe)
err("could not load firmware (%s): %d",BCM3510_DEFAULT_FIRMWARE,ret); err("could not load firmware (%s): %d",BCM3510_DEFAULT_FIRMWARE,ret);
return ret; return ret;
} }
deb_info("got firmware: %d\n",fw->size); deb_info("got firmware: %zd\n",fw->size);
b = fw->data; b = fw->data;
for (i = 0; i < fw->size;) { for (i = 0; i < fw->size;) {
addr = le16_to_cpu( *( (u16 *)&b[i] ) ); addr = le16_to_cpu( *( (u16 *)&b[i] ) );
len = le16_to_cpu( *( (u16 *)&b[i+2] ) ); len = le16_to_cpu( *( (u16 *)&b[i+2] ) );
deb_info("firmware chunk, addr: 0x%04x, len: 0x%04x, total length: 0x%04x\n",addr,len,fw->size); deb_info("firmware chunk, addr: 0x%04x, len: 0x%04x, total length: 0x%04zx\n",addr,len,fw->size);
if ((ret = bcm3510_write_ram(st,addr,&b[i+4],len)) < 0) { if ((ret = bcm3510_write_ram(st,addr,&b[i+4],len)) < 0) {
err("firmware download failed: %d\n",ret); err("firmware download failed: %d\n",ret);
return ret; return ret;
......
...@@ -112,7 +112,7 @@ static int or51211_load_firmware (struct dvb_frontend* fe, ...@@ -112,7 +112,7 @@ static int or51211_load_firmware (struct dvb_frontend* fe,
u8 tudata[585]; u8 tudata[585];
int i; int i;
dprintk("Firmware is %d bytes\n",fw->size); dprintk("Firmware is %zd bytes\n",fw->size);
/* Get eprom data */ /* Get eprom data */
tudata[0] = 17; tudata[0] = 17;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment