mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
nfc: constify several pointers to u8, char and sk_buff
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>
This commit is contained in:
parent
4932c37878
commit
3df40eb3a2
7 changed files with 63 additions and 55 deletions
|
@ -636,7 +636,7 @@ error:
|
|||
return rc;
|
||||
}
|
||||
|
||||
int nfc_set_remote_general_bytes(struct nfc_dev *dev, u8 *gb, u8 gb_len)
|
||||
int nfc_set_remote_general_bytes(struct nfc_dev *dev, const u8 *gb, u8 gb_len)
|
||||
{
|
||||
pr_debug("dev_name=%s gb_len=%d\n", dev_name(&dev->dev), gb_len);
|
||||
|
||||
|
@ -665,7 +665,7 @@ int nfc_tm_data_received(struct nfc_dev *dev, struct sk_buff *skb)
|
|||
EXPORT_SYMBOL(nfc_tm_data_received);
|
||||
|
||||
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 rc;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue