You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
1) Fix several cases of missing of_node_put() calls in various
networking drivers. From Peter Chen.
2) Don't try to remove unconfigured VLANs in qed driver, from Yuval
Mintz.
3) Unbalanced locking in TIPC error handling, from Wei Yongjun.
4) Fix lockups in CPDMA driver, from Grygorii Strashko.
5) More MACSEC refcount et al fixes, from Sabrina Dubroca.
6) Fix MAC address setting in r8169 during runtime suspend, from
Chun-Hao Lin.
7) Various printf format specifier fixes, from Heinrich Schuchardt.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (59 commits)
qed: Fail driver load in 100g MSI mode.
ethernet: ti: davinci_emac: add missing of_node_put after calling of_parse_phandle
ethernet: stmicro: stmmac: add missing of_node_put after calling of_parse_phandle
ethernet: stmicro: stmmac: dwmac-socfpga: add missing of_node_put after calling of_parse_phandle
ethernet: renesas: sh_eth: add missing of_node_put after calling of_parse_phandle
ethernet: renesas: ravb_main: add missing of_node_put after calling of_parse_phandle
ethernet: marvell: pxa168_eth: add missing of_node_put after calling of_parse_phandle
ethernet: marvell: mvpp2: add missing of_node_put after calling of_parse_phandle
ethernet: marvell: mvneta: add missing of_node_put after calling of_parse_phandle
ethernet: hisilicon: hns: hns_dsaf_main: add missing of_node_put after calling of_parse_phandle
ethernet: hisilicon: hns: hns_dsaf_mac: add missing of_node_put after calling of_parse_phandle
ethernet: cavium: octeon: add missing of_node_put after calling of_parse_phandle
ethernet: aurora: nb8800: add missing of_node_put after calling of_parse_phandle
ethernet: arc: emac_main: add missing of_node_put after calling of_parse_phandle
ethernet: apm: xgene: add missing of_node_put after calling of_parse_phandle
ethernet: altera: add missing of_node_put
8139too: fix system hang when there is a tx timeout event.
qed: Fix error return code in qed_resc_alloc()
net: qlcnic: avoid superfluous assignement
dsa: b53: remove redundant if
...
This commit is contained in:
@@ -209,7 +209,7 @@ static int _omap_device_notifier_call(struct notifier_block *nb,
|
||||
int err;
|
||||
|
||||
switch (event) {
|
||||
case BUS_NOTIFY_DEL_DEVICE:
|
||||
case BUS_NOTIFY_REMOVED_DEVICE:
|
||||
if (pdev->archdata.od)
|
||||
omap_device_delete(pdev->archdata.od);
|
||||
break;
|
||||
|
||||
@@ -185,8 +185,8 @@ static ssize_t print_frame(char *buf, size_t size, char *frm,
|
||||
/* Fast forward. */
|
||||
i = count - cut;
|
||||
len += snprintf((buf + len), (size - len),
|
||||
"--- %u bytes skipped ---\n",
|
||||
(int)(count - (cut * 2)));
|
||||
"--- %zu bytes skipped ---\n",
|
||||
count - (cut * 2));
|
||||
}
|
||||
|
||||
if ((!(i % 10)) && i) {
|
||||
|
||||
@@ -233,8 +233,7 @@ static int b53_mmap_probe(struct platform_device *pdev)
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
||||
if (pdata)
|
||||
dev->pdata = pdata;
|
||||
dev->pdata = pdata;
|
||||
|
||||
platform_set_drvdata(pdev, dev);
|
||||
|
||||
|
||||
@@ -1622,7 +1622,7 @@ static int bcm_sf2_sw_setup(struct dsa_switch *ds)
|
||||
"switch_0", priv);
|
||||
if (ret < 0) {
|
||||
pr_err("failed to request switch_0 IRQ\n");
|
||||
goto out_unmap;
|
||||
goto out_mdio;
|
||||
}
|
||||
|
||||
ret = request_irq(priv->irq1, bcm_sf2_switch_1_isr, 0,
|
||||
@@ -1679,6 +1679,8 @@ static int bcm_sf2_sw_setup(struct dsa_switch *ds)
|
||||
|
||||
out_free_irq0:
|
||||
free_irq(priv->irq0, priv);
|
||||
out_mdio:
|
||||
bcm_sf2_mdio_unregister(priv);
|
||||
out_unmap:
|
||||
base = &priv->core;
|
||||
for (i = 0; i < BCM_SF2_REGS_NUM; i++) {
|
||||
@@ -1686,7 +1688,6 @@ out_unmap:
|
||||
iounmap(*base);
|
||||
base++;
|
||||
}
|
||||
bcm_sf2_mdio_unregister(priv);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -910,7 +910,8 @@ static int ax_probe(struct platform_device *pdev)
|
||||
iounmap(ax->map2);
|
||||
|
||||
exit_mem2:
|
||||
release_mem_region(mem2->start, mem2_size);
|
||||
if (mem2)
|
||||
release_mem_region(mem2->start, mem2_size);
|
||||
|
||||
exit_mem1:
|
||||
iounmap(ei_local->mem);
|
||||
|
||||
@@ -815,6 +815,7 @@ static int init_phy(struct net_device *dev)
|
||||
phydev = of_phy_connect(dev, phynode,
|
||||
&altera_tse_adjust_link, 0, priv->phy_iface);
|
||||
}
|
||||
of_node_put(phynode);
|
||||
|
||||
if (!phydev) {
|
||||
netdev_err(dev, "Could not find the PHY\n");
|
||||
|
||||
@@ -154,7 +154,7 @@ static int xgbe_alloc_channels(struct xgbe_prv_data *pdata)
|
||||
goto err_rx_ring;
|
||||
|
||||
for (i = 0, channel = channel_mem; i < count; i++, channel++) {
|
||||
snprintf(channel->name, sizeof(channel->name), "channel-%d", i);
|
||||
snprintf(channel->name, sizeof(channel->name), "channel-%u", i);
|
||||
channel->pdata = pdata;
|
||||
channel->queue_index = i;
|
||||
channel->dma_regs = pdata->xgmac_regs + DMA_CH_BASE +
|
||||
|
||||
@@ -772,6 +772,7 @@ int xgene_enet_phy_connect(struct net_device *ndev)
|
||||
|
||||
phy_dev = of_phy_connect(ndev, np, &xgene_enet_adjust_link,
|
||||
0, pdata->phy_mode);
|
||||
of_node_put(np);
|
||||
if (!phy_dev) {
|
||||
netdev_err(ndev, "Could not connect to PHY\n");
|
||||
return -ENODEV;
|
||||
|
||||
@@ -749,14 +749,16 @@ int arc_emac_probe(struct net_device *ndev, int interface)
|
||||
err = of_address_to_resource(dev->of_node, 0, &res_regs);
|
||||
if (err) {
|
||||
dev_err(dev, "failed to retrieve registers base from device tree\n");
|
||||
return -ENODEV;
|
||||
err = -ENODEV;
|
||||
goto out_put_node;
|
||||
}
|
||||
|
||||
/* Get IRQ from device tree */
|
||||
irq = irq_of_parse_and_map(dev->of_node, 0);
|
||||
if (!irq) {
|
||||
dev_err(dev, "failed to retrieve <irq> value from device tree\n");
|
||||
return -ENODEV;
|
||||
err = -ENODEV;
|
||||
goto out_put_node;
|
||||
}
|
||||
|
||||
ndev->netdev_ops = &arc_emac_netdev_ops;
|
||||
@@ -778,7 +780,7 @@ int arc_emac_probe(struct net_device *ndev, int interface)
|
||||
err = clk_prepare_enable(priv->clk);
|
||||
if (err) {
|
||||
dev_err(dev, "failed to enable clock\n");
|
||||
return err;
|
||||
goto out_put_node;
|
||||
}
|
||||
|
||||
clock_frequency = clk_get_rate(priv->clk);
|
||||
@@ -787,7 +789,8 @@ int arc_emac_probe(struct net_device *ndev, int interface)
|
||||
if (of_property_read_u32(dev->of_node, "clock-frequency",
|
||||
&clock_frequency)) {
|
||||
dev_err(dev, "failed to retrieve <clock-frequency> from device tree\n");
|
||||
return -EINVAL;
|
||||
err = -EINVAL;
|
||||
goto out_put_node;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -867,6 +870,7 @@ int arc_emac_probe(struct net_device *ndev, int interface)
|
||||
goto out_netif_api;
|
||||
}
|
||||
|
||||
of_node_put(phy_node);
|
||||
return 0;
|
||||
|
||||
out_netif_api:
|
||||
@@ -877,6 +881,9 @@ out_mdio:
|
||||
out_clken:
|
||||
if (priv->clk)
|
||||
clk_disable_unprepare(priv->clk);
|
||||
out_put_node:
|
||||
of_node_put(phy_node);
|
||||
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(arc_emac_probe);
|
||||
|
||||
@@ -1504,6 +1504,7 @@ static int nb8800_probe(struct platform_device *pdev)
|
||||
err_free_dma:
|
||||
nb8800_dma_free(dev);
|
||||
err_free_bus:
|
||||
of_node_put(priv->phy_node);
|
||||
mdiobus_unregister(bus);
|
||||
err_disable_clk:
|
||||
clk_disable_unprepare(priv->clk);
|
||||
@@ -1519,6 +1520,7 @@ static int nb8800_remove(struct platform_device *pdev)
|
||||
struct nb8800_priv *priv = netdev_priv(ndev);
|
||||
|
||||
unregister_netdev(ndev);
|
||||
of_node_put(priv->phy_node);
|
||||
|
||||
mdiobus_unregister(priv->mii_bus);
|
||||
|
||||
|
||||
@@ -1859,7 +1859,7 @@ static int bcm_enet_probe(struct platform_device *pdev)
|
||||
} else {
|
||||
|
||||
/* run platform code to initialize PHY device */
|
||||
if (pd->mii_config &&
|
||||
if (pd && pd->mii_config &&
|
||||
pd->mii_config(dev, 1, bcm_enet_mdio_read_mii,
|
||||
bcm_enet_mdio_write_mii)) {
|
||||
dev_err(&pdev->dev, "unable to configure mdio bus\n");
|
||||
|
||||
@@ -312,7 +312,8 @@ bnad_debugfs_write_regrd(struct file *file, const char __user *buf,
|
||||
struct bnad_debug_info *regrd_debug = file->private_data;
|
||||
struct bnad *bnad = (struct bnad *)regrd_debug->i_private;
|
||||
struct bfa_ioc *ioc = &bnad->bna.ioceth.ioc;
|
||||
int addr, len, rc, i;
|
||||
int rc, i;
|
||||
u32 addr, len;
|
||||
u32 *regbuf;
|
||||
void __iomem *rb, *reg_addr;
|
||||
unsigned long flags;
|
||||
@@ -372,7 +373,8 @@ bnad_debugfs_write_regwr(struct file *file, const char __user *buf,
|
||||
struct bnad_debug_info *debug = file->private_data;
|
||||
struct bnad *bnad = (struct bnad *)debug->i_private;
|
||||
struct bfa_ioc *ioc = &bnad->bna.ioceth.ioc;
|
||||
int addr, val, rc;
|
||||
int rc;
|
||||
u32 addr, val;
|
||||
void __iomem *reg_addr;
|
||||
unsigned long flags;
|
||||
void *kern_buf;
|
||||
|
||||
@@ -1513,6 +1513,7 @@ static int octeon_mgmt_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
|
||||
err:
|
||||
of_node_put(p->phy_np);
|
||||
free_netdev(netdev);
|
||||
return result;
|
||||
}
|
||||
@@ -1520,8 +1521,10 @@ err:
|
||||
static int octeon_mgmt_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct net_device *netdev = platform_get_drvdata(pdev);
|
||||
struct octeon_mgmt *p = netdev_priv(netdev);
|
||||
|
||||
unregister_netdev(netdev);
|
||||
of_node_put(p->phy_np);
|
||||
free_netdev(netdev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1192,7 +1192,7 @@ out_free: dev_kfree_skb_any(skb);
|
||||
|
||||
/* Discard the packet if the length is greater than mtu */
|
||||
max_pkt_len = ETH_HLEN + dev->mtu;
|
||||
if (skb_vlan_tag_present(skb))
|
||||
if (skb_vlan_tagged(skb))
|
||||
max_pkt_len += VLAN_HLEN;
|
||||
if (!skb_shinfo(skb)->gso_size && (unlikely(skb->len > max_pkt_len)))
|
||||
goto out_free;
|
||||
|
||||
@@ -1188,7 +1188,7 @@ int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
|
||||
/* Discard the packet if the length is greater than mtu */
|
||||
max_pkt_len = ETH_HLEN + dev->mtu;
|
||||
if (skb_vlan_tag_present(skb))
|
||||
if (skb_vlan_tagged(skb))
|
||||
max_pkt_len += VLAN_HLEN;
|
||||
if (!skb_shinfo(skb)->gso_size && (unlikely(skb->len > max_pkt_len)))
|
||||
goto out_free;
|
||||
|
||||
@@ -1566,7 +1566,7 @@ static int enic_request_intr(struct enic *enic)
|
||||
intr = enic_msix_rq_intr(enic, i);
|
||||
snprintf(enic->msix[intr].devname,
|
||||
sizeof(enic->msix[intr].devname),
|
||||
"%.11s-rx-%d", netdev->name, i);
|
||||
"%.11s-rx-%u", netdev->name, i);
|
||||
enic->msix[intr].isr = enic_isr_msix;
|
||||
enic->msix[intr].devid = &enic->napi[i];
|
||||
}
|
||||
@@ -1577,7 +1577,7 @@ static int enic_request_intr(struct enic *enic)
|
||||
intr = enic_msix_wq_intr(enic, i);
|
||||
snprintf(enic->msix[intr].devname,
|
||||
sizeof(enic->msix[intr].devname),
|
||||
"%.11s-tx-%d", netdev->name, i);
|
||||
"%.11s-tx-%u", netdev->name, i);
|
||||
enic->msix[intr].isr = enic_isr_msix;
|
||||
enic->msix[intr].devid = &enic->napi[wq];
|
||||
}
|
||||
|
||||
@@ -1319,7 +1319,7 @@ de4x5_open(struct net_device *dev)
|
||||
|
||||
if (request_irq(dev->irq, de4x5_interrupt, IRQF_SHARED,
|
||||
lp->adapter_name, dev)) {
|
||||
printk("de4x5_open(): Requested IRQ%d is busy - attemping FAST/SHARE...", dev->irq);
|
||||
printk("de4x5_open(): Requested IRQ%d is busy - attempting FAST/SHARE...", dev->irq);
|
||||
if (request_irq(dev->irq, de4x5_interrupt, IRQF_SHARED,
|
||||
lp->adapter_name, dev)) {
|
||||
printk("\n Cannot get IRQ- reconfigure your hardware.\n");
|
||||
|
||||
@@ -795,6 +795,7 @@ static int hns_mac_get_info(struct hns_mac_cb *mac_cb)
|
||||
dev_dbg(mac_cb->dev, "mac%d phy_node: %s\n",
|
||||
mac_cb->mac_id, np->name);
|
||||
}
|
||||
of_node_put(np);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -812,10 +813,12 @@ static int hns_mac_get_info(struct hns_mac_cb *mac_cb)
|
||||
dev_dbg(mac_cb->dev, "mac%d phy_node: %s\n",
|
||||
mac_cb->mac_id, np->name);
|
||||
}
|
||||
of_node_put(np);
|
||||
|
||||
syscon = syscon_node_to_regmap(
|
||||
of_parse_phandle(to_of_node(mac_cb->fw_port),
|
||||
"serdes-syscon", 0));
|
||||
np = of_parse_phandle(to_of_node(mac_cb->fw_port),
|
||||
"serdes-syscon", 0);
|
||||
syscon = syscon_node_to_regmap(np);
|
||||
of_node_put(np);
|
||||
if (IS_ERR_OR_NULL(syscon)) {
|
||||
dev_err(mac_cb->dev, "serdes-syscon is needed!\n");
|
||||
return -EINVAL;
|
||||
|
||||
@@ -51,7 +51,7 @@ int hns_dsaf_get_cfg(struct dsaf_device *dsaf_dev)
|
||||
const char *mode_str;
|
||||
struct regmap *syscon;
|
||||
struct resource *res;
|
||||
struct device_node *np = dsaf_dev->dev->of_node;
|
||||
struct device_node *np = dsaf_dev->dev->of_node, *np_temp;
|
||||
struct platform_device *pdev = to_platform_device(dsaf_dev->dev);
|
||||
|
||||
if (dev_of_node(dsaf_dev->dev)) {
|
||||
@@ -102,8 +102,9 @@ int hns_dsaf_get_cfg(struct dsaf_device *dsaf_dev)
|
||||
dsaf_dev->dsaf_tc_mode = HRD_DSAF_4TC_MODE;
|
||||
|
||||
if (dev_of_node(dsaf_dev->dev)) {
|
||||
syscon = syscon_node_to_regmap(
|
||||
of_parse_phandle(np, "subctrl-syscon", 0));
|
||||
np_temp = of_parse_phandle(np, "subctrl-syscon", 0);
|
||||
syscon = syscon_node_to_regmap(np_temp);
|
||||
of_node_put(np_temp);
|
||||
if (IS_ERR_OR_NULL(syscon)) {
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM,
|
||||
res_idx++);
|
||||
|
||||
@@ -4118,6 +4118,7 @@ static int mvneta_probe(struct platform_device *pdev)
|
||||
pp->bm_priv = NULL;
|
||||
}
|
||||
}
|
||||
of_node_put(bm_node);
|
||||
|
||||
err = mvneta_init(&pdev->dev, pp);
|
||||
if (err < 0)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user