mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
netlink: make validation_data const
The validation data is only used within the policy that should usually already be const, and isn't changed in any code that uses it. Therefore, make the validation_data pointer const. While at it, remove the duplicate variable in the bitfield validation that I'd otherwise have to change to const. Reviewed-by: David Ahern <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
fe3b30ddb9
commit
48fde90a78
2 changed files with 3 additions and 4 deletions
|
|
@ -45,12 +45,11 @@ static const u8 nla_attr_minlen[NLA_TYPE_MAX+1] = {
|
|||
};
|
||||
|
||||
static int validate_nla_bitfield32(const struct nlattr *nla,
|
||||
u32 *valid_flags_allowed)
|
||||
const u32 *valid_flags_mask)
|
||||
{
|
||||
const struct nla_bitfield32 *bf = nla_data(nla);
|
||||
u32 *valid_flags_mask = valid_flags_allowed;
|
||||
|
||||
if (!valid_flags_allowed)
|
||||
if (!valid_flags_mask)
|
||||
return -EINVAL;
|
||||
|
||||
/*disallow invalid bit selector */
|
||||
|
|
|
|||
Loading…
Reference in a new issue