diff options
author | YueHaibing <yuehaibing@huawei.com> | 2021-05-19 05:28:49 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-05-19 22:01:02 +0300 |
commit | 1756055de28412b6820b1221b1ab0092f6e780cb (patch) | |
tree | e289ee27e794f77c86f390a6a893034185567c96 /drivers/net/ethernet/ibm | |
parent | 86544c3de6a2185409c5a3d02f674ea223a14217 (diff) | |
download | linux-1756055de28412b6820b1221b1ab0092f6e780cb.tar.xz |
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: YueHaibing <yuehaibing@huawei.com>
Acked-by: Lijun Pan <lijunp213@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r-- | drivers/net/ethernet/ibm/ibmveth.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c index 7fea9ae60f13..bc67a7ee872b 100644 --- a/drivers/net/ethernet/ibm/ibmveth.c +++ b/drivers/net/ethernet/ibm/ibmveth.c @@ -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, kobj); - struct net_device *netdev = dev_get_drvdata( - container_of(kobj->parent, struct device, kobj)); + struct net_device *netdev = dev_get_drvdata(kobj_to_dev(kobj->parent)); struct ibmveth_adapter *adapter = netdev_priv(netdev); long value = simple_strtol(buf, NULL, 10); long rc; |