04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

23 Nov, 2012

6 commits

  • Replace kmemdup for kstrdup and cleanup related code.

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: Mauro Carvalho Chehab

    Peter Senna Tschudin
     
  • The function cx25821_sram_channel_setup_upstream_audio always return zero,
    so the return value is not saved any more.
    Convert a nonnegative error return code to a negative one, as returned
    elsewhere in the function.
    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)
    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: Mauro Carvalho Chehab

    Peter Senna Tschudin
     
  • Convert a nonnegative error return code to a negative one, as returned
    elsewhere in the function.
    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)
    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    While here, replace strlen()+kmemdup() to kstrdup().

    Signed-off-by: Peter Senna Tschudin
    Reviewed-by: walter harms
    Signed-off-by: Mauro Carvalho Chehab

    Peter Senna Tschudin
     
  • Convert a nonnegative error return code to a negative one, as returned
    elsewhere in the function.
    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)
    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: Mauro Carvalho Chehab

    Peter Senna Tschudin
     
  • Convert a nonnegative error return code to a negative one, as returned
    elsewhere in the function.
    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)
    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: Mauro Carvalho Chehab

    Peter Senna Tschudin
     
  • Convert a nonnegative error return code to a negative one, as returned
    elsewhere in the function.
    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)
    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: Mauro Carvalho Chehab

    Peter Senna Tschudin
     

22 Nov, 2012

1 commit

  • Convert a nonnegative error return code to a negative one, as returned
    elsewhere in the function.
    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)
    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: Mauro Carvalho Chehab

    Peter Senna Tschudin
     

28 Oct, 2012

15 commits

  • drivers/media/pci/bt8xx/bttv-driver.c:308:3: warning: initialized field overwritten [-Woverride-init]
    drivers/media/pci/bt8xx/bttv-driver.c:308:3: warning: (near initialization for 'bttv_tvnorms[0].cropcap.bounds.height') [-Woverride-init]
    drivers/media/pci/bt8xx/bttv-driver.c: In function 'bttv_remove':
    drivers/media/pci/bt8xx/bttv-driver.c:4467:29: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • drivers/media/pci/meye/meye.c:1948:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • 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

    Mauro Carvalho Chehab
     
  • get rid of a few warnings about empty body:
    drivers/media/pci/ngene/ngene-core.c:756:3: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
    drivers/media/pci/ngene/ngene-cards.c:429:5: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
    Those are due to some commented code.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • drivers/media/pci/cx88/cx88-mpeg.c: In function 'cx8802_mpeg_irq':
    drivers/media/pci/cx88/cx88-mpeg.c:419:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-mpeg.c: In function 'cx8802_irq':
    drivers/media/pci/cx88/cx88-mpeg.c:453:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-alsa.c: In function 'snd_cx88_create':
    drivers/media/pci/cx88/cx88-alsa.c:818:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-alsa.c:837:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-alsa.c: In function 'cx88_audio_initdev':
    drivers/media/pci/cx88/cx88-alsa.c:912:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-blackbird.c: In function 'blackbird_mbox_func':
    drivers/media/pci/cx88/cx88-blackbird.c:327:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-blackbird.c:333:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-blackbird.c:360:4: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-blackbird.c: In function 'blackbird_find_mailbox':
    drivers/media/pci/cx88/cx88-blackbird.c:421:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-blackbird.c: In function 'blackbird_load_firmware':
    drivers/media/pci/cx88/cx88-blackbird.c:444:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-blackbird.c:451:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-blackbird.c:453:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-blackbird.c:459:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-blackbird.c:466:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-blackbird.c:487:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-blackbird.c:492:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-blackbird.c:503:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-blackbird.c: In function 'blackbird_initialize_codec':
    drivers/media/pci/cx88/cx88-blackbird.c:560:4: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-blackbird.c:566:4: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    drivers/media/pci/cx88/cx88-blackbird.c:569:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • drivers/media/pci/cx88/cx88.h:97:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
    drivers/media/pci/cx88/cx88.h:103:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
    drivers/media/pci/cx88/cx88-core.c:649:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
    drivers/media/pci/cx88/cx88-core.c:654:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
    drivers/media/pci/cx88/cx88-core.c:659:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
    drivers/media/pci/cx88/cx88-core.c:664:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
    drivers/media/pci/cx88/cx88-core.c:684:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
    drivers/media/pci/cx88/cx88-core.c:695:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • drivers/media/pci/saa7164/saa7164-api.c:1489:5: warning: no previous prototype for 'saa7164_api_modify_gpio' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-api.c:168:5: warning: no previous prototype for 'saa7164_api_set_gop_size' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-api.c:622:5: warning: no previous prototype for 'saa7164_api_set_dif' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-api.c:825:5: warning: no previous prototype for 'saa7164_api_configure_port_vbi' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-api.c:861:5: warning: no previous prototype for 'saa7164_api_configure_port_mpeg2ts' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-api.c:895:5: warning: no previous prototype for 'saa7164_api_configure_port_mpeg2ps' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-api.c:928:5: warning: no previous prototype for 'saa7164_api_dump_subdevs' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-bus.c:109:6: warning: no previous prototype for 'saa7164_bus_dumpmsg' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-bus.c:84:6: warning: no previous prototype for 'saa7164_bus_verify' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-cmd.c:135:5: warning: no previous prototype for 'saa7164_cmd_dequeue' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-cmd.c:189:5: warning: no previous prototype for 'saa7164_cmd_set' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-cmd.c:262:5: warning: no previous prototype for 'saa7164_cmd_wait' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-cmd.c:26:5: warning: no previous prototype for 'saa7164_cmd_alloc_seqno' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-cmd.c:45:6: warning: no previous prototype for 'saa7164_cmd_free_seqno' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-cmd.c:57:6: warning: no previous prototype for 'saa7164_cmd_timeout_seqno' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-cmd.c:67:5: warning: no previous prototype for 'saa7164_cmd_timeout_get' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-encoder.c:1104:29: warning: no previous prototype for 'saa7164_enc_next_buf' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-encoder.c:1290:5: warning: no previous prototype for 'saa7164_g_chip_ident' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-encoder.c:1300:5: warning: no previous prototype for 'saa7164_g_register' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-encoder.c:1313:5: warning: no previous prototype for 'saa7164_s_register' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-fw.c:40:5: warning: no previous prototype for 'saa7164_dl_wait_ack' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-fw.c:56:5: warning: no previous prototype for 'saa7164_dl_wait_clr' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-fw.c:74:5: warning: no previous prototype for 'saa7164_downloadimage' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-vbi.c:1050:29: warning: no previous prototype for 'saa7164_vbi_next_buf' [-Wmissing-prototypes]
    drivers/media/pci/saa7164/saa7164-vbi.c:987:5: warning: no previous prototype for 'saa7164_vbi_fmt' [-Wmissing-prototypes]

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • drivers/media/pci/mantis/mantis_input.c:107:5: warning: no previous prototype for 'mantis_input_init' [-Wmissing-prototypes]
    drivers/media/pci/mantis/mantis_input.c:153:5: warning: no previous prototype for 'mantis_exit' [-Wmissing-prototypes]
    drivers/media/pci/mantis/mantis_uart.c:64:5: warning: no previous prototype for 'mantis_uart_read' [-Wmissing-prototypes]
    drivers/media/pci/mantis/mantis_vp1033.c:118:5: warning: no previous prototype for 'lgtdqcs001f_set_symbol_rate' [-Wmissing-prototypes]
    drivers/media/pci/mantis/mantis_vp1033.c:86:5: warning: no previous prototype for 'lgtdqcs001f_tuner_set' [-Wmissing-prototypes]

    Note: there is already a mantis_exit at the mantis driver. So,
    this should be renamed to mantis_input_exit.

    The mantis_input code is currently unused, as it doesn't implement the RC API
    right.

    Patches for it are sent for discussions, but were never
    accepted. So, while this is not fixed, the entire code inside
    mantis_input can simply be commented.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • drivers/media/pci/ivtv/ivtv-ioctl.c: In function 'ivtv_s_input':
    drivers/media/pci/ivtv/ivtv-ioctl.c:996:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

    Cc: Andy Walls
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • drivers/media/pci/ivtv/ivtv-alsa-main.c:208:5: warning: no previous prototype for 'ivtv_alsa_load' [-Wmissing-prototypes]
    drivers/media/pci/ivtv/ivtv-alsa-pcm.c:325:5: warning: no previous prototype for 'snd_ivtv_pcm_create' [-Wmissing-prototypes]
    drivers/media/pci/ivtv/ivtv-alsa-pcm.c:72:6: warning: no previous prototype for 'ivtv_alsa_announce_pcm_data' [-Wmissing-prototypes]
    drivers/media/pci/ivtv/ivtv-firmware.c:279:5: warning: no previous prototype for 'ivtv_firmware_restart' [-Wmissing-prototypes]
    drivers/media/pci/ivtv/ivtv-ioctl.c:1171:5: warning: no previous prototype for 'ivtv_s_std' [-Wmissing-prototypes]

    Cc: Andy Walls
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • drivers/media/pci/cx25821/cx25821-audio-upstream.c:136:5: warning: no previous prototype for 'cx25821_risc_buffer_upstream_audio' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-audio-upstream.c:200:6: warning: no previous prototype for 'cx25821_free_memory_audio' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-audio-upstream.c:259:5: warning: no previous prototype for 'cx25821_get_audio_data' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-audio-upstream.c:354:5: warning: no previous prototype for 'cx25821_openfile_audio' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-audio-upstream.c:47:5: warning: no previous prototype for 'cx25821_sram_channel_setup_upstream_audio' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-audio-upstream.c:493:5: warning: no previous prototype for 'cx25821_audio_upstream_irq' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-audio-upstream.c:637:5: warning: no previous prototype for 'cx25821_start_audio_dma_upstream' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-biffuncs.h:28:11: warning: no previous prototype for 'getBit' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-biffuncs.h:33:12: warning: no previous prototype for 'clearBitAtPos' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-biffuncs.h:38:12: warning: no previous prototype for 'setBitAtPos' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-i2c.c:332:6: warning: no previous prototype for 'cx25821_av_clk' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-video.c:294:5: warning: no previous prototype for 'cx25821_restart_video_queue' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-video.c:345:6: warning: no previous prototype for 'cx25821_vid_timeout' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-video-upstream.c:176:5: warning: no previous prototype for 'cx25821_risc_buffer_upstream' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-video-upstream.c:303:5: warning: no previous prototype for 'cx25821_get_frame' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-video-upstream.c:408:5: warning: no previous prototype for 'cx25821_openfile' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-video-upstream.c:489:5: warning: no previous prototype for 'cx25821_upstream_buffer_prepare' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-video-upstream.c:551:5: warning: no previous prototype for 'cx25821_video_upstream_irq' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-video-upstream.c:667:6: warning: no previous prototype for 'cx25821_set_pixelengine' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-video-upstream.c:699:5: warning: no previous prototype for 'cx25821_start_video_dma_upstream' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c:126:5: warning: no previous prototype for 'cx25821_risc_buffer_upstream_ch2' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c:258:5: warning: no previous prototype for 'cx25821_get_frame_ch2' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c:363:5: warning: no previous prototype for 'cx25821_openfile_ch2' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c:510:5: warning: no previous prototype for 'cx25821_video_upstream_irq_ch2' [-Wmissing-prototypes]
    drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c:650:5: warning: no previous prototype for 'cx25821_start_video_dma_upstream_ch2' [-Wmissing-prototypes]

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Change dprintk logic to avoid the following warning:
    drivers/media/pci/cx23885/cx23885-alsa.c: In function 'cx23885_audio_register':
    drivers/media/pci/cx23885/cx23885-alsa.c:515:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • drivers/media/pci/cx23885/altera-ci.c:266:5: warning: no previous prototype for 'altera_ci_op_cam' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:301:5: warning: no previous prototype for 'altera_ci_read_attribute_mem' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:307:5: warning: no previous prototype for 'altera_ci_write_attribute_mem' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:313:5: warning: no previous prototype for 'altera_ci_read_cam_ctl' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:319:5: warning: no previous prototype for 'altera_ci_write_cam_ctl' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:325:5: warning: no previous prototype for 'altera_ci_slot_reset' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:368:5: warning: no previous prototype for 'altera_ci_slot_shutdown' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:374:5: warning: no previous prototype for 'altera_ci_slot_ts_ctl' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:451:5: warning: no previous prototype for 'altera_poll_ci_slot_status' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:462:6: warning: no previous prototype for 'altera_hw_filt_release' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:584:5: warning: no previous prototype for 'altera_pid_feed_control' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:606:5: warning: no previous prototype for 'altera_ci_start_feed' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:613:5: warning: no previous prototype for 'altera_ci_stop_feed' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:620:5: warning: no previous prototype for 'altera_ci_start_feed_1' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:625:5: warning: no previous prototype for 'altera_ci_stop_feed_1' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:630:5: warning: no previous prototype for 'altera_ci_start_feed_2' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:635:5: warning: no previous prototype for 'altera_ci_stop_feed_2' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/altera-ci.c:640:5: warning: no previous prototype for 'altera_hw_filt_init' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:123:5: warning: no previous prototype for 'netup_write_i2c' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:150:5: warning: no previous prototype for 'netup_ci_get_mem' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:169:5: warning: no previous prototype for 'netup_ci_op_cam' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:239:5: warning: no previous prototype for 'netup_ci_read_attribute_mem' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:245:5: warning: no previous prototype for 'netup_ci_write_attribute_mem' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:251:5: warning: no previous prototype for 'netup_ci_read_cam_ctl' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:257:5: warning: no previous prototype for 'netup_ci_write_cam_ctl' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:263:5: warning: no previous prototype for 'netup_ci_slot_reset' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:292:5: warning: no previous prototype for 'netup_ci_slot_shutdown' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:298:5: warning: no previous prototype for 'netup_ci_set_irq' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:319:5: warning: no previous prototype for 'netup_ci_slot_ts_ctl' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:375:5: warning: no previous prototype for 'netup_ci_slot_status' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:402:5: warning: no previous prototype for 'netup_poll_ci_slot_status' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:415:5: warning: no previous prototype for 'netup_ci_init' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:520:6: warning: no previous prototype for 'netup_ci_exit' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cimax2.c:90:5: warning: no previous prototype for 'netup_read_i2c' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23885-av.c:26:6: warning: no previous prototype for 'cx23885_av_work_handler' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23885-cards.c:1430:5: warning: no previous prototype for 'netup_jtag_io' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23885-core.c:306:6: warning: no previous prototype for 'cx23885_irq_add' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23885-dvb.c:662:5: warning: no previous prototype for 'netup_altera_fpga_rw' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23885-f300.c:150:5: warning: no previous prototype for 'f300_set_voltage' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23885-input.c:249:5: warning: no previous prototype for 'cx23885_input_init' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23885-input.c:353:6: warning: no previous prototype for 'cx23885_input_fini' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23885-input.c:76:6: warning: no previous prototype for 'cx23885_input_rx_work_handler' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23885-ioctl.c:134:5: warning: no previous prototype for 'cx23885_g_register' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23885-ioctl.c:185:5: warning: no previous prototype for 'cx23885_s_register' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23885-ioctl.c:27:5: warning: no previous prototype for 'cx23885_g_chip_ident' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23885-ir.c:101:6: warning: no previous prototype for 'cx23885_ir_tx_v4l2_dev_notify' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23885-ir.c:37:6: warning: no previous prototype for 'cx23885_ir_rx_work_handler' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23885-ir.c:60:6: warning: no previous prototype for 'cx23885_ir_tx_work_handler' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23885-ir.c:76:6: warning: no previous prototype for 'cx23885_ir_rx_v4l2_dev_notify' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23888-ir.c:1203:5: warning: no previous prototype for 'cx23888_ir_probe' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/cx23888-ir.c:1253:5: warning: no previous prototype for 'cx23888_ir_remove' [-Wmissing-prototypes]
    drivers/media/pci/cx23885/netup-init.c:109:6: warning: no previous prototype for 'netup_initialize' [-Wmissing-prototypes]

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • drivers/media/pci/cx18/cx18-alsa-main.c:200:5: warning: no previous prototype for 'cx18_alsa_load' [-Wmissing-prototypes]
    drivers/media/pci/cx18/cx18-alsa-pcm.c:325:5: warning: no previous prototype for 'snd_cx18_pcm_create' [-Wmissing-prototypes]
    drivers/media/pci/cx18/cx18-alsa-pcm.c:72:6: warning: no previous prototype for 'cx18_alsa_announce_pcm_data' [-Wmissing-prototypes]
    drivers/media/pci/cx18/cx18-streams.c:100:6: warning: no previous prototype for 'cx18_dma_free' [-Wmissing-prototypes]

    Cc: Andy Walls
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

27 Oct, 2012

1 commit

  • The RC_TYPE_* defines are currently used both where a single protocol is
    expected and where a bitmap of protocols is expected.

    Functions like rc_keydown() and functions which add/remove entries to the
    keytable want a single protocol. Future userspace APIs would also
    benefit from numeric protocols (rather than bitmap ones). Keytables are
    smaller if they can use a small(ish) integer rather than a bitmap.

    Other functions or struct members (e.g. allowed_protos,
    enabled_protocols, etc) accept multiple protocols and need a bitmap.

    Using different types reduces the risk of programmer error. Using a
    protocol enum whereever possible also makes for a more future-proof
    user-space API as we don't need to worry about a sufficient number of
    bits being available (e.g. in structs used for ioctl() calls).

    The use of both a number and a corresponding bit is dalso one in e.g.
    the input subsystem as well (see all the references to set/clear bit when
    changing keytables for example).

    This patch separate the different usages in preparation for
    upcoming patches.

    Where a single protocol is expected, enum rc_type is used; where one or more
    protocol(s) are expected, something like u64 is used.

    The patch has been rewritten so that the format of the sysfs "protocols"
    file is no longer altered (at the loss of some detail). The file itself
    should probably be deprecated in the future though.

    Signed-off-by: David Härdeman
    Cc: Andy Walls
    Cc: Maxim Levitsky
    Cc: Antti Palosaari
    Cc: Mike Isely
    Signed-off-by: Mauro Carvalho Chehab

    David Härdeman
     

26 Oct, 2012

2 commits


19 Oct, 2012

1 commit


12 Oct, 2012

2 commits

  • Pull second set of media updates from Mauro Carvalho Chehab:
    "Despite its size, most of the stuff here is trivial. This series
    contains:

    - s5p-mfc: additions at the driver and at the core to support H.264
    hardware codec;
    - Some improvements at s5p and davinci embedded drivers;
    - Some V4L2 compliance fixes applied on a few drivers;
    - Several random trivial patches, including several fixes and a few
    new board support additions;

    Notes:

    1) Some Exynos media patches were dependent on some -arm fixes that
    got merged on changeset 782cd9e. That's why this pull request is
    based that changeset.

    2) As promised, I reviewed the pending VB2 DMABUF series.

    While setting a test environment, it was noticed that the upstream
    support for Samsung Exynos 4 boards (smdk310 and Origen) are
    broken upstream, likely due to regressions: both defconfigs are
    wrong and regulator settings for both boards are broken. That,
    allied with some bug at the dummy regulator driver, causes OOPSes
    during boot time.

    Long story short: even fixing the above, the proposed patches
    OOPSed when running the DMABUF test. Not sure yet if the OOPSes
    are due to some other undetected regressions, or due to some bug
    on the patches.

    Due to the above, DMABUF patches for vb2 got NACKed for 3.7."

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (109 commits)
    [media] m5mols: Add missing #include
    [media] stk1160: Add support for S-Video input
    Revert "[media] omap3isp: Replace cpu_is_omap3630() with ISP revision check"
    [media] dvb: LNA implementation changes
    [media] v4l2-ioctl: fix W=1 warnings
    [media] v4l2-ioctl: add blocks check for VIDIOC_SUBDEV_G/S_EDID
    [media] omap3isp: Fix compilation error in ispreg.h
    [media] rc-msi-digivox-ii: Add full scan keycodes
    [media] cx25821: testing the wrong variable
    [media] tda18271-common: hold the I2C adapter during write transfers
    [media] ds3000: add module parameter to force firmware upload
    [media] drivers/media: Remove unnecessary semicolon
    [media] winbond: remove space from driver name
    [media] iguanair: cannot send data from the stack
    [media] omap3isp: Replace cpu_is_omap3630() with ISP revision check
    [media] dvb-usb: print small buffers via %*ph
    [media] uvc: Add return code check at vb2_queue_init()
    [media] em28xx: Replace memcpy with struct assignment
    [media] bt8xx: Add video4linux control V4L2_CID_COLOR_KILLER
    [media] mem2mem_testdev: Use devm_kzalloc() in probe
    ...

    Conflicts:
    arch/arm/mach-davinci/include/mach/da8xx.h

    Linus Torvalds
     
  • Applied on the top of changeset 782cd9e, as some of those patches
    depend on some fixes that went via -arm tree.

    * staging/for_v3.7: (109 commits)
    [media] m5mols: Add missing #include
    [media] stk1160: Add support for S-Video input
    Revert "[media] omap3isp: Replace cpu_is_omap3630() with ISP revision check"
    [media] dvb: LNA implementation changes
    [media] v4l2-ioctl: fix W=1 warnings
    [media] v4l2-ioctl: add blocks check for VIDIOC_SUBDEV_G/S_EDID
    [media] omap3isp: Fix compilation error in ispreg.h
    [media] rc-msi-digivox-ii: Add full scan keycodes
    [media] cx25821: testing the wrong variable
    [media] tda18271-common: hold the I2C adapter during write transfers
    [media] ds3000: add module parameter to force firmware upload
    [media] drivers/media: Remove unnecessary semicolon
    [media] winbond: remove space from driver name
    [media] iguanair: cannot send data from the stack
    [media] omap3isp: Replace cpu_is_omap3630() with ISP revision check
    [media] dvb-usb: print small buffers via %*ph
    [media] uvc: Add return code check at vb2_queue_init()
    [media] em28xx: Replace memcpy with struct assignment
    [media] bt8xx: Add video4linux control V4L2_CID_COLOR_KILLER
    [media] mem2mem_testdev: Use devm_kzalloc() in probe
    ...

    Mauro Carvalho Chehab
     

09 Oct, 2012

1 commit

  • A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA,
    currently it lost original meaning but still has some effects:

    | effect | alternative flags
    -+------------------------+---------------------------------------------
    1| account as reserved_vm | VM_IO
    2| skip in core dump | VM_IO, VM_DONTDUMP
    3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
    4| do not mlock | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP

    This patch removes reserved_vm counter from mm_struct. Seems like nobody
    cares about it, it does not exported into userspace directly, it only
    reduces total_vm showed in proc.

    Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP.

    remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP.
    remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP.

    [akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup]
    Signed-off-by: Konstantin Khlebnikov
    Cc: Alexander Viro
    Cc: Carsten Otte
    Cc: Chris Metcalf
    Cc: Cyrill Gorcunov
    Cc: Eric Paris
    Cc: H. Peter Anvin
    Cc: Hugh Dickins
    Cc: Ingo Molnar
    Cc: James Morris
    Cc: Jason Baron
    Cc: Kentaro Takeda
    Cc: Matt Helsley
    Cc: Nick Piggin
    Cc: Oleg Nesterov
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Suresh Siddha
    Cc: Tetsuo Handa
    Cc: Venkatesh Pallipadi
    Acked-by: Linus Torvalds
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Konstantin Khlebnikov
     

07 Oct, 2012

3 commits

  • ->input_filename could be NULL here. The intent was to test
    ->_filename.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Mauro Carvalho Chehab

    Dan Carpenter
     
  • A simplified version of the semantic patch that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)
    //
    @r1@
    statement S;
    position p,p1;
    @@
    S@p1;@p
    @script:python r2@
    p << r1.p;
    p1 << r1.p1;
    @@
    if p[0].line != p1[0].line_end:
    cocci.include_match(False)
    @@
    position r1.p;
    @@
    -;@p
    //

    [mchehab@redhat.com: some hunks got bitroted; applied only the
    ones that succeeds]
    Signed-off-by: Peter Senna Tschudin
    [crope@iki.fi: For my drivers a8293, af9013, af9015, af9035]
    Acked-by: Antti Palosaari
    Reviewed-by: Antti Palosaari
    Signed-off-by: Mauro Carvalho Chehab

    Peter Senna Tschudin
     
  • Pull media updates from Mauro Carvalho Chehab:
    "The first part of the media updates for Kernel 3.7.

    This series contain:

    - A major tree renaming patch series: now, drivers are organized
    internally by their used bus, instead of by V4L2 and/or DVB API,
    providing a cleaner driver location for hybrid drivers that
    implement both APIs, and allowing to cleanup the Kconfig items and
    make them more intuitive for the end user;

    - Media Kernel developers are typically very lazy with their duties
    of keeping the MAINTAINERS entries for their drivers updated. As
    now the tree is more organized, we're doing an effort to add/update
    those entries for the drivers that aren't currently orphan;

    - Several DVB USB drivers got moved to a new DVB USB v2 core; the new
    core fixes several bugs (as the existing one that got bitroted).
    Now, suspend/resume finally started to work fine (at least with
    some devices - we should expect more work with regards to it);

    - added multistream support for DVB-T2, and unified the API for
    DVB-S2 and ISDB-S. Backward binary support is preserved;

    - as usual, a few new drivers, some V4L2 core improvements and lots
    of drivers improvements and fixes.

    There are some points to notice on this series:

    1) you should expect a trivial merge conflict on your tree, with the
    removal of Documentation/feature-removal-schedule.txt: this series
    would be adding two additional entries there. I opted to not
    rebase it due to this recent change;

    2) With regards to the PCTV 520e udev-related breakage, I opted to
    fix it in a way that the patches can be backported to 3.5 even
    without your firmware fix patch. This way, Greg doesn't need to
    rush backporting your patch (as there are still the firmware cache
    and firmware path customization issues to be addressed there).

    I'll send later a patch (likely after the end of the merge window)
    reverting the rest of the DRX-K async firmware request, fully
    restoring its original behaviour to allow media drivers to
    initialize everything serialized as before for 3.7 and upper.

    3) I'm planning to work on this weekend to test the DMABUF patches
    for V4L2. The patches are on my queue for several Kernel cycles,
    but, up to now, there is/was no way to test the series locally.

    I have some concerns about this particular changeset with regards
    to security issues, and with regards to the replacement of the old
    VIDIOC_OVERLAY ioctl's that is broken on modern systems, due to
    GPU drivers change. The Overlay API allows direct PCI2PCI
    transfers from a media capture card into the GPU framebuffer, but
    its API is crappy. Also, the only existing X11 driver that
    implements it requires a XV extension that is not available
    anymore on modern drivers. The DMABUF can do the same thing, but
    with it is promising to be a properly-designed API. If I can
    successfully test this series and be happy with it, I should be
    asking you to pull them next week."

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (717 commits)
    em28xx: regression fix: use DRX-K sync firmware requests on em28xx
    drxk: allow loading firmware synchrousnously
    em28xx: Make all em28xx extensions to be initialized asynchronously
    [media] tda18271: properly report read errors in tda18271_get_id
    [media] tda18271: delay IR & RF calibration until init() if delay_cal is set
    [media] MAINTAINERS: add Michael Krufky as tda827x maintainer
    [media] MAINTAINERS: add Michael Krufky as tda8290 maintainer
    [media] MAINTAINERS: add Michael Krufky as cxusb maintainer
    [media] MAINTAINERS: add Michael Krufky as lg2160 maintainer
    [media] MAINTAINERS: add Michael Krufky as lgdt3305 maintainer
    [media] MAINTAINERS: add Michael Krufky as mxl111sf maintainer
    [media] MAINTAINERS: add Michael Krufky as mxl5007t maintainer
    [media] MAINTAINERS: add Michael Krufky as tda18271 maintainer
    [media] s5p-tv: Report only multi-plane capabilities in vidioc_querycap
    [media] s5p-mfc: Fix misplaced return statement in s5p_mfc_suspend()
    [media] exynos-gsc: Add missing static storage class specifiers
    [media] exynos-gsc: Remove header file inclusion
    [media] s5p-fimc: Fix incorrect condition in fimc_lite_reqbufs()
    [media] s5p-tv: Fix potential NULL pointer dereference error
    [media] s5k6aa: Fix possible NULL pointer dereference
    ...

    Linus Torvalds
     

06 Oct, 2012

3 commits


02 Oct, 2012

4 commits