nfc: constify several pointers to u8, char and sk_buff
[ Upstream commit 3df40eb3a2ea58bf404a38f15a7a2768e4762cb0 ] Several functions receive pointers to u8, char or sk_buff but do not modify the contents so make them const. This allows doing the same for local variables and in total makes the code a little bit safer. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 0d9b41daa590 ("nfc: llcp: fix possible use of uninitialized variable in nfc_llcp_send_connect()") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
ef7fe1b5c4
commit
0be9de2ea0
@@ -266,7 +266,7 @@ struct sk_buff *nfc_alloc_send_skb(struct nfc_dev *dev, struct sock *sk,
|
||||
struct sk_buff *nfc_alloc_recv_skb(unsigned int size, gfp_t gfp);
|
||||
|
||||
int nfc_set_remote_general_bytes(struct nfc_dev *dev,
|
||||
u8 *gt, u8 gt_len);
|
||||
const u8 *gt, u8 gt_len);
|
||||
u8 *nfc_get_local_general_bytes(struct nfc_dev *dev, size_t *gb_len);
|
||||
|
||||
int nfc_fw_download_done(struct nfc_dev *dev, const char *firmware_name,
|
||||
@@ -280,7 +280,7 @@ int nfc_dep_link_is_up(struct nfc_dev *dev, u32 target_idx,
|
||||
u8 comm_mode, u8 rf_mode);
|
||||
|
||||
int nfc_tm_activated(struct nfc_dev *dev, u32 protocol, u8 comm_mode,
|
||||
u8 *gb, size_t gb_len);
|
||||
const u8 *gb, size_t gb_len);
|
||||
int nfc_tm_deactivated(struct nfc_dev *dev);
|
||||
int nfc_tm_data_received(struct nfc_dev *dev, struct sk_buff *skb);
|
||||
|
||||
|
Reference in New Issue
Block a user