Re: [PATCH net-next v04 1/8] hinic3: Async Event Queue interfaces
From: Jakub Kicinski
Date: Tue Jun 24 2025 - 21:04:29 EST
On Tue, 24 Jun 2025 08:14:22 +0800 Fan Gong wrote:
> Add async event queue interfaces initialization.
> It allows driver to handle async events reported by HW.
Unfortunately this patch does not build cleanly:
../drivers/net/ethernet/huawei/hinic3/hinic3_eqs.c:203:6: warning: variable 'err' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
203 | if (eq->type == HINIC3_AEQ)
| ^~~~~~~~~~~~~~~~~~~~~~
../drivers/net/ethernet/huawei/hinic3/hinic3_eqs.c:206:22: note: uninitialized use occurs here
206 | set_eq_cons_idx(eq, err ? HINIC3_EQ_NOT_ARMED :
| ^~~
../drivers/net/ethernet/huawei/hinic3/hinic3_eqs.c:203:2: note: remove the 'if' if its condition is always true
203 | if (eq->type == HINIC3_AEQ)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
204 | err = aeq_irq_handler(eq);
../drivers/net/ethernet/huawei/hinic3/hinic3_eqs.c:201:9: note: initialize the variable 'err' to silence this warning
201 | int err;
| ^
| = 0
../drivers/net/ethernet/huawei/hinic3/hinic3_eqs.c:346:6: warning: variable 'err' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
346 | if (eq->type == HINIC3_AEQ) {
| ^~~~~~~~~~~~~~~~~~~~~~
../drivers/net/ethernet/huawei/hinic3/hinic3_eqs.c:355:9: note: uninitialized use occurs here
355 | return err;
| ^~~
../drivers/net/ethernet/huawei/hinic3/hinic3_eqs.c:346:2: note: remove the 'if' if its condition is always true
346 | if (eq->type == HINIC3_AEQ) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/net/ethernet/huawei/hinic3/hinic3_eqs.c:344:9: note: initialize the variable 'err' to silence this warning
344 | int err;
| ^
| = 0
--
pw-bot: cr