linux/drivers/soc
Arnd Bergmann 0ea3fa15b1 qcom: cmd-db: enforce CONFIG_OF_RESERVED_MEM dependency
Without CONFIG_OF_RESERVED_MEM, gcc sees that the global cmd_db_header
variable is never initialized, and through code optimization concludes
that a lot of other code cannot possibly work after that:

drivers/soc/qcom/cmd-db.c: In function 'cmd_db_read_addr':
drivers/soc/qcom/cmd-db.c:197:21: error: 'ent.addr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  return ret < 0 ? 0 : le32_to_cpu(ent.addr);
drivers/soc/qcom/cmd-db.c: In function 'cmd_db_read_aux_data':
drivers/soc/qcom/cmd-db.c:224:10: error: 'ent.len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  ent_len = le16_to_cpu(ent.len);
drivers/soc/qcom/cmd-db.c:115:6: error: 'rsc_hdr.data_offset' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  u16 offset = le16_to_cpu(hdr->data_offset);
      ^~~~~~
drivers/soc/qcom/cmd-db.c:116:6: error: 'ent.offset' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  u16 loffset = le16_to_cpu(ent->offset);
      ^~~~~~~
drivers/soc/qcom/cmd-db.c: In function 'cmd_db_read_aux_data_len':
drivers/soc/qcom/cmd-db.c:250:38: error: 'ent.len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  return ret < 0 ? 0 : le16_to_cpu(ent.len);
                                      ^
drivers/soc/qcom/cmd-db.c: In function 'cmd_db_read_slave_id':
drivers/soc/qcom/cmd-db.c:272:7: error: 'ent.addr' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Using a hard CONFIG_OF_RESERVED_MEM dependency avoids this warning,
and we can remove the CONFIG_OF dependency.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-06-25 23:54:38 -05:00
..
actions treewide: Use struct_size() for devm_kmalloc() and friends 2018-06-06 11:15:43 -07:00
amlogic amlogic: meson-gx-socinfo: Update soc ids 2018-03-19 16:40:26 -07:00
atmel drivers: soc: atmel: Add basic support for new sama5d2 SiPs 2017-09-17 19:45:59 +02:00
bcm treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
dove License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fsl treewide: Use array_size() in vzalloc() 2018-06-12 16:19:22 -07:00
gemini soc: Add SoC driver for Gemini 2018-01-04 17:01:53 +01:00
imx soc: imx: gpc: Do not pass static memory as platform data 2018-04-23 17:03:15 +08:00
lantiq MIPS: lantiq: gphy: Drop reboot/remove reset asserts 2018-05-24 13:22:56 +01:00
mediatek - Error path bug fix for overflow tests (Dan) 2018-06-12 18:28:00 -07:00
qcom qcom: cmd-db: enforce CONFIG_OF_RESERVED_MEM dependency 2018-06-25 23:54:38 -05:00
renesas soc: renesas: r8a77990-sysc: Add workaround for 3DG-{A,B} 2018-05-16 10:57:44 +02:00
rockchip ARM: SoC driver updates 2018-06-11 18:15:22 -07:00
samsung soc: samsung: pm_domains: Deprecate support for clocks 2018-04-17 17:25:42 +02:00
sunxi drivers: soc: sunxi: add support for A64 and its SRAM C 2017-08-18 14:30:21 +08:00
tegra This time we have a good set of changes to the core framework that do some 2018-06-09 12:06:24 -07:00
ti - Error path bug fix for overflow tests (Dan) 2018-06-12 18:28:00 -07:00
ux500
versatile soc: versatile: remove unnecessary static in realview_soc_probe() 2017-08-16 22:28:27 +02:00
xilinx soc: xilinx: Fix Kconfig alignment 2018-01-16 15:50:21 +01:00
zte soc: zte: Restrict SOC_ZTE to ARCH_ZX or COMPILE_TEST 2017-07-27 13:12:34 +02:00
Kconfig soc: xilinx: Create folder structure for soc specific drivers 2018-01-08 13:42:39 +01:00
Makefile soc: Unconditionally include qcom Makefile 2018-05-25 15:53:57 -05:00