Beilei Thank you for the comment, please see below.
On 11/1/19 3:05 AM, Xing, Beilei wrote: >> -----Original Message----- >> From: Andrzej Ostruszka [mailto:aostrus...@marvell.com] [...] >> Subject: [PATCH v6 10/12] net/i40e: clean LTO build warnings (maybe- >> uninitialized) >> >> During LTO build compiler reports some 'false positive' warnings about >> variables being possibly used uninitialized. This patch silences these >> warnings. >> >> Exemplary compiler warning to suppress (with LTO enabled): >> error: ‘filter_idx’ may be used uninitialized in this function >> [-Werror=maybe- >> uninitialized] >> PMD_DRV_LOG(INFO, "Added port %d with AQ command with index %d", > > Hi, > > Thanks for the patch. Please also add fix line here and Cc stable. Are you saying that there is actually a problem in the code? IMHO the code is fine and this patch just prevents gcc from issuing a false warning. What I think is going on is that gcc looks into i40e_aq_add_udp_tunnel() and sees that filter_idx is updated under condition "if (!status ..." and figures out that if status is positive then filter_idx could be used uninitialized because in the calling function we test "if (ret < 0)". However it fails to take into account the actual enum definition (only non-positive values) and the implementation of i40e_asq_send_command(). So, if this is only work-around for the gcc deficiency, then I would prefer to not add any fixline and to not pull that patch into stable. Please let me know what you think. Regards Andrzej