mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
netlink: Use FIELD_SIZEOF() in netlink_proto_init().
Signed-off-by: YOSHIFUJI Hideaki <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
ba96bcbcd2
commit
fab2574591
1 changed files with 1 additions and 2 deletions
|
|
@ -2185,7 +2185,6 @@ static struct pernet_operations __net_initdata netlink_net_ops = {
|
|||
|
||||
static int __init netlink_proto_init(void)
|
||||
{
|
||||
struct sk_buff *dummy_skb;
|
||||
int i;
|
||||
unsigned long limit;
|
||||
unsigned int order;
|
||||
|
|
@ -2194,7 +2193,7 @@ static int __init netlink_proto_init(void)
|
|||
if (err != 0)
|
||||
goto out;
|
||||
|
||||
BUILD_BUG_ON(sizeof(struct netlink_skb_parms) > sizeof(dummy_skb->cb));
|
||||
BUILD_BUG_ON(sizeof(struct netlink_skb_parms) > FIELD_SIZEOF(struct sk_buff, cb));
|
||||
|
||||
nl_table = kcalloc(MAX_LINKS, sizeof(*nl_table), GFP_KERNEL);
|
||||
if (!nl_table)
|
||||
|
|
|
|||
Loading…
Reference in a new issue