1. 11 May, 2012 2 commits
    • Paul Walmsley's avatar
      ARM: OMAP: OTG integration: fix compiler warning · 19b08b33
      Paul Walmsley authored
      Tony reported the following compile warning after commit
      eeb3711b ("ARM: OMAP2+: clean up some
      cppcheck warnings"):
      
      arch/arm/plat-omap/usb.c: In function 'omap_otg_init':
      arch/arm/plat-omap/usb.c:40: warning: unused variable 'status'
      
      This happens if CONFIG_ARCH_OMAP_OTG is set but
      CONFIG_USB_GADGET_OMAP, CONFIG_USB_OHCI_HCD,
      CONFIG_USB_OHCI_HCD_MODULE, and CONFIG_USB_OTG are all unset.
      
      Fix by localizing the status variable to the blocks that use it.
      
      Compile-tested only, with omap2plus_defconfig and omap2plus_defconfig
      with CONFIG_USB_OHCI_HCD and CONFIG_USB_OTG enabled.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      19b08b33
    • Paul Walmsley's avatar
      ARM: OMAP1: USB: fix ocpi_enable compile problem on non-1610 builds · 121e1a73
      Paul Walmsley authored
      Janusz Krzysztofik reported the following build break on OMAP1 builds that
      don't include CONFIG_ARCH_OMAP16XX:
      
        LD      .tmp_vmlinux1
      arch/arm/mach-omap1/built-in.o: In function `omap1_usb_init':
      lcd_dma.c:(.init.text+0x1420): undefined reference to `ocpi_enable'
      make: *** [.tmp_vmlinux1] Error 1
      
      This was caused by commit d3645d39
      ("ARM: OMAP1: OHCI: use platform_data fn ptr to enable OCPI bus").
      Fix by declaring an empty ocpi_enable() on non-16XX builds, which
      should work until the OCPI code is moved out to drivers/.
      
      Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com>
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      121e1a73
  2. 18 Apr, 2012 1 commit
  3. 17 Apr, 2012 1 commit
    • Paul Walmsley's avatar
      ARM: OMAP2+: clean up some cppcheck warnings · eeb3711b
      Paul Walmsley authored
      Resolve some warnings identified by cppcheck in arch/arm/mach-omap2:
      
          [arch/arm/mach-omap2/usb-tusb6010.c:129]: (style) Checking if unsigned variable 'tmp' is less than zero.
          [arch/arm/mach-omap2/prm_common.c:241]: (error) Possible null pointer dereference: irq_setup - otherwise it is redundant to check if irq_setup is null at line 247
          [arch/arm/mach-omap2/pm34xx.c:790]: (style) Variable 'per_clkdm' is assigned a value that is never used
          [arch/arm/mach-omap2/pm34xx.c:790]: (style) Variable 'core_clkdm' is assigned a value that is never used
          [arch/arm/mach-omap2/pm24xx.c:185]: (style) Variable 'only_idle' is assigned a value that is never used
          [arch/arm/mach-omap2/mux.c:254]: (error) Possible null pointer dereference: mux
          [arch/arm/mach-omap2/mux.c:258]: (error) Possible null pointer dereference: mux
          [arch/arm/mach-omap2/gpmc-onenand.c:178]: (style) Variable 'tick_ns' is assigned a value that is never used
          [arch/arm/mach-omap2/gpio.c:56]: (error) Possible null pointer dereference: pdata - otherwise it is redundant to check if pdata is null at line 57
          [arch/arm/mach-omap2/devices.c:45]: (style) Variable 'l' is assigned a value that is never used
          [arch/arm/mach-omap2/board-omap3evm.c:641] -> [arch/arm/mach-omap2/board-omap3evm.c:639]: (style) Found duplicate branches for if and else.
          [arch/arm/mach-omap2/am35xx-emac.c:95]: (style) Variable 'regval' is assigned a value that is never used
          [arch/arm/mach-omap2/devices.c:74]: (style) Variable 'l' is assigned a value that is never used
          [arch/arm/mach-omap2/pm34xx.c:277]: (style) Variable 'per_prev_state' is assigned a value that is never used
          [arch/arm/plat-omap/dmtimer.c:352]: (error) Possible null pointer dereference: timer - otherwise it is redundant to check if timer is null at line 354
          [arch/arm/plat-omap/omap_device.c:478]: (style) Variable 'c' is assigned a value that is never used
          [arch/arm/plat-omap/usb.c:42]: (style) Variable 'status' is assigned a value that is never used
          [arch/arm/mach-omap1/clock.c:197]: (style) Variable 'dpll1_rate' is assigned a value that is never used
          [arch/arm/mach-omap1/lcd_dma.c:60]: (style) struct or union member 'lcd_dma_info::size' is never used
          [arch/arm/mach-omap1/pm.c:572]: (style) Variable 'entry' is assigned a value that is never used
      
      Some of them are pretty good catches, such as gpio.c:56 and
      usb-tusb6010.c:129.
      
      Thanks to Jarkko Nikula for some comments on the sscanf() warnings.
      It seems that the kernel sscanf() ignores the field width anyway for the
      %d format, so those changes have been dropped from this second version.
      
      Thanks to Daniel Marjamäki <daniel.marjamaki@gmail.com> for pointing
      out that a variable was unnecessarily marked static in the
      board-omap3evm.c change.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
      Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
      Cc: Charulatha Varadarajan <charu@ti.com>
      Cc: Daniel Marjamäki <daniel.marjamaki@gmail.com>
      Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com>
      Reviewed-by: Charulatha Varadarajan <charu@ti.com> # for gpio.c
      eeb3711b
  4. 16 Apr, 2012 3 commits
    • Linus Torvalds's avatar
      Linux 3.4-rc3 · e816b57a
      Linus Torvalds authored
      e816b57a
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · 9a8e5d41
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Nothing too disasterous, the biggest thing being the removal of the
        regulator support for vcore in the AMBA driver; only one SoC was using
        this and it got broken during the last merge window, which then
        started causing problems for other people.  Mutual agreement was
        reached for it to be removed."
      
      * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: 7386/1: jump_label: fixup for rename to static_key
        ARM: 7384/1: ThumbEE: Disable userspace TEEHBR access for !CONFIG_ARM_THUMBEE
        ARM: 7382/1: mm: truncate memory banks to fit in 4GB space for classic MMU
        ARM: 7359/2: smp_twd: Only wait for reprogramming on active cpus
        ARM: 7383/1: nommu: populate vectors page from paging_init
        ARM: 7381/1: nommu: fix typo in mm/Kconfig
        ARM: 7380/1: DT: do not add a zero-sized memory property
        ARM: 7379/1: DT: fix atags_to_fdt() second call site
        ARM: 7366/3: amba: Remove AMBA level regulator support
        ARM: 7377/1: vic: re-read status register before dispatching each IRQ handler
        ARM: 7368/1: fault.c: correct how the tsk->[maj|min]_flt gets incremented
      9a8e5d41
    • Linus Torvalds's avatar
      x86-32: fix up strncpy_from_user() sign error · 12e993b8
      Linus Torvalds authored
      The 'max' range needs to be unsigned, since the size of the user address
      space is bigger than 2GB.
      
      We know that 'count' is positive in 'long' (that is checked in the
      caller), so we will truncate 'max' down to something that fits in a
      signed long, but before we actually do that, that comparison needs to be
      done in unsigned.
      
      Bug introduced in commit 92ae03f2 ("x86: merge 32/64-bit versions of
      'strncpy_from_user()' and speed it up").  On x86-64 you can't trigger
      this, since the user address space is much smaller than 63 bits, and on
      x86-32 it works in practice, since you would seldom hit the strncpy
      limits anyway.
      
      I had actually tested the corner-cases, I had only tested them on
      x86-64.  Besides, I had only worried about the case of a pointer *close*
      to the end of the address space, rather than really far away from it ;)
      
      This also changes the "we hit the user-specified maximum" to return
      'res', for the trivial reason that gcc seems to generate better code
      that way.  'res' and 'count' are the same in that case, so it really
      doesn't matter which one we return.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      12e993b8
  5. 15 Apr, 2012 12 commits
  6. 14 Apr, 2012 13 commits
  7. 13 Apr, 2012 8 commits