mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 20:54:10 +00:00
Merge branch 'constify-nla_policy'
Stephen Hemminger says: ==================== constify nla_policy Almost all places that use nla_policy declare it const. A couple of drivers didn't but that is fixable. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
f91a0effca
2 changed files with 4 additions and 4 deletions
|
@ -1571,7 +1571,7 @@ static int find_free_cb(int id, void *ptr, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Netlink interface. */
|
/* Netlink interface. */
|
||||||
static struct nla_policy nbd_attr_policy[NBD_ATTR_MAX + 1] = {
|
static const struct nla_policy nbd_attr_policy[NBD_ATTR_MAX + 1] = {
|
||||||
[NBD_ATTR_INDEX] = { .type = NLA_U32 },
|
[NBD_ATTR_INDEX] = { .type = NLA_U32 },
|
||||||
[NBD_ATTR_SIZE_BYTES] = { .type = NLA_U64 },
|
[NBD_ATTR_SIZE_BYTES] = { .type = NLA_U64 },
|
||||||
[NBD_ATTR_BLOCK_SIZE_BYTES] = { .type = NLA_U64 },
|
[NBD_ATTR_BLOCK_SIZE_BYTES] = { .type = NLA_U64 },
|
||||||
|
@ -1583,14 +1583,14 @@ static struct nla_policy nbd_attr_policy[NBD_ATTR_MAX + 1] = {
|
||||||
[NBD_ATTR_DEVICE_LIST] = { .type = NLA_NESTED},
|
[NBD_ATTR_DEVICE_LIST] = { .type = NLA_NESTED},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct nla_policy nbd_sock_policy[NBD_SOCK_MAX + 1] = {
|
static const struct nla_policy nbd_sock_policy[NBD_SOCK_MAX + 1] = {
|
||||||
[NBD_SOCK_FD] = { .type = NLA_U32 },
|
[NBD_SOCK_FD] = { .type = NLA_U32 },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* We don't use this right now since we don't parse the incoming list, but we
|
/* We don't use this right now since we don't parse the incoming list, but we
|
||||||
* still want it here so userspace knows what to expect.
|
* still want it here so userspace knows what to expect.
|
||||||
*/
|
*/
|
||||||
static struct nla_policy __attribute__((unused))
|
static const struct nla_policy __attribute__((unused))
|
||||||
nbd_device_policy[NBD_DEVICE_ATTR_MAX + 1] = {
|
nbd_device_policy[NBD_DEVICE_ATTR_MAX + 1] = {
|
||||||
[NBD_DEVICE_INDEX] = { .type = NLA_U32 },
|
[NBD_DEVICE_INDEX] = { .type = NLA_U32 },
|
||||||
[NBD_DEVICE_CONNECTED] = { .type = NLA_U8 },
|
[NBD_DEVICE_CONNECTED] = { .type = NLA_U8 },
|
||||||
|
|
|
@ -1255,7 +1255,7 @@ out:
|
||||||
return skb->len;
|
return skb->len;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct nla_policy gtp_genl_policy[GTPA_MAX + 1] = {
|
static const struct nla_policy gtp_genl_policy[GTPA_MAX + 1] = {
|
||||||
[GTPA_LINK] = { .type = NLA_U32, },
|
[GTPA_LINK] = { .type = NLA_U32, },
|
||||||
[GTPA_VERSION] = { .type = NLA_U32, },
|
[GTPA_VERSION] = { .type = NLA_U32, },
|
||||||
[GTPA_TID] = { .type = NLA_U64, },
|
[GTPA_TID] = { .type = NLA_U64, },
|
||||||
|
|
Loading…
Add table
Reference in a new issue