WSL2-Linux-Kernel/drivers/soc/qcom
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
..
Kconfig qcom: cmd-db: enforce CONFIG_OF_RESERVED_MEM dependency 2018-06-25 23:54:38 -05:00
Makefile ARM: SoC: late updates 2018-06-11 18:19:45 -07:00
apr.c soc: qcom: apr: fix invalid msg_type check 2018-05-17 18:11:23 +01:00
cmd-db.c soc: qcom: cmd-db: Make endian-agnostic 2018-05-25 15:53:52 -05:00
glink_ssr.c soc: qcom: GLINK SSR notifier 2017-08-02 12:43:29 -07:00
mdt_loader.c treewide: use PHYS_ADDR_MAX to avoid type casting ULLONG_MAX 2018-06-15 07:55:25 +09:00
qcom-geni-se.c soc: qcom: Add GENI based QUP Wrapper driver 2018-04-25 00:12:05 -05:00
qcom_gsbi.c soc: qcom: gsbi: Add support for ADM CRCI muxing 2015-03-11 15:18:39 -05:00
qmi_encdec.c soc: qcom: Introduce QMI encoder/decoder 2017-12-20 15:38:34 -06:00
qmi_interface.c soc: qcom: qmi: fix a buffer sizing bug 2018-05-25 15:53:58 -05:00
rmtfs_mem.c soc: qcom: rmtfs-mem: Add support for assigning memory to remote 2018-03-08 18:40:24 -06:00
smd-rpm.c soc: qcom: smd-rpm: Add msm8998 compatible 2018-04-25 00:11:28 -05:00
smem.c soc: qcom: smem: introduce qcom_smem_virt_to_phys() 2018-05-25 15:53:59 -05:00
smem_state.c soc: qcom: Update properties for smem state referencing 2016-06-24 22:53:41 -05:00
smp2p.c soc: qcom: smp2p: Use common error handling code in qcom_smp2p_probe() 2018-01-01 00:29:09 -06:00
smsm.c soc: qcom: smsm: fix child-node lookup 2017-12-20 15:38:34 -06:00
spm.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-05-17 16:26:30 -07:00
wcnss_ctrl.c soc: qcom: wcnss_ctrl: Fix increment in NV upload 2018-03-08 18:40:35 -06:00