Message ID | 20240405161529.1419902-1-patrice.chotard@foss.st.com |
---|---|
State | Accepted |
Commit | b4e9b524f785e21b6db45bd86eb580aebd02e1c2 |
Delegated to: | Ramon Fried |
Headers | show |
Series | net: dwc_eth_qos: Fix compilation warning in eqos_free_pkt() | expand |
On Fri, 05 Apr 2024 18:15:29 +0200, Patrice Chotard wrote: > Fix compilation warning: > > ../arch/arm/include/asm/io.h: In function 'eqos_free_pkt': > ../arch/arm/include/asm/io.h:103:32: warning: 'rx_desc' may be used uninitialized [-Wmaybe-uninitialized] > 103 | #define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v; }) > | ^~~ > ../drivers/net/dwc_eth_qos.c:1220:27: note: 'rx_desc' was declared here > 1220 | struct eqos_desc *rx_desc; > | ^~~~~~~ > > [...] Applied to u-boot/master, thanks!
diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index 9b3bce1dc87..9df3dde14f1 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -1217,7 +1217,7 @@ static int eqos_free_pkt(struct udevice *dev, uchar *packet, int length) struct eqos_priv *eqos = dev_get_priv(dev); u32 idx, idx_mask = eqos->desc_per_cacheline - 1; uchar *packet_expected; - struct eqos_desc *rx_desc; + struct eqos_desc *rx_desc = NULL; debug("%s(packet=%p, length=%d)\n", __func__, packet, length);
Fix compilation warning: ../arch/arm/include/asm/io.h: In function 'eqos_free_pkt': ../arch/arm/include/asm/io.h:103:32: warning: 'rx_desc' may be used uninitialized [-Wmaybe-uninitialized] 103 | #define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v; }) | ^~~ ../drivers/net/dwc_eth_qos.c:1220:27: note: 'rx_desc' was declared here 1220 | struct eqos_desc *rx_desc; | ^~~~~~~ Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> --- drivers/net/dwc_eth_qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)