1. 30 4月, 2013 1 次提交
  2. 04 4月, 2013 10 次提交
  3. 02 4月, 2013 19 次提交
  4. 14 3月, 2013 1 次提交
    • R
      ARM: OMAP: use consistent error checking · 71856843
      Russell King 提交于
      Consistently check errors using the usual method used in the kernel
      for much of its history.  For instance:
      
      int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t)
      {
      	int div;
      	div = gpmc_calc_divider(t->sync_clk);
      	if (div < 0)
      		return div;
      static int gpmc_set_async_mode(int cs, struct gpmc_timings *t)
      {
      ...
      	return gpmc_cs_set_timings(cs, t);
      
      .....
      	ret = gpmc_set_async_mode(gpmc_onenand_data->cs, &t);
      	if (IS_ERR_VALUE(ret))
      		return ret;
      
      So, gpmc_cs_set_timings() thinks any negative return value is an error,
      but where we check that in higher levels, only a limited range are
      errors...
      
      There is only _one_ use of IS_ERR_VALUE() in arch/arm which is really
      appropriate, and that is in arch/arm/include/asm/syscall.h:
      
      static inline long syscall_get_error(struct task_struct *task,
      				     struct pt_regs *regs)
      {
      	unsigned long error = regs->ARM_r0;
      	return IS_ERR_VALUE(error) ? error : 0;
      }
      
      because this function really does have to differentiate between error
      return values and addresses which look like negative numbers (eg, from
      mmap()).
      
      So, here's a patch to remove them from OMAP, except for the above.
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      71856843
  5. 05 3月, 2013 1 次提交
  6. 24 2月, 2013 3 次提交
    • R
      ARM: cleanup: OMAP hwmod error checking · 4d485661
      Russell King 提交于
      omap_hwmod_lookup() only returns NULL on error, never an error pointer.
      Checking the returned pointer using IS_ERR_OR_NULL() is needless
      overhead.  Use a simple !ptr check instead.
      
      OMAP devices (oh->od) always have a valid platform device attached (see
      omap_device_alloc()) so there's no point validating the platform device
      pointer (we will have already oopsed long before if this is not the
      case here.)
      
      Lastly, oh->od is only ever NULL or a valid omap device pointer - 'oh'
      comes from the statically declared hwmod tables, and the pointer is
      only filled in by omap_device_alloc() at a point where the omap device
      pointer must be valid.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4d485661
    • R
      ARM: cleanup: pwrdm_can_ever_lose_context() checking · 62f0f39b
      Russell King 提交于
      pwrdm_can_ever_lose_context() is only ever called from the OMAP GPIO
      code, and only with a pointer returned from omap_hwmod_get_pwrdm().
      omap_hwmod_get_pwrdm() only ever returns NULL on error, so using
      IS_ERR_OR_NULL() to validate the passed pointer is silly.  Use a
      simpler !ptr check instead.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      62f0f39b
    • R
      ARM: cleanup: debugfs error handling · d808aa69
      Russell King 提交于
      Debugfs functions return NULL when they fail, or an error pointer
      when not configured.  The intention behind the error pointer is that
      it appears as a valid pointer to the caller, and so the caller
      continues inspite of debugfs not being available.
      
      Debugfs failure should only ever be checked with (!ptr) and not the
      IS_ERR*() functions.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      d808aa69
  7. 15 2月, 2013 1 次提交
    • A
      ARM: omap2: include linux/errno.h in hwmod_reset · 55ccb1a8
      Arnd Bergmann 提交于
      The newly created omap_hwmod_reset.c is missing an
      include of linux/errno.h in commit c02060d8 "ARM:
      OMAP4+: AESS: enable internal auto-gating during
      initial setup". It still works in omap2_defconfig,
      but not in all other combinations.
      
      Without this patch, building allmodconfig results in:
      
      arch/arm/mach-omap2/omap_hwmod_reset.c: In function 'omap_hwmod_aess_preprogram':
      arch/arm/mach-omap2/omap_hwmod_reset.c:47:11: error: 'EINVAL' undeclared (first use in this function)
      arch/arm/mach-omap2/omap_hwmod_reset.c:47:11: note: each undeclared identifier is reported only once for each function it appears in
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Sebastien Guiriec <s-guiriec@ti.com>
      55ccb1a8
  8. 14 2月, 2013 2 次提交
  9. 13 2月, 2013 1 次提交
    • P
      ARM: OMAP2+: fix some omap_device_build() calls that aren't compiled by default · 6efc3fe0
      Paul Walmsley 提交于
      Commit c1d1cd59 ("ARM: OMAP2+:
      omap_device: remove obsolete pm_lats and early_device code") missed a
      few omap_device_build() calls that aren't included as part of the default
      OMAP2+ Kconfig, omap2plus_defconfig.
      
      Ideally, all devices that are present on the SoC should be created by
      default, and only the corresponding device driver should be configured
      or deconfigured in Kconfig.  This allows drivers to be built as
      modules and loaded later, even if they weren't part of the original
      kernel build.  Unfortunately, we're not quite there yet.
      
      Thanks to Tony Lindgren for reporting this, found during his
      randconfig tests.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      6efc3fe0
  10. 11 2月, 2013 1 次提交