[SRU][F:linux-bluefield][PATCH 1/3] netfilter: nf_tables: constify nft_reg_load{8, 16, 64}()
Bodong Wang
bodong at nvidia.com
Mon Feb 6 23:24:23 UTC 2023
From: Pablo Neira Ayuso <pablo at netfilter.org>
BugLink: https://bugs.launchpad.net/bugs/2006397
This patch constifies the pointer to source register data that is passed
as an input parameter.
Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
Signed-off-by: David S. Miller <davem at davemloft.net>
(cherry picked from commit 7cd9a58d6860ae09acd7f0c219b5fa333703f72f)
Signed-off-by: Bodong Wang <bodong at nvidia.com>
---
include/net/netfilter/nf_tables.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index eb8b1af..0fc1db6 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -114,7 +114,7 @@ static inline void nft_reg_store8(u32 *dreg, u8 val)
*(u8 *)dreg = val;
}
-static inline u8 nft_reg_load8(u32 *sreg)
+static inline u8 nft_reg_load8(const u32 *sreg)
{
return *(u8 *)sreg;
}
@@ -125,7 +125,7 @@ static inline void nft_reg_store16(u32 *dreg, u16 val)
*(u16 *)dreg = val;
}
-static inline u16 nft_reg_load16(u32 *sreg)
+static inline u16 nft_reg_load16(const u32 *sreg)
{
return *(u16 *)sreg;
}
@@ -135,7 +135,7 @@ static inline void nft_reg_store64(u32 *dreg, u64 val)
put_unaligned(val, (u64 *)dreg);
}
-static inline u64 nft_reg_load64(u32 *sreg)
+static inline u64 nft_reg_load64(const u32 *sreg)
{
return get_unaligned((u64 *)sreg);
}
--
1.8.3.1
More information about the kernel-team
mailing list