linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] cxgb4: remove set but not used variable 'tab'
@ 2020-03-24  6:26 YueHaibing
  2020-03-24 23:10 ` David Miller
  2020-03-25  1:17 ` [PATCH v2 " YueHaibing
  0 siblings, 2 replies; 4+ messages in thread
From: YueHaibing @ 2020-03-24  6:26 UTC (permalink / raw)
  To: vishal, davem; +Cc: netdev, linux-kernel, rahul.lakkireddy, YueHaibing

drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c: In function cxgb4_get_free_ftid:
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c:547:23:
 warning: variable tab set but not used [-Wunused-but-set-variable]

commit 8d174351f285 ("cxgb4: rework TC filter rule insertion across regions")
involved this, remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
index e8852dfcc1f1..525a4d385551 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
@@ -544,7 +544,7 @@ int cxgb4_get_free_ftid(struct net_device *dev, u8 family, bool hash_en,
 {
 	struct adapter *adap = netdev2adap(dev);
 	struct tid_info *t = &adap->tids;
-	struct filter_entry *tab, *f;
+	struct filter_entry *f;
 	u32 bmap_ftid, max_ftid;
 	unsigned long *bmap;
 	bool found = false;
@@ -617,7 +617,6 @@ int cxgb4_get_free_ftid(struct net_device *dev, u8 family, bool hash_en,
 
 			bmap = t->hpftid_bmap;
 			bmap_ftid = ftid;
-			tab = t->hpftid_tab;
 		} else if (hash_en) {
 			/* Ensure priority is >= last rule in HPFILTER
 			 * region.
@@ -657,7 +656,6 @@ int cxgb4_get_free_ftid(struct net_device *dev, u8 family, bool hash_en,
 
 			bmap = t->ftid_bmap;
 			bmap_ftid = ftid - t->nhpftids;
-			tab = t->ftid_tab;
 		}
 
 		cnt = 0;
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] cxgb4: remove set but not used variable 'tab'
  2020-03-24  6:26 [PATCH net-next] cxgb4: remove set but not used variable 'tab' YueHaibing
@ 2020-03-24 23:10 ` David Miller
  2020-03-25  1:17 ` [PATCH v2 " YueHaibing
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2020-03-24 23:10 UTC (permalink / raw)
  To: yuehaibing; +Cc: vishal, netdev, linux-kernel, rahul.lakkireddy

From: YueHaibing <yuehaibing@huawei.com>
Date: Tue, 24 Mar 2020 14:26:14 +0800

> @@ -544,7 +544,7 @@ int cxgb4_get_free_ftid(struct net_device *dev, u8 family, bool hash_en,
>  {
>  	struct adapter *adap = netdev2adap(dev);
>  	struct tid_info *t = &adap->tids;
> -	struct filter_entry *tab, *f;
> +	struct filter_entry *f;
>  	u32 bmap_ftid, max_ftid;
>  	unsigned long *bmap;
>  	bool found = false;

Please preserve the reverse christmas tree ordering here.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 net-next] cxgb4: remove set but not used variable 'tab'
  2020-03-24  6:26 [PATCH net-next] cxgb4: remove set but not used variable 'tab' YueHaibing
  2020-03-24 23:10 ` David Miller
@ 2020-03-25  1:17 ` YueHaibing
  2020-03-25 18:20   ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: YueHaibing @ 2020-03-25  1:17 UTC (permalink / raw)
  To: vishal, davem; +Cc: netdev, linux-kernel, rahul.lakkireddy, YueHaibing

drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c: In function cxgb4_get_free_ftid:
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c:547:23:
 warning: variable tab set but not used [-Wunused-but-set-variable]

commit 8d174351f285 ("cxgb4: rework TC filter rule insertion across regions")
involved this, remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: keep christmas tree ordering
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
index e8852dfcc1f1..4490042b5a95 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
@@ -544,8 +544,8 @@ int cxgb4_get_free_ftid(struct net_device *dev, u8 family, bool hash_en,
 {
 	struct adapter *adap = netdev2adap(dev);
 	struct tid_info *t = &adap->tids;
-	struct filter_entry *tab, *f;
 	u32 bmap_ftid, max_ftid;
+	struct filter_entry *f;
 	unsigned long *bmap;
 	bool found = false;
 	u8 i, cnt, n;
@@ -617,7 +617,6 @@ int cxgb4_get_free_ftid(struct net_device *dev, u8 family, bool hash_en,
 
 			bmap = t->hpftid_bmap;
 			bmap_ftid = ftid;
-			tab = t->hpftid_tab;
 		} else if (hash_en) {
 			/* Ensure priority is >= last rule in HPFILTER
 			 * region.
@@ -657,7 +656,6 @@ int cxgb4_get_free_ftid(struct net_device *dev, u8 family, bool hash_en,
 
 			bmap = t->ftid_bmap;
 			bmap_ftid = ftid - t->nhpftids;
-			tab = t->ftid_tab;
 		}
 
 		cnt = 0;
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 net-next] cxgb4: remove set but not used variable 'tab'
  2020-03-25  1:17 ` [PATCH v2 " YueHaibing
@ 2020-03-25 18:20   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2020-03-25 18:20 UTC (permalink / raw)
  To: yuehaibing; +Cc: vishal, netdev, linux-kernel, rahul.lakkireddy

From: YueHaibing <yuehaibing@huawei.com>
Date: Wed, 25 Mar 2020 09:17:50 +0800

> drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c: In function cxgb4_get_free_ftid:
> drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c:547:23:
>  warning: variable tab set but not used [-Wunused-but-set-variable]
> 
> commit 8d174351f285 ("cxgb4: rework TC filter rule insertion across regions")
> involved this, remove it.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> v2: keep christmas tree ordering

Applied, thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-25 18:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24  6:26 [PATCH net-next] cxgb4: remove set but not used variable 'tab' YueHaibing
2020-03-24 23:10 ` David Miller
2020-03-25  1:17 ` [PATCH v2 " YueHaibing
2020-03-25 18:20   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).