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

nfc: microread: constify several pointers

Several functions do not modify pointed data so arguments and local
variables can be const for correctness and safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Krzysztof Kozlowski and committed by
David S. Miller
a751449f 3d463dd5

+4 -4
+1 -1
drivers/nfc/microread/i2c.c
··· 73 73 skb_trim(skb, MICROREAD_I2C_FRAME_TAILROOM); 74 74 } 75 75 76 - static int check_crc(struct sk_buff *skb) 76 + static int check_crc(const struct sk_buff *skb) 77 77 { 78 78 int i; 79 79 u8 crc = 0;
+2 -2
drivers/nfc/microread/microread.c
··· 358 358 static void microread_im_transceive_cb(void *context, struct sk_buff *skb, 359 359 int err) 360 360 { 361 - struct microread_info *info = context; 361 + const struct microread_info *info = context; 362 362 363 363 switch (info->async_cb_type) { 364 364 case MICROREAD_CB_TYPE_READER_ALL: ··· 642 642 }; 643 643 644 644 int microread_probe(void *phy_id, const struct nfc_phy_ops *phy_ops, 645 - char *llc_name, int phy_headroom, int phy_tailroom, 645 + const char *llc_name, int phy_headroom, int phy_tailroom, 646 646 int phy_payload, struct nfc_hci_dev **hdev) 647 647 { 648 648 struct microread_info *info;
+1 -1
drivers/nfc/microread/microread.h
··· 11 11 #define DRIVER_DESC "NFC driver for microread" 12 12 13 13 int microread_probe(void *phy_id, const struct nfc_phy_ops *phy_ops, 14 - char *llc_name, int phy_headroom, int phy_tailroom, 14 + const char *llc_name, int phy_headroom, int phy_tailroom, 15 15 int phy_payload, struct nfc_hci_dev **hdev); 16 16 17 17 void microread_remove(struct nfc_hci_dev *hdev);