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

netfilter: nf_tables: constify nft_reg_load{8, 16, 64}()

This patch constifies the pointer to source register data that is passed
as an input parameter.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Pablo Neira Ayuso and committed by
David S. Miller
7cd9a58d 2f1d370b

+3 -3
+3 -3
include/net/netfilter/nf_tables.h
··· 114 114 *(u8 *)dreg = val; 115 115 } 116 116 117 - static inline u8 nft_reg_load8(u32 *sreg) 117 + static inline u8 nft_reg_load8(const u32 *sreg) 118 118 { 119 119 return *(u8 *)sreg; 120 120 } ··· 125 125 *(u16 *)dreg = val; 126 126 } 127 127 128 - static inline u16 nft_reg_load16(u32 *sreg) 128 + static inline u16 nft_reg_load16(const u32 *sreg) 129 129 { 130 130 return *(u16 *)sreg; 131 131 } ··· 135 135 put_unaligned(val, (u64 *)dreg); 136 136 } 137 137 138 - static inline u64 nft_reg_load64(u32 *sreg) 138 + static inline u64 nft_reg_load64(const u32 *sreg) 139 139 { 140 140 return get_unaligned((u64 *)sreg); 141 141 }