Skip to contentSkip to conversation

net: cxgb3: remove unused fl_to_qset function

PATCH Applied Tom Rix 4 participants 5 messages Mar 19, 2023 – Mar 21, 2023

Subsystems (3)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 net: cxgb3: remove unused fl_to_qset function

clang with W=1 reports drivers/net/ethernet/chelsio/cxgb3/sge.c:169:32: error: unused function
'fl_to_qset' [-Werror,-Wunused-function]
static inline struct sge_qset *fl_to_qset(const struct sge_fl *q, int qidx)

                               ^

This function is not used, so remove it.

---
 drivers/net/ethernet/chelsio/cxgb3/sge.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/net/ethernet/chelsio/cxgb3/sge.c +0 -5
index 62dfbdd33365..efa7f401529e 100644
@@ -166,11 +166,6 @@ static u8 flit_desc_map[] = {
 #endif
 };
 
-static inline struct sge_qset *fl_to_qset(const struct sge_fl *q, int qidx)
-{
-	return container_of(q, struct sge_qset, fl[qidx]);
-}
-
 static inline struct sge_qset *rspq_to_qset(const struct sge_rspq *q)
 {
 	return container_of(q, struct sge_qset, rspq);
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw

The 03/19/2023 13:24, Tom Rix wrote:

Hi Tom,

Quoted 7 lines

clang with W=1 reports drivers/net/ethernet/chelsio/cxgb3/sge.c:169:32: error: unused function
'fl_to_qset' [-Werror,-Wunused-function]
static inline struct sge_qset *fl_to_qset(const struct sge_fl *q, int qidx)

                               ^

This function is not used, so remove it.

Don't forget to mention in the subject which tree is targeting this patch.
Other than that looks OK.

Quoted 25 lines
---
 drivers/net/ethernet/chelsio/cxgb3/sge.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/net/ethernet/chelsio/cxgb3/sge.c +0 -6
index 62dfbdd33365..efa7f401529e 100644
@@ -166,11 +166,6 @@ static u8 flit_desc_map[] = {
 #endif
 };
 
-static inline struct sge_qset *fl_to_qset(const struct sge_fl *q, int qidx)
-{
-       return container_of(q, struct sge_qset, fl[qidx]);
-}
-
 static inline struct sge_qset *rspq_to_qset(const struct sge_rspq *q)
 {
        return container_of(q, struct sge_qset, rspq);
--

2.27.0

Signature · 1 line
/Horatiu
author
#2 lore raw
Quoted 4 lines · Horatiu Vultur

The 03/19/2023 13:24, Tom Rix wrote:

Hi Tom,

Quoted 8 lines
Quoted 6 lines

clang with W=1 reports drivers/net/ethernet/chelsio/cxgb3/sge.c:169:32: error: unused function
'fl_to_qset' [-Werror,-Wunused-function]
static inline struct sge_qset *fl_to_qset(const struct sge_fl *q, int qidx)

                                ^

This function is not used, so remove it.

Don't forget to mention in the subject which tree is targeting this patch.

This and all my similar fixes/cleanup are against -next.

What prefix would you like to see ?

Tom

Quoted 28 lines

Other than that looks OK.

Quoted 24 lines
---
  drivers/net/ethernet/chelsio/cxgb3/sge.c | 5 -----
  1 file changed, 5 deletions(-)
drivers/net/ethernet/chelsio/cxgb3/sge.c +0 -6
index 62dfbdd33365..efa7f401529e 100644
@@ -166,11 +166,6 @@ static u8 flit_desc_map[] = {
  #endif
  };
 
-static inline struct sge_qset *fl_to_qset(const struct sge_fl *q, int qidx)
-{
-       return container_of(q, struct sge_qset, fl[qidx]);
-}
-
  static inline struct sge_qset *rspq_to_qset(const struct sge_rspq *q)
  {
         return container_of(q, struct sge_qset, rspq);
--

2.27.0

#3 lore raw
Quoted 12 lines · Tom Rix
Quoted 10 lines · Horatiu Vultur

The 03/19/2023 13:24, Tom Rix wrote:

Hi Tom,

Quoted 6 lines

clang with W=1 reports drivers/net/ethernet/chelsio/cxgb3/sge.c:169:32: error: unused function
'fl_to_qset' [-Werror,-Wunused-function]
static inline struct sge_qset *fl_to_qset(const struct sge_fl *q, int qidx)

                                ^

This function is not used, so remove it.

Quoted 6 lines
Quoted 2 lines

Don't forget to mention in the subject which tree is targeting this patch.

This and all my similar fixes/cleanup are against -next.

What prefix would you like to see ?

net-next

Thanks

Quoted 32 lines

Tom

Quoted 28 lines

Other than that looks OK.

Quoted 24 lines
---
  drivers/net/ethernet/chelsio/cxgb3/sge.c | 5 -----
  1 file changed, 5 deletions(-)
drivers/net/ethernet/chelsio/cxgb3/sge.c +0 -6
index 62dfbdd33365..efa7f401529e 100644
@@ -166,11 +166,6 @@ static u8 flit_desc_map[] = {
  #endif
  };
 
-static inline struct sge_qset *fl_to_qset(const struct sge_fl *q, int qidx)
-{
-       return container_of(q, struct sge_qset, fl[qidx]);
-}
-
  static inline struct sge_qset *rspq_to_qset(const struct sge_rspq *q)
  {
         return container_of(q, struct sge_qset, rspq);
--

2.27.0

#4 lore raw
In reply to Tom Rix
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Sun, 19 Mar 2023 13:24:33 -0400 you wrote:

clang with W=1 reports drivers/net/ethernet/chelsio/cxgb3/sge.c:169:32: error: unused function
'fl_to_qset' [-Werror,-Wunused-function]
static inline struct sge_qset *fl_to_qset(const struct sge_fl *q, int qidx)

                               ^

This function is not used, so remove it.

[...]

Here is the summary with links:
- net: cxgb3: remove unused fl_to_qset function

    https://git.kernel.org/netdev/net-next/c/a08df15eab0c

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html