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 I generally don't like patches that add incorrect initializations to work around warnings like this. Arnd -- 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