1. 14 6月, 2012 1 次提交
  2. 17 5月, 2012 1 次提交
  3. 16 5月, 2012 1 次提交
    • A
      staging: android: persistent_ram: Prepare for modular builds · 7dd8e9be
      Anton Vorontsov 提交于
      This is a transition patch to keep things bisectable, just moves
      some routines under '#ifndef MODULE'. The code inside the #ifndef
      will go away soon, but so far we must support pstore and ram_console.
      
      So, we are about to use persistent_ram with pstore, with the ability
      to compile persistent_ram routines as modules. Some parts of
      persistent_ram uses memblock_reserve() routine, which is should be
      only used built-in code, and thus it is not exported.
      
      These persistent_ram bits are only used by Android's ram_console,
      which is always built-in.
      
      Without this patch, we won't able to compile persistent_ram as a
      module:
      
      ERROR: "memblock_reserve" [fs/pstore/ramoops.ko] undefined!
      make[1]: *** [__modpost] Error 1
      make: *** [modules] Error 2
      
      (As alternative, we could export memblock_reserve, but the thing
      is: we won't need it later.)
      Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7dd8e9be
  4. 14 5月, 2012 7 次提交
  5. 13 4月, 2012 1 次提交
    • J
      staging: android: fix mem leaks in __persistent_ram_init() · 474a8988
      Jesper Juhl 提交于
      If, in __persistent_ram_init(), the call to
      persistent_ram_buffer_init() fails or the call to
      persistent_ram_init_ecc() fails then we fail to free the memory we
      allocated to 'prz' with kzalloc() - thus leaking it.
      
      To prevent the leaks I consolidated all error exits from the function
      at a 'err:' label at the end and made all error cases jump to that
      label where we can then make sure we always free 'prz'. This is safe
      since all the situations where the code bails out happen before 'prz'
      has been stored anywhere and although we'll do a redundant kfree(NULL)
      call in the case of kzalloc() itself failing that's OK since kfree()
      deals gracefully with NULL pointers and I felt it was more important
      to keep all error exits at a single location than to avoid that one
      harmless/redundant kfree() on a error path.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Acked-by: NColin Cross <ccross@android.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      474a8988
  6. 11 4月, 2012 1 次提交
    • R
      staging: fix android persistent_ram printk formats · f56d711b
      Randy Dunlap 提交于
      Fix printk format warnings in android/persistent_ram.c:
      
      drivers/staging/android/persistent_ram.c:426:4: warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'
      drivers/staging/android/persistent_ram.c:426:4: warning: format '%ld' expects type 'long int', but argument 3 has type 'size_t'
      drivers/staging/android/persistent_ram.c:430:4: warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'
      drivers/staging/android/persistent_ram.c:430:4: warning: format '%ld' expects type 'long int', but argument 3 has type 'size_t'
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Cc: Brian Swetland <swetland@google.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f56d711b
  7. 09 3月, 2012 5 次提交