On Mon, Jun 25, 2018 at 10:30:17PM +0200, Arnd Bergmann wrote: > On Mon, Jun 25, 2018 at 7:05 PM, Andy Gross <andy.gross@xxxxxxxxxx> wrote: > > This patch adds initialization of the entry_header structs to avoid > > compiler warnings like the following: > > > > CC drivers/soc/qcom/cmd-db.o > > drivers/soc/qcom/cmd-db.c: In function ‘cmd_db_read_addr’: > > drivers/soc/qcom/cmd-db.c:194:21: warning: ‘ent.addr’ may be used > > uninitialized in this function [-Wmaybe-uninitialized] > > return ret < 0 ? 0 : le32_to_cpu(ent.addr); > > > > drivers/soc/qcom/cmd-db.c: In function ‘cmd_db_read_aux_data_len’: > > drivers/soc/qcom/cmd-db.c:247:38: warning: ‘ent.len’ may be used > > uninitialized in this function [-Wmaybe-uninitialized] > > return ret < 0 ? 0 : le16_to_cpu(ent.len); > > Anything wrong with my fix that I posted a while ago? > See https://lkml.org/lkml/2018/5/25/569 Not entirely, see the comment below. I missed this one and the other fix somehow. > > I generally don't like patches that add incorrect initializations to > work around warnings like this. Correct me if I am wrong, but this just masks the warnings on toolchain/ platforms that exhibit these warnings. I'm not entirely fond of doing blanket init either to make the warnings go away either... Andy -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html