Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: ipa: make ipa_table_hash_support() a real function

With the exception of ipa_table_hash_support(), nothing defined in
"ipa_table.h" requires the full definition of the IPA structure.

Change that function to be a "real" function rather than an inline,
to avoid requring the IPA structure to be defined.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Alex Elder and committed by
Paolo Abeni
b81565b7 5043d6b1

+9 -6
+7 -1
drivers/net/ipa/ipa_table.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 3 3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. 4 - * Copyright (C) 2018-2023 Linaro Ltd. 4 + * Copyright (C) 2018-2024 Linaro Ltd. 5 5 */ 6 6 7 7 #include <linux/bitops.h> ··· 156 156 : IPA_MEM_V4_ROUTE; 157 157 158 158 return ipa_mem_find(ipa, mem_id); 159 + } 160 + 161 + /* Return true if hashed tables are supported */ 162 + bool ipa_table_hash_support(struct ipa *ipa) 163 + { 164 + return ipa->version != IPA_VERSION_4_2; 159 165 } 160 166 161 167 bool ipa_filtered_valid(struct ipa *ipa, u64 filtered)
+2 -5
drivers/net/ipa/ipa_table.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 3 3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. 4 - * Copyright (C) 2019-2022 Linaro Ltd. 4 + * Copyright (C) 2019-2024 Linaro Ltd. 5 5 */ 6 6 #ifndef _IPA_TABLE_H_ 7 7 #define _IPA_TABLE_H_ ··· 23 23 * ipa_table_hash_support() - Return true if hashed tables are supported 24 24 * @ipa: IPA pointer 25 25 */ 26 - static inline bool ipa_table_hash_support(struct ipa *ipa) 27 - { 28 - return ipa->version != IPA_VERSION_4_2; 29 - } 26 + bool ipa_table_hash_support(struct ipa *ipa); 30 27 31 28 /** 32 29 * ipa_table_reset() - Reset filter and route tables entries to "none"