* [PATCH net-next] net: ipa: make ipa_table_hash_support() inline
@ 2021-03-15 15:01 Alex Elder
2021-03-15 15:12 ` Alexander Duyck
2021-03-15 22:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Alex Elder @ 2021-03-15 15:01 UTC (permalink / raw)
To: davem, kuba
Cc: alexander.duyck, bjorn.andersson, evgreen, cpratapa, elder,
netdev, linux-kernel
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.
Signed-off-by: Alex Elder <elder@linaro.org>
---
drivers/net/ipa/ipa_table.c | 5 -----
drivers/net/ipa/ipa_table.h | 5 ++++-
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ipa/ipa_table.c b/drivers/net/ipa/ipa_table.c
index baaab3dd0e63c..7450e27068f19 100644
--- a/drivers/net/ipa/ipa_table.c
+++ b/drivers/net/ipa/ipa_table.c
@@ -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)
{
diff --git a/drivers/net/ipa/ipa_table.h b/drivers/net/ipa/ipa_table.h
index 1a68d20f19d6a..889c2e93b1223 100644
--- a/drivers/net/ipa/ipa_table.h
+++ b/drivers/net/ipa/ipa_table.h
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: ipa: make ipa_table_hash_support() inline
2021-03-15 15:01 [PATCH net-next] net: ipa: make ipa_table_hash_support() inline Alex Elder
@ 2021-03-15 15:12 ` Alexander Duyck
2021-03-15 22:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Duyck @ 2021-03-15 15:12 UTC (permalink / raw)
To: Alex Elder
Cc: David Miller, Jakub Kicinski, bjorn.andersson, evgreen, cpratapa,
elder, Netdev, LKML
On Mon, Mar 15, 2021 at 8:01 AM Alex Elder <elder@linaro.org> 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.
>
> Signed-off-by: Alex Elder <elder@linaro.org>
Looks good to me.
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
> ---
> drivers/net/ipa/ipa_table.c | 5 -----
> drivers/net/ipa/ipa_table.h | 5 ++++-
> 2 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ipa/ipa_table.c b/drivers/net/ipa/ipa_table.c
> index baaab3dd0e63c..7450e27068f19 100644
> --- a/drivers/net/ipa/ipa_table.c
> +++ b/drivers/net/ipa/ipa_table.c
> @@ -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)
> {
> diff --git a/drivers/net/ipa/ipa_table.h b/drivers/net/ipa/ipa_table.h
> index 1a68d20f19d6a..889c2e93b1223 100644
> --- a/drivers/net/ipa/ipa_table.h
> +++ b/drivers/net/ipa/ipa_table.h
> @@ -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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: ipa: make ipa_table_hash_support() inline
2021-03-15 15:01 [PATCH net-next] net: ipa: make ipa_table_hash_support() inline Alex Elder
2021-03-15 15:12 ` Alexander Duyck
@ 2021-03-15 22:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-15 22:00 UTC (permalink / raw)
To: Alex Elder
Cc: davem, kuba, alexander.duyck, bjorn.andersson, evgreen, cpratapa,
elder, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
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.
>
> Signed-off-by: Alex Elder <elder@linaro.org>
>
> [...]
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-15 22:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 15:01 [PATCH net-next] net: ipa: make ipa_table_hash_support() inline Alex Elder
2021-03-15 15:12 ` Alexander Duyck
2021-03-15 22:00 ` patchwork-bot+netdevbpf
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.