diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-04-20 18:11:30 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 11:57:44 -0400 |
commit | 1f71baef3edd8ba27f38f92da457950e52d88b5f (patch) | |
tree | 21b9c2b1be6d767731a1652d29fa8e3b7de162be /drivers/media/IR/imon.c | |
parent | 3fe29c897272b18e18663832c43942c3936dffe6 (diff) |
V4L/DVB: irmon: Cleanup some warning noise
Driver is not properly initializing u64 constants on 32 bit systems:
drivers/media/IR/imon.c:301: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:302: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:304: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:305: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:308: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:309: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:310: warning: integer constant is too large for ‘long’ type
Fix also a few troubles at error printk handling:
drivers/media/IR/imon.c: In function ‘imon_init_intf0’:
drivers/media/IR/imon.c:1909: warning: ‘ret’ may be used uninitialized in this function
drivers/media/IR/imon.c: In function ‘imon_init_intf1’:
drivers/media/IR/imon.c:1989: warning: ‘ret’ may be used uninitialized in this function
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR/imon.c')
-rw-r--r-- | drivers/media/IR/imon.c | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c index 170fb9f2ca26..d941b98eed3e 100644 --- a/drivers/media/IR/imon.c +++ b/drivers/media/IR/imon.c | |||
@@ -286,28 +286,28 @@ static const struct { | |||
286 | u64 hw_code; | 286 | u64 hw_code; |
287 | u32 keycode; | 287 | u32 keycode; |
288 | } imon_panel_key_table[] = { | 288 | } imon_panel_key_table[] = { |
289 | { 0x000000000f00ffee, KEY_PROG1 }, /* Go */ | 289 | { 0x000000000f00ffeell, KEY_PROG1 }, /* Go */ |
290 | { 0x000000001f00ffee, KEY_AUDIO }, | 290 | { 0x000000001f00ffeell, KEY_AUDIO }, |
291 | { 0x000000002000ffee, KEY_VIDEO }, | 291 | { 0x000000002000ffeell, KEY_VIDEO }, |
292 | { 0x000000002100ffee, KEY_CAMERA }, | 292 | { 0x000000002100ffeell, KEY_CAMERA }, |
293 | { 0x000000002700ffee, KEY_DVD }, | 293 | { 0x000000002700ffeell, KEY_DVD }, |
294 | { 0x000000002300ffee, KEY_TV }, | 294 | { 0x000000002300ffeell, KEY_TV }, |
295 | { 0x000000000500ffee, KEY_PREVIOUS }, | 295 | { 0x000000000500ffeell, KEY_PREVIOUS }, |
296 | { 0x000000000700ffee, KEY_REWIND }, | 296 | { 0x000000000700ffeell, KEY_REWIND }, |
297 | { 0x000000000400ffee, KEY_STOP }, | 297 | { 0x000000000400ffeell, KEY_STOP }, |
298 | { 0x000000003c00ffee, KEY_PLAYPAUSE }, | 298 | { 0x000000003c00ffeell, KEY_PLAYPAUSE }, |
299 | { 0x000000000800ffee, KEY_FASTFORWARD }, | 299 | { 0x000000000800ffeell, KEY_FASTFORWARD }, |
300 | { 0x000000000600ffee, KEY_NEXT }, | 300 | { 0x000000000600ffeell, KEY_NEXT }, |
301 | { 0x000000010000ffee, KEY_RIGHT }, | 301 | { 0x000000010000ffeell, KEY_RIGHT }, |
302 | { 0x000001000000ffee, KEY_LEFT }, | 302 | { 0x000001000000ffeell, KEY_LEFT }, |
303 | { 0x000000003d00ffee, KEY_SELECT }, | 303 | { 0x000000003d00ffeell, KEY_SELECT }, |
304 | { 0x000100000000ffee, KEY_VOLUMEUP }, | 304 | { 0x000100000000ffeell, KEY_VOLUMEUP }, |
305 | { 0x010000000000ffee, KEY_VOLUMEDOWN }, | 305 | { 0x010000000000ffeell, KEY_VOLUMEDOWN }, |
306 | { 0x000000000100ffee, KEY_MUTE }, | 306 | { 0x000000000100ffeell, KEY_MUTE }, |
307 | /* iMON Knob values */ | 307 | /* iMON Knob values */ |
308 | { 0x000100ffffffffee, KEY_VOLUMEUP }, | 308 | { 0x000100ffffffffeell, KEY_VOLUMEUP }, |
309 | { 0x010000ffffffffee, KEY_VOLUMEDOWN }, | 309 | { 0x010000ffffffffeell, KEY_VOLUMEDOWN }, |
310 | { 0x000008ffffffffee, KEY_MUTE }, | 310 | { 0x000008ffffffffeell, KEY_MUTE }, |
311 | }; | 311 | }; |
312 | 312 | ||
313 | /* to prevent races between open() and disconnect(), probing, etc */ | 313 | /* to prevent races between open() and disconnect(), probing, etc */ |
@@ -1906,7 +1906,7 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf) | |||
1906 | struct urb *tx_urb; | 1906 | struct urb *tx_urb; |
1907 | struct device *dev = &intf->dev; | 1907 | struct device *dev = &intf->dev; |
1908 | struct usb_host_interface *iface_desc; | 1908 | struct usb_host_interface *iface_desc; |
1909 | int ret; | 1909 | int ret = -ENOMEM; |
1910 | 1910 | ||
1911 | ictx = kzalloc(sizeof(struct imon_context), GFP_KERNEL); | 1911 | ictx = kzalloc(sizeof(struct imon_context), GFP_KERNEL); |
1912 | if (!ictx) { | 1912 | if (!ictx) { |
@@ -1938,9 +1938,11 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf) | |||
1938 | ictx->vendor = le16_to_cpu(ictx->usbdev_intf0->descriptor.idVendor); | 1938 | ictx->vendor = le16_to_cpu(ictx->usbdev_intf0->descriptor.idVendor); |
1939 | ictx->product = le16_to_cpu(ictx->usbdev_intf0->descriptor.idProduct); | 1939 | ictx->product = le16_to_cpu(ictx->usbdev_intf0->descriptor.idProduct); |
1940 | 1940 | ||
1941 | ret = -ENODEV; | ||
1941 | iface_desc = intf->cur_altsetting; | 1942 | iface_desc = intf->cur_altsetting; |
1942 | if (!imon_find_endpoints(ictx, iface_desc)) | 1943 | if (!imon_find_endpoints(ictx, iface_desc)) { |
1943 | goto find_endpoint_failed; | 1944 | goto find_endpoint_failed; |
1945 | } | ||
1944 | 1946 | ||
1945 | ictx->idev = imon_init_idev(ictx); | 1947 | ictx->idev = imon_init_idev(ictx); |
1946 | if (!ictx->idev) { | 1948 | if (!ictx->idev) { |
@@ -1986,12 +1988,11 @@ static struct imon_context *imon_init_intf1(struct usb_interface *intf, | |||
1986 | { | 1988 | { |
1987 | struct urb *rx_urb; | 1989 | struct urb *rx_urb; |
1988 | struct usb_host_interface *iface_desc; | 1990 | struct usb_host_interface *iface_desc; |
1989 | int ret; | 1991 | int ret = -ENOMEM; |
1990 | 1992 | ||
1991 | rx_urb = usb_alloc_urb(0, GFP_KERNEL); | 1993 | rx_urb = usb_alloc_urb(0, GFP_KERNEL); |
1992 | if (!rx_urb) { | 1994 | if (!rx_urb) { |
1993 | err("%s: usb_alloc_urb failed for IR urb", __func__); | 1995 | err("%s: usb_alloc_urb failed for IR urb", __func__); |
1994 | ret = -ENOMEM; | ||
1995 | goto rx_urb_alloc_failed; | 1996 | goto rx_urb_alloc_failed; |
1996 | } | 1997 | } |
1997 | 1998 | ||
@@ -2007,6 +2008,7 @@ static struct imon_context *imon_init_intf1(struct usb_interface *intf, | |||
2007 | ictx->dev_present_intf1 = 1; | 2008 | ictx->dev_present_intf1 = 1; |
2008 | ictx->rx_urb_intf1 = rx_urb; | 2009 | ictx->rx_urb_intf1 = rx_urb; |
2009 | 2010 | ||
2011 | ret = -ENODEV; | ||
2010 | iface_desc = intf->cur_altsetting; | 2012 | iface_desc = intf->cur_altsetting; |
2011 | if (!imon_find_endpoints(ictx, iface_desc)) | 2013 | if (!imon_find_endpoints(ictx, iface_desc)) |
2012 | goto find_endpoint_failed; | 2014 | goto find_endpoint_failed; |