Skip to contentSkip to conversation

net: ipa: make ipa_table_hash_support() inline

PATCH Applied Alex Elder 3 participants 3 messages Mar 15, 2021

Subsystems (3)
lore
Share & tools
lore

Alex Elder

author
#0 lore raw

PATCH 1/1 net: ipa: make ipa_table_hash_support() inline

In review, Alexander Duyck suggested that ipa_table_hash_support() was trivial enough that it could be implemented as a static inline function in the header file. But the patch had already been accepted. Implement his suggestion.

---
 drivers/net/ipa/ipa_table.c | 5 -----
 drivers/net/ipa/ipa_table.h | 5 ++++-
 2 files changed, 4 insertions(+), 6 deletions(-)
drivers/net/ipa/ipa_table.c +0 -5
index baaab3dd0e63c..7450e27068f19 100644
@@ -239,11 +239,6 @@ static void ipa_table_validate_build(void)
 
 #endif /* !IPA_VALIDATE */
 
-bool ipa_table_hash_support(struct ipa *ipa)
-{
-	return ipa->version != IPA_VERSION_4_2;
-}
-
 /* Zero entry count means no table, so just return a 0 address */
 static dma_addr_t ipa_table_addr(struct ipa *ipa, bool filter_mask, u16 count)
 {
drivers/net/ipa/ipa_table.h +4 -1
index 1a68d20f19d6a..889c2e93b1223 100644
@@ -55,7 +55,10 @@ static inline bool ipa_filter_map_valid(struct ipa *ipa, u32 filter_mask)
  * ipa_table_hash_support() - Return true if hashed tables are supported
  * @ipa:	IPA pointer
  */
-bool ipa_table_hash_support(struct ipa *ipa);
+static inline bool ipa_table_hash_support(struct ipa *ipa)
+{
+	return ipa->version != IPA_VERSION_4_2;
+}
 
 /**
  * ipa_table_reset() - Reset filter and route tables entries to "none"
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Alex Elder

In review, Alexander Duyck suggested that ipa_table_hash_support() was trivial enough that it could be implemented as a static inline function in the header file. But the patch had already been accepted. Implement his suggestion.

Looks good to me.

Quoted 40 lines
---
 drivers/net/ipa/ipa_table.c | 5 -----
 drivers/net/ipa/ipa_table.h | 5 ++++-
 2 files changed, 4 insertions(+), 6 deletions(-)
drivers/net/ipa/ipa_table.c +0 -5
index baaab3dd0e63c..7450e27068f19 100644
@@ -239,11 +239,6 @@ static void ipa_table_validate_build(void)
 
 #endif /* !IPA_VALIDATE */
 
-bool ipa_table_hash_support(struct ipa *ipa)
-{
-       return ipa->version != IPA_VERSION_4_2;
-}
-
 /* Zero entry count means no table, so just return a 0 address */
 static dma_addr_t ipa_table_addr(struct ipa *ipa, bool filter_mask, u16 count)
 {
drivers/net/ipa/ipa_table.h +4 -2
index 1a68d20f19d6a..889c2e93b1223 100644
@@ -55,7 +55,10 @@ static inline bool ipa_filter_map_valid(struct ipa *ipa, u32 filter_mask)
  * ipa_table_hash_support() - Return true if hashed tables are supported
  * @ipa:       IPA pointer
  */
-bool ipa_table_hash_support(struct ipa *ipa);
+static inline bool ipa_table_hash_support(struct ipa *ipa)
+{
+       return ipa->version != IPA_VERSION_4_2;
+}
 
 /**
  * ipa_table_reset() - Reset filter and route tables entries to "none"
--

2.27.0

#2 lore raw
In reply to Alex Elder
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 8 lines · On Mon, 15 Mar 2021 10:01:18 -0500 you wrote:

In review, Alexander Duyck suggested that ipa_table_hash_support() was trivial enough that it could be implemented as a static inline function in the header file. But the patch had already been accepted. Implement his suggestion.

[...]

Here is the summary with links:
- [net-next] net: ipa: make ipa_table_hash_support() inline

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

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html