Commit 1756055d authored by YueHaibing's avatar YueHaibing Committed by David S. Miller

ibmveth: fix kobj_to_dev.cocci warnings

Use kobj_to_dev() instead of container_of()

Generated by: scripts/coccinelle/api/kobj_to_dev.cocci
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarLijun Pan <lijunp213@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 86544c3d
...@@ -1799,8 +1799,7 @@ static ssize_t veth_pool_store(struct kobject *kobj, struct attribute *attr, ...@@ -1799,8 +1799,7 @@ static ssize_t veth_pool_store(struct kobject *kobj, struct attribute *attr,
struct ibmveth_buff_pool *pool = container_of(kobj, struct ibmveth_buff_pool *pool = container_of(kobj,
struct ibmveth_buff_pool, struct ibmveth_buff_pool,
kobj); kobj);
struct net_device *netdev = dev_get_drvdata( struct net_device *netdev = dev_get_drvdata(kobj_to_dev(kobj->parent));
container_of(kobj->parent, struct device, kobj));
struct ibmveth_adapter *adapter = netdev_priv(netdev); struct ibmveth_adapter *adapter = netdev_priv(netdev);
long value = simple_strtol(buf, NULL, 10); long value = simple_strtol(buf, NULL, 10);
long rc; long rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment