1
0
Fork 0
alistair23-linux/drivers/clk/ti
Mike Rapoport 8a7f97b902 treewide: add checks for the return value of memblock_alloc*()
Add check for the return value of memblock_alloc*() functions and call
panic() in case of error.  The panic message repeats the one used by
panicing memblock allocators with adjustment of parameters to include
only relevant ones.

The replacement was mostly automated with semantic patches like the one
below with manual massaging of format strings.

  @@
  expression ptr, size, align;
  @@
  ptr = memblock_alloc(size, align);
  + if (!ptr)
  + 	panic("%s: Failed to allocate %lu bytes align=0x%lx\n", __func__, size, align);

[anders.roxell@linaro.org: use '%pa' with 'phys_addr_t' type]
  Link: http://lkml.kernel.org/r/20190131161046.21886-1-anders.roxell@linaro.org
[rppt@linux.ibm.com: fix format strings for panics after memblock_alloc]
  Link: http://lkml.kernel.org/r/1548950940-15145-1-git-send-email-rppt@linux.ibm.com
[rppt@linux.ibm.com: don't panic if the allocation in sparse_buffer_init fails]
  Link: http://lkml.kernel.org/r/20190131074018.GD28876@rapoport-lnx
[akpm@linux-foundation.org: fix xtensa printk warning]
Link: http://lkml.kernel.org/r/1548057848-15136-20-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Guo Ren <ren_guo@c-sky.com>		[c-sky]
Acked-by: Paul Burton <paul.burton@mips.com>		[MIPS]
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>	[s390]
Reviewed-by: Juergen Gross <jgross@suse.com>		[Xen]
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>	[m68k]
Acked-by: Max Filippov <jcmvbkbc@gmail.com>		[xtensa]
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-03-12 10:04:02 -07:00
..
Kconfig clk: ti: Add support for dm814x ADPLL 2016-03-01 16:21:25 -08:00
Makefile clk: ti: dra7xx: rename existing clkctrl data as compat data 2018-10-03 15:02:27 +03:00
adpll.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
apll.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
autoidle.c clk: ti: convert to use proper register definition for all accesses 2017-03-08 13:06:15 +02:00
clk-2xxx.c Merge branch 'cleanup-clk-h-includes' into clk-next 2015-07-28 11:59:09 -07:00
clk-3xxx.c clk: ti: omap3: cleanup unnecessary clock aliases 2017-12-01 15:17:17 +02:00
clk-7xx-compat.c clk: ti: dra7xx: rename existing clkctrl data as compat data 2018-10-03 15:02:27 +03:00
clk-7xx.c clk: ti: dra7: add new clkctrl data 2018-10-03 15:02:27 +03:00
clk-33xx-compat.c clk: ti: am33xx: rename existing clkctrl data as compat data 2018-10-03 15:02:26 +03:00
clk-33xx.c clk: ti: am33xx: add new clkctrl data for am33xx 2018-10-03 15:02:26 +03:00
clk-43xx-compat.c clk: ti: am43xx: rename existing clkctrl data as compat data 2018-10-03 15:02:26 +03:00
clk-43xx.c clk: ti: am43xx: add new clkctrl data for am43xx 2018-10-03 15:02:27 +03:00
clk-44xx.c clk: ti: omap4: clkctrl data fixes for opt-clocks 2017-12-01 15:18:08 +02:00
clk-54xx.c clk: ti: omap5: add clkctrl clock data 2017-12-01 15:17:18 +02:00
clk-814x.c clk: ti: dm814: add clkctrl clock data 2017-12-01 15:18:01 +02:00
clk-816x.c clk: ti: dm816: add clkctrl clock data 2017-12-01 15:18:06 +02:00
clk-dra7-atl.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
clk.c treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
clkctrl.c clk: Use of_node_name_eq for node name comparisons 2018-12-14 13:52:41 -08:00
clkt_dflt.c clk: ti: convert to use proper register definition for all accesses 2017-03-08 13:06:15 +02:00
clkt_dpll.c clk: ti: convert to use proper register definition for all accesses 2017-03-08 13:06:15 +02:00
clkt_iclk.c clk: ti: convert to use proper register definition for all accesses 2017-03-08 13:06:15 +02:00
clock.h clk: ti: Add functions to save/restore clk context 2018-10-03 15:29:19 +03:00
clockdomain.c clk: Convert to using %pOF instead of full_name 2017-07-21 15:49:54 -07:00
composite.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
divider.c clk: ti: Fix error handling in ti_clk_parse_divider_data() 2019-01-24 11:23:32 -08:00
dpll.c clk: Use of_node_name_eq for node name comparisons 2018-12-14 13:52:41 -08:00
dpll3xxx.c clk: ti: Add functions to save/restore clk context 2018-10-03 15:29:19 +03:00
dpll44xx.c clk: ti: convert to use proper register definition for all accesses 2017-03-08 13:06:15 +02:00
fapll.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
fixed-factor.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
gate.c Merge branch 'clk-ti' into clk-next 2018-10-18 15:41:21 -07:00
interface.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
mux.c Merge branch 'clk-ti' into clk-next 2018-10-18 15:41:21 -07:00