* [PATCH] i40e: remove redundant check on vsi->active_vlans
@ 2016-02-13 23:57 ` Colin King
0 siblings, 0 replies; 5+ messages in thread
From: Colin King @ 2016-02-13 23:57 UTC (permalink / raw)
To: Jeff Kirsher, Jesse Brandeburg, Shannon Nelson, Carolyn Wyborny,
Don Skidmore, Bruce Allan, John Ronciak, Mitch Williams,
intel-wired-lan, netdev
Cc: linux-kernel
From: Colin Ian King <colin.king@canonical.com>
active_vlans is an unsigned long array, hence a null check on this
array is superfluous and can be removed.
Detected with static analysis by smatch:
drivers/net/ethernet/intel/i40e/i40e_debugfs.c:386
i40e_dbg_dump_vsi_seid() warn: this array is probably
non-NULL. 'vsi->active_vlans'
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
index 10744a6..aba28be 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
@@ -383,9 +383,8 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
dev_info(&pf->pdev->dev,
" netdev: name = %s\n",
vsi->netdev->name);
- if (vsi->active_vlans)
- dev_info(&pf->pdev->dev,
- " vlgrp: & = %p\n", vsi->active_vlans);
+ dev_info(&pf->pdev->dev,
+ " vlgrp: & = %p\n", vsi->active_vlans);
dev_info(&pf->pdev->dev,
" netdev_registered = %i, current_netdev_flags = 0x%04x, state = %li flags = 0x%08lx\n",
vsi->netdev_registered,
--
2.7.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [PATCH] i40e: remove redundant check on vsi->active_vlans
@ 2016-02-13 23:57 ` Colin King
0 siblings, 0 replies; 5+ messages in thread
From: Colin King @ 2016-02-13 23:57 UTC (permalink / raw)
To: intel-wired-lan
From: Colin Ian King <colin.king@canonical.com>
active_vlans is an unsigned long array, hence a null check on this
array is superfluous and can be removed.
Detected with static analysis by smatch:
drivers/net/ethernet/intel/i40e/i40e_debugfs.c:386
i40e_dbg_dump_vsi_seid() warn: this array is probably
non-NULL. 'vsi->active_vlans'
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
index 10744a6..aba28be 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
@@ -383,9 +383,8 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
dev_info(&pf->pdev->dev,
" netdev: name = %s\n",
vsi->netdev->name);
- if (vsi->active_vlans)
- dev_info(&pf->pdev->dev,
- " vlgrp: & = %p\n", vsi->active_vlans);
+ dev_info(&pf->pdev->dev,
+ " vlgrp: & = %p\n", vsi->active_vlans);
dev_info(&pf->pdev->dev,
" netdev_registered = %i, current_netdev_flags = 0x%04x, state = %li flags = 0x%08lx\n",
vsi->netdev_registered,
--
2.7.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] i40e: remove redundant check on vsi->active_vlans
2016-02-13 23:57 ` [Intel-wired-lan] " Colin King
@ 2016-02-16 17:58 ` Shannon Nelson
-1 siblings, 0 replies; 5+ messages in thread
From: Shannon Nelson @ 2016-02-16 17:58 UTC (permalink / raw)
To: Colin King
Cc: Jeff Kirsher, Jesse Brandeburg, Carolyn Wyborny, Don Skidmore,
Bruce Allan, John Ronciak, Mitch Williams, intel-wired-lan,
netdev, linux-kernel
On Sat, Feb 13, 2016 at 3:57 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> active_vlans is an unsigned long array, hence a null check on this
> array is superfluous and can be removed.
>
> Detected with static analysis by smatch:
>
> drivers/net/ethernet/intel/i40e/i40e_debugfs.c:386
> i40e_dbg_dump_vsi_seid() warn: this array is probably
> non-NULL. 'vsi->active_vlans'
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
> index 10744a6..aba28be 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
> @@ -383,9 +383,8 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
> dev_info(&pf->pdev->dev,
> " netdev: name = %s\n",
> vsi->netdev->name);
> - if (vsi->active_vlans)
> - dev_info(&pf->pdev->dev,
> - " vlgrp: & = %p\n", vsi->active_vlans);
> + dev_info(&pf->pdev->dev,
> + " vlgrp: & = %p\n", vsi->active_vlans);
> dev_info(&pf->pdev->dev,
> " netdev_registered = %i, current_netdev_flags = 0x%04x, state = %li flags = 0x%08lx\n",
> vsi->netdev_registered,
> --
> 2.7.0
>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
--
==============================================
Mr. Shannon Nelson Network Division, Intel Corp.
Shannon.Nelson@intel.com I don't speak for Intel
Parents can't afford to be squeamish
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [PATCH] i40e: remove redundant check on vsi->active_vlans
@ 2016-02-16 17:58 ` Shannon Nelson
0 siblings, 0 replies; 5+ messages in thread
From: Shannon Nelson @ 2016-02-16 17:58 UTC (permalink / raw)
To: intel-wired-lan
On Sat, Feb 13, 2016 at 3:57 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> active_vlans is an unsigned long array, hence a null check on this
> array is superfluous and can be removed.
>
> Detected with static analysis by smatch:
>
> drivers/net/ethernet/intel/i40e/i40e_debugfs.c:386
> i40e_dbg_dump_vsi_seid() warn: this array is probably
> non-NULL. 'vsi->active_vlans'
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
> index 10744a6..aba28be 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
> @@ -383,9 +383,8 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
> dev_info(&pf->pdev->dev,
> " netdev: name = %s\n",
> vsi->netdev->name);
> - if (vsi->active_vlans)
> - dev_info(&pf->pdev->dev,
> - " vlgrp: & = %p\n", vsi->active_vlans);
> + dev_info(&pf->pdev->dev,
> + " vlgrp: & = %p\n", vsi->active_vlans);
> dev_info(&pf->pdev->dev,
> " netdev_registered = %i, current_netdev_flags = 0x%04x, state = %li flags = 0x%08lx\n",
> vsi->netdev_registered,
> --
> 2.7.0
>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
--
==============================================
Mr. Shannon Nelson Network Division, Intel Corp.
Shannon.Nelson at intel.com I don't speak for Intel
Parents can't afford to be squeamish
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [PATCH] i40e: remove redundant check on vsi->active_vlans
2016-02-13 23:57 ` [Intel-wired-lan] " Colin King
(?)
(?)
@ 2016-02-17 23:12 ` Bowers, AndrewX
-1 siblings, 0 replies; 5+ messages in thread
From: Bowers, AndrewX @ 2016-02-17 23:12 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Colin King
> Sent: Saturday, February 13, 2016 3:57 PM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; Brandeburg, Jesse
> <jesse.brandeburg@intel.com>; Nelson, Shannon
> <shannon.nelson@intel.com>; Wyborny, Carolyn
> <carolyn.wyborny@intel.com>; Skidmore, Donald C
> <donald.c.skidmore@intel.com>; Allan, Bruce W <bruce.w.allan@intel.com>;
> Ronciak, John <john.ronciak@intel.com>; Williams, Mitch A
> <mitch.a.williams@intel.com>; intel-wired-lan at lists.osuosl.org;
> netdev at vger.kernel.org
> Cc: linux-kernel at vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH] i40e: remove redundant check on vsi-
> >active_vlans
>
> From: Colin Ian King <colin.king@canonical.com>
>
> active_vlans is an unsigned long array, hence a null check on this array is
> superfluous and can be removed.
>
> Detected with static analysis by smatch:
>
> drivers/net/ethernet/intel/i40e/i40e_debugfs.c:386
> i40e_dbg_dump_vsi_seid() warn: this array is probably
> non-NULL. 'vsi->active_vlans'
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Warning from smatch not given with patch applied
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-02-17 23:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-13 23:57 [PATCH] i40e: remove redundant check on vsi->active_vlans Colin King
2016-02-13 23:57 ` [Intel-wired-lan] " Colin King
2016-02-16 17:58 ` Shannon Nelson
2016-02-16 17:58 ` [Intel-wired-lan] " Shannon Nelson
2016-02-17 23:12 ` Bowers, AndrewX
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.