summaryrefslogtreecommitdiff
path: root/include/keys
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-07-30 17:42:01 +0300
committerJakub Kicinski <kuba@kernel.org>2021-07-30 18:22:52 +0300
commitddecf5556f7fdf871fa8ce26b376e3e8ae6213b6 (patch)
treee8527773c9e264f6f2a1e35eea5fb9e1490efb5d /include/keys
parentf2479c0a22948c5998938fa5bb9d98f9931791b7 (diff)
downloadlinux-ddecf5556f7fdf871fa8ce26b376e3e8ae6213b6.tar.xz
nfc: nci: constify several pointers to u8, sk_buff and other structs
Several functions receive pointers to u8, sk_buff or other structs 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. This makes const also data passed as "unsigned long opt" argument to nci_request() function. Usual flow for such functions is: 1. Receive "u8 *" and store it (the pointer) in a structure allocated on stack (e.g. struct nci_set_config_param), 2. Call nci_request() or __nci_request() passing a callback function an the pointer to the structure via an "unsigned long opt", 3. nci_request() calls the callback which dereferences "unsigned long opt" in a read-only way. This converts all above paths to use proper pointer to const data, so entire flow is safer. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/keys')
0 files changed, 0 insertions, 0 deletions