1
0
Fork 0
alistair23-linux/drivers/clk
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
..
actions clk: actions: Add Actions Semi S900 SoC Reset Management Unit support 2018-10-16 14:41:53 -07:00
at91 clk: at91: fix masterck name 2019-02-20 11:40:21 -08:00
axis
axs10x clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
bcm Merge branches 'clk-managed-registration', 'clk-spdx', 'clk-remove-basic' and 'clk-ops-const' into clk-next 2018-12-14 13:33:44 -08:00
berlin This time we have a good set of changes to the core framework that do some 2018-06-09 12:06:24 -07:00
davinci clk: davinci: kill davinci_clk_reset_assert/deassert() 2018-10-02 08:54:14 -07:00
h8300 clk: h8300: Remove usage of CLK_IS_BASIC 2018-12-10 14:43:21 -08:00
hisilicon clk: hisilicon: Remove usage of CLK_IS_BASIC 2018-12-10 14:43:21 -08:00
imgtec clk: boston: unregister clks on failure in clk_boston_setup() 2018-11-08 10:14:41 -08:00
imx clk: imx: Fix fractional clock set rate computation 2019-01-24 11:17:28 -08:00
ingenic clk: Add Ingenic jz4725b CGU driver 2018-10-16 15:19:48 -07:00
keystone Merge branch 'clk-k3-tisci' into clk-next 2018-10-18 15:40:10 -07:00
loongson1 clk: Loongson1: Remove usage of CLK_IS_BASIC 2018-12-10 14:44:08 -08:00
mediatek clk: mediatek: fix the PCIe MAC clock parent 2018-12-05 12:30:30 -08:00
meson Merge branch 'clk-fixes' into clk-next 2018-12-14 13:42:08 -08:00
microchip
mmp Revert "clk: mmp2: add SP clock" 2019-01-24 10:55:32 -08:00
mvebu clk: mvebu: Off by one bugs in cp110_of_clk_get() 2018-12-03 09:54:48 -08:00
mxs clk: mxs: make clk_ops const 2017-11-01 23:25:43 -07:00
nxp clk: lpc32xx: Set name of regmap_config 2018-03-19 14:35:16 -07:00
pistachio clk: pistachio: constify clk_ops structures 2018-11-06 09:41:49 -08:00
pxa clk: pxa: constify clk_ops structures 2018-11-06 09:41:57 -08:00
qcom clk: qcom: gcc: Use active only source for CPUSS clocks 2019-01-24 11:41:48 -08:00
renesas Merge branch 'clk-of' into clk-next 2018-12-14 14:02:55 -08:00
rockchip clk: rockchip: add clock-id to gate of ACODEC for rk3328 2018-11-26 14:22:12 +01:00
samsung clk: samsung: s3c2410: Remove usage of CLK_IS_BASIC 2018-12-10 14:44:08 -08:00
sirf We have two changes to the core framework this time around. The first being a 2017-11-17 20:04:24 -08:00
socfpga clk: socfpga: stratix10: fix naming convention for the fixed-clocks 2019-01-15 12:58:38 -08:00
spear clk: spear: fix WDT clock definition on SPEAr600 2018-04-06 13:45:34 -07:00
sprd clk: sprd: add RTC gate for SC9860 2018-03-16 15:53:30 -07:00
st clk: st: Remove usage of CLK_IS_BASIC 2018-12-10 14:43:20 -08:00
sunxi clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
sunxi-ng clk: sunxi: A31: Fix wrong AHB gate number 2019-01-28 09:26:32 +01:00
tegra clk: tegra: dfll: Make symbol 'tegra210_cpu_cvb_tables' static 2019-02-18 11:16:22 +01:00
ti treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
uniphier clk: uniphier: add clock frequency support for SPI 2018-07-25 16:26:18 -07:00
ux500 clk: Use of_node_name_eq for node name comparisons 2018-12-14 13:52:41 -08:00
versatile clk: versatile: sp810: Remove usage of CLK_IS_BASIC 2018-12-10 14:44:05 -08:00
x86 clk: x86: Stop marking clocks as CLK_IS_CRITICAL 2018-09-17 18:47:58 -07:00
zte clk: move clock common macros out from vendor directories 2017-12-21 15:00:38 -08:00
zynq clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
zynqmp clk: zynqmp: Fix memory allocation in zynqmp_clk_setup 2019-01-09 10:37:01 -08:00
Kconfig clk: imx: Remove Kconfig duplicate include 2019-01-09 10:43:41 -08:00
Makefile Merge branches 'clk-imx7ulp', 'clk-imx6-fixes', 'clk-imx-fixes', 'clk-imx8qxp' and 'clk-imx8mq' into clk-next 2018-12-14 13:34:47 -08:00
clk-asm9260.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
clk-aspeed.c The new and exciting feature this time around is in the clk core. 2018-08-15 21:41:21 -07:00
clk-axi-clkgen.c clk: axi-clkgen: Round closest in round_rate() and recalc_rate() 2017-12-21 18:07:53 -08:00
clk-axm5516.c clk: axm5516: Remove usage of CLK_IS_BASIC 2018-12-10 14:43:21 -08:00
clk-bd718x7.c clk: bd718x7: Initial support for ROHM bd71837/bd71847 PMIC clock 2018-12-10 12:44:03 -08:00
clk-bulk.c clk: Tag clk core files with SPDX 2018-12-11 09:57:47 -08:00
clk-cdce706.c
clk-cdce925.c Merge branches 'clk-dt-name', 'clk-ti-of-node' and 'clk-sa' into clk-next 2018-10-18 15:33:52 -07:00
clk-clps711x.c treewide: Use struct_size() for kmalloc()-family 2018-06-06 11:15:43 -07:00
clk-composite.c clk: Tag basic clk types with SPDX 2018-12-11 09:57:48 -08:00
clk-conf.c clk: Tag clk core files with SPDX 2018-12-11 09:57:47 -08:00
clk-cs2000-cp.c clk: cs2000-cp: convert to SPDX identifiers 2018-08-02 13:55:00 -07:00
clk-devres.c clk: Tag clk core files with SPDX 2018-12-11 09:57:47 -08:00
clk-divider.c clk: Tag basic clk types with SPDX 2018-12-11 09:57:48 -08:00
clk-efm32gg.c treewide: Use struct_size() for kmalloc()-family 2018-06-06 11:15:43 -07:00
clk-fixed-factor.c Merge branch 'clk-fixes' into clk-next 2018-12-14 13:42:08 -08:00
clk-fixed-rate.c clk: Tag basic clk types with SPDX 2018-12-11 09:57:48 -08:00
clk-fractional-divider.c Merge branches 'clk-imx7ulp', 'clk-imx6-fixes', 'clk-imx-fixes', 'clk-imx8qxp' and 'clk-imx8mq' into clk-next 2018-12-14 13:34:47 -08:00
clk-gate.c clk: Tag basic clk types with SPDX 2018-12-11 09:57:48 -08:00
clk-gemini.c treewide: Use struct_size() for kmalloc()-family 2018-06-06 11:15:43 -07:00
clk-gpio.c clk: Tag basic clk types with SPDX 2018-12-11 09:57:48 -08:00
clk-hi655x.c clk: clk-hi655x: Free of_provider at remove 2018-12-05 09:20:29 -08:00
clk-highbank.c
clk-hsdk-pll.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
clk-max9485.c clk: Add driver for MAX9485 2018-07-06 13:44:06 -07:00
clk-max77686.c clk: max77686: constify clk_ops structure 2018-11-06 09:41:29 -08:00
clk-moxart.c clk: Convert to using %pOF instead of full_name 2017-07-21 15:49:54 -07:00
clk-multiplier.c clk: Tag basic clk types with SPDX 2018-12-11 09:57:48 -08:00
clk-mux.c clk: Tag basic clk types with SPDX 2018-12-11 09:57:48 -08:00
clk-nomadik.c clk: nomadik: Change to use DEFINE_SHOW_ATTRIBUTE macro 2018-11-28 14:13:18 -08:00
clk-npcm7xx.c This time it looks like a quieter release cycle in the clk tree. I guess that's 2018-10-31 11:08:30 -07:00
clk-nspire.c
clk-oxnas.c
clk-palmas.c clk: palmas: constify clk_ops structure 2018-11-06 09:41:44 -08:00
clk-pwm.c
clk-qoriq.c clk: qoriq: add more chips support 2018-11-08 10:29:44 -08:00
clk-rk808.c clk: rk808: use managed version of of_provider registration 2018-12-05 09:20:35 -08:00
clk-s2mps11.c clk: s2mps11: constify clk_ops structure 2018-11-06 09:42:12 -08:00
clk-scmi.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
clk-scpi.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
clk-si514.c clk-si514, clk-si544: Implement prepare/unprepare/is_prepared operations 2018-06-29 10:59:40 -07:00
clk-si544.c clk-si514, clk-si544: Implement prepare/unprepare/is_prepared operations 2018-06-29 10:59:40 -07:00
clk-si570.c
clk-si5351.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
clk-si5351.h
clk-stm32f4.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
clk-stm32h7.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
clk-stm32mp1.c clk: stm32mp1: drop pointless static qualifier in stm32_register_hw_clk() 2018-11-29 23:12:35 -08:00
clk-tango4.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
clk-twl6040.c clk: clk-twl6040: Free of_provider at remove 2018-12-05 09:20:43 -08:00
clk-u300.c clk: clk-u300: Fix a typo in two comment lines 2017-11-13 17:39:43 -08:00
clk-versaclock5.c clk: vc5: Abort clock configuration without upstream clock 2019-01-09 10:53:58 -08:00
clk-vt8500.c
clk-wm831x.c clk: make clk_init_data const 2017-11-01 23:25:51 -07:00
clk-xgene.c clk: clk-xgene: Adjust six checks for null pointers 2017-11-13 17:40:03 -08:00
clk.c clk: Remove global clk traversal on fetch parent index 2019-01-24 11:13:28 -08:00
clk.h clk: Tag clk core files with SPDX 2018-12-11 09:57:47 -08:00
clkdev.c ARM: 8778/1: clkdev: don't call __of_clk_get_by_name() unnecessarily from clk_get() 2018-08-13 16:27:52 +01:00