lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250624180415.54d0f9ab@kernel.org>
Date: Tue, 24 Jun 2025 18:04:15 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Fan Gong <gongfan1@...wei.com>
Cc: Zhu Yikai <zhuyikai1@...artners.com>, <netdev@...r.kernel.org>,
 <linux-kernel@...r.kernel.org>, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Simon
 Horman <horms@...nel.org>, Andrew Lunn <andrew+netdev@...n.ch>,
 <linux-doc@...r.kernel.org>, Jonathan Corbet <corbet@....net>, Bjorn
 Helgaas <helgaas@...nel.org>, luosifu <luosifu@...wei.com>, Xin Guo
 <guoxin09@...wei.com>, Shen Chenyang <shenchenyang1@...ilicon.com>, Zhou
 Shuai <zhoushuai28@...wei.com>, Wu Like <wulike1@...wei.com>, Shi Jing
 <shijing34@...wei.com>, Meny Yossefi <meny.yossefi@...wei.com>, Gur Stavi
 <gur.stavi@...wei.com>, Lee Trager <lee@...ger.us>, Michael Ellerman
 <mpe@...erman.id.au>, Suman Ghosh <sumang@...vell.com>, Przemek Kitszel
 <przemyslaw.kitszel@...el.com>, Joe Damato <jdamato@...tly.com>, Christophe
 JAILLET <christophe.jaillet@...adoo.fr>
Subject: Re: [PATCH net-next v04 1/8] hinic3: Async Event Queue interfaces

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ