提交 b4a5127b 编写于 作者: J Jacob Keller 提交者: Jeff Kirsher

fm10k: do not use enum as boolean

Check for actual value NETREG_UNINITIALIZED in case it ever changes from
the current value of zero.
Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
Tested-by: NKrishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 f6f19f8b
...@@ -1905,7 +1905,7 @@ static void fm10k_init_reta(struct fm10k_intfc *interface) ...@@ -1905,7 +1905,7 @@ static void fm10k_init_reta(struct fm10k_intfc *interface)
u32 reta, base; u32 reta, base;
/* If the netdev is initialized we have to maintain table if possible */ /* If the netdev is initialized we have to maintain table if possible */
if (interface->netdev->reg_state) { if (interface->netdev->reg_state != NETREG_UNINITIALIZED) {
for (i = FM10K_RETA_SIZE; i--;) { for (i = FM10K_RETA_SIZE; i--;) {
reta = interface->reta[i]; reta = interface->reta[i];
if ((((reta << 24) >> 24) < rss_i) && if ((((reta << 24) >> 24) < rss_i) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册