[PATCH -next] staging: mt7621-pci: Use PTR_ERR_OR_ZERO in mt7621_pcie_parse_dt()
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: YueHaibing --- drivers/staging/mt7621-pci/pci-mt7621.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index ba1f117..d2cb910 100644 --- a/drivers/staging/mt7621-pci/pci-mt7621.c +++ b/drivers/staging/mt7621-pci/pci-mt7621.c @@ -396,10 +396,7 @@ static int mt7621_pcie_parse_dt(struct mt7621_pcie *pcie) } pcie->base = devm_ioremap_resource(dev, ®s); - if (IS_ERR(pcie->base)) - return PTR_ERR(pcie->base); - - return 0; + return PTR_ERR_OR_ZERO(pcie->base); } static int mt7621_pcie_request_resources(struct mt7621_pcie *pcie, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 00/22] net: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. YueHaibing (22): net: micrel: fix return type of ndo_start_xmit function net: freescale: fix return type of ndo_start_xmit function net: seeq: fix return type of ndo_start_xmit function net: cirrus: fix return type of ndo_start_xmit function net: sgi: fix return type of ndo_start_xmit function net: wiznet: fix return type of ndo_start_xmit function net: i825xx: fix return type of ndo_start_xmit function net: apple: fix return type of ndo_start_xmit function net: smsc: fix return type of ndo_start_xmit function net: ti: fix return type of ndo_start_xmit function net: faraday: fix return type of ndo_start_xmit function net: ovs: fix return type of ndo_start_xmit function net: xen-netback: fix return type of ndo_start_xmit function net: caif: fix return type of ndo_start_xmit function net: hamradio: fix return type of ndo_start_xmit function usbnet: ipheth: fix return type of ndo_start_xmit function hv_netvsc: fix return type of ndo_start_xmit function can: xilinx: fix return type of ndo_start_xmit function net: plip: fix return type of ndo_start_xmit function rionet: fix return type of ndo_start_xmit function l2tp: fix return type of ndo_start_xmit function net: hsr: fix return type of ndo_start_xmit function drivers/net/caif/caif_hsi.c | 10 +- drivers/net/caif/caif_serial.c| 7 +-- drivers/net/caif/caif_spi.c | 6 +++--- drivers/net/caif/caif_virtio.c| 2 +- drivers/net/can/xilinx_can.c | 2 +- drivers/net/ethernet/apple/bmac.c | 4 ++-- drivers/net/ethernet/apple/mace.c | 4 ++-- drivers/net/ethernet/apple/macmace.c | 4 ++-- drivers/net/ethernet/cirrus/ep93xx_eth.c | 2 +- drivers/net/ethernet/cirrus/mac89x0.c | 4 ++-- drivers/net/ethernet/faraday/ftgmac100.c | 4 ++-- drivers/net/ethernet/faraday/ftmac100.c | 7 --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c| 3 ++- drivers/net/ethernet/freescale/fec_mpc52xx.c | 3 ++- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 3 ++- drivers/net/ethernet/freescale/gianfar.c | 4 ++-- drivers/net/ethernet/freescale/ucc_geth.c | 3 ++- drivers/net/ethernet/i825xx/ether1.c | 5 +++-- drivers/net/ethernet/i825xx/lib82596.c| 4 ++-- drivers/net/ethernet/i825xx/sun3_82586.c | 6 -- drivers/net/ethernet/micrel/ks8695net.c | 2 +- drivers/net/ethernet/micrel/ks8851_mll.c | 4 ++-- drivers/net/ethernet/seeq/ether3.c| 5 +++-- drivers/net/ethernet/seeq/sgiseeq.c | 3 ++- drivers/net/ethernet/sgi/ioc3-eth.c | 4 ++-- drivers/net/ethernet/sgi/meth.c | 2 +- drivers/net/ethernet/smsc/smc911x.c | 3 ++- drivers/net/ethernet/smsc/smc91x.c| 3 ++- drivers/net/ethernet/smsc/smsc911x.c | 3 ++- drivers/net/ethernet/ti/cpmac.c | 2 +- drivers/net/ethernet/ti/davinci_emac.c| 2 +- drivers/net/ethernet/ti/netcp_core.c | 8 drivers/net/ethernet/wiznet/w5100.c | 2 +- drivers/net/ethernet/wiznet/w5300.c | 2 +- drivers/net/hamradio/baycom_epp.c | 3 ++- drivers/net/hamradio/dmascc.c | 4 ++-- drivers/net/hyperv/netvsc_drv.c | 10 +++--- drivers/net/plip/plip.c | 4 ++-- drivers/net/rionet.c | 3 ++- drivers/net/usb/ipheth.c | 2 +- drivers/net/xen-netback/interface.c | 3 ++- net/caif/chnl_net.c | 3 ++- net/hsr/hsr_device.c | 2 +- net/l2tp/l2tp_eth.c | 3 ++- net/openvswitch/vport-internal_dev.c | 5 +++-- 45 files changed, 100 insertions(+), 74 deletions(-) -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 02/22] net: freescale: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c| 3 ++- drivers/net/ethernet/freescale/fec_mpc52xx.c | 3 ++- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 3 ++- drivers/net/ethernet/freescale/gianfar.c | 4 ++-- drivers/net/ethernet/freescale/ucc_geth.c | 3 ++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index a5131a5..84843de 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -2044,7 +2044,8 @@ static inline int dpaa_xmit(struct dpaa_priv *priv, return 0; } -static int dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev) +static netdev_tx_t +dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev) { const int queue_mapping = skb_get_queue_mapping(skb); bool nonlinear = skb_is_nonlinear(skb); diff --git a/drivers/net/ethernet/freescale/fec_mpc52xx.c b/drivers/net/ethernet/freescale/fec_mpc52xx.c index 6d7269d..b90bab7 100644 --- a/drivers/net/ethernet/freescale/fec_mpc52xx.c +++ b/drivers/net/ethernet/freescale/fec_mpc52xx.c @@ -305,7 +305,8 @@ static int mpc52xx_fec_close(struct net_device *dev) * invariant will hold if you make sure that the netif_*_queue() * calls are done at the proper times. */ -static int mpc52xx_fec_start_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t +mpc52xx_fec_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct mpc52xx_fec_priv *priv = netdev_priv(dev); struct bcom_fec_bd *bd; diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c index 2c2976a..7c548ed 100644 --- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c @@ -481,7 +481,8 @@ static struct sk_buff *tx_skb_align_workaround(struct net_device *dev, } #endif -static int fs_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t +fs_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct fs_enet_private *fep = netdev_priv(dev); cbd_t __iomem *bdp; diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index c488d31..0bd21a4 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -110,7 +110,7 @@ const char gfar_driver_version[] = "2.0"; static int gfar_enet_open(struct net_device *dev); -static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t gfar_start_xmit(struct sk_buff *skb, struct net_device *dev); static void gfar_reset_task(struct work_struct *work); static void gfar_timeout(struct net_device *dev); static int gfar_close(struct net_device *dev); @@ -2332,7 +2332,7 @@ static inline bool gfar_csum_errata_76(struct gfar_private *priv, /* This is called by the kernel when a frame is ready for transmission. * It is pointed to by the dev->hard_start_xmit function pointer */ -static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t gfar_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct gfar_private *priv = netdev_priv(dev); struct gfar_priv_tx_q *tx_queue = NULL; diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c index 9600837..32e0270 100644 --- a/drivers/net/ethernet/freescale/ucc_geth.c +++ b/drivers/net/ethernet/freescale/ucc_geth.c @@ -3078,7 +3078,8 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) /* This is called by the kernel when a frame is ready for transmission. */ /* It is pointed to by the dev->hard_start_xmit function pointer */ -static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t +ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct ucc_geth_private *ugeth = netdev_priv(dev); #ifdef CONFIG_UGETH_TX_ON_DEMAND -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 01/22] net: micrel: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/ethernet/micrel/ks8695net.c | 2 +- drivers/net/ethernet/micrel/ks8851_mll.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/micrel/ks8695net.c b/drivers/net/ethernet/micrel/ks8695net.c index bd51e05..b881f5d 100644 --- a/drivers/net/ethernet/micrel/ks8695net.c +++ b/drivers/net/ethernet/micrel/ks8695net.c @@ -1164,7 +1164,7 @@ static int ks8695_poll(struct napi_struct *napi, int budget) * sk_buff and adds it to the TX ring. It then kicks the TX DMA * engine to ensure transmission begins. */ -static int +static netdev_tx_t ks8695_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct ks8695_priv *ksp = netdev_priv(ndev); diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c index 0e9719f..35f8c9e 100644 --- a/drivers/net/ethernet/micrel/ks8851_mll.c +++ b/drivers/net/ethernet/micrel/ks8851_mll.c @@ -1021,9 +1021,9 @@ static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len) * spin_lock_irqsave is required because tx and rx should be mutual exclusive. * So while tx is in-progress, prevent IRQ interrupt from happenning. */ -static int ks_start_xmit(struct sk_buff *skb, struct net_device *netdev) +static netdev_tx_t ks_start_xmit(struct sk_buff *skb, struct net_device *netdev) { - int retv = NETDEV_TX_OK; + netdev_tx_t retv = NETDEV_TX_OK; struct ks_net *ks = netdev_priv(netdev); disable_irq(netdev->irq); -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 05/22] net: sgi: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/ethernet/sgi/ioc3-eth.c | 4 ++-- drivers/net/ethernet/sgi/meth.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c index 18d533f..3140999 100644 --- a/drivers/net/ethernet/sgi/ioc3-eth.c +++ b/drivers/net/ethernet/sgi/ioc3-eth.c @@ -99,7 +99,7 @@ struct ioc3_private { static int ioc3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static void ioc3_set_multicast_list(struct net_device *dev); -static int ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev); static void ioc3_timeout(struct net_device *dev); static inline unsigned int ioc3_hash(const unsigned char *addr); static inline void ioc3_stop(struct ioc3_private *ip); @@ -1390,7 +1390,7 @@ static void ioc3_remove_one(struct pci_dev *pdev) .remove = ioc3_remove_one, }; -static int ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev) { unsigned long data; struct ioc3_private *ip = netdev_priv(dev); diff --git a/drivers/net/ethernet/sgi/meth.c b/drivers/net/ethernet/sgi/meth.c index ea55abd..703fbbe 100644 --- a/drivers/net/ethernet/sgi/meth.c +++ b/drivers/net/ethernet/sgi/meth.c @@ -697,7 +697,7 @@ static void meth_add_to_tx_ring(struct meth_private *priv, struct sk_buff *skb) /* * Transmit a packet (called by the kernel) */ -static int meth_tx(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t meth_tx(struct sk_buff *skb, struct net_device *dev) { struct meth_private *priv = netdev_priv(dev); unsigned long flags; -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 09/22] net: smsc: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/ethernet/smsc/smc911x.c | 3 ++- drivers/net/ethernet/smsc/smc91x.c | 3 ++- drivers/net/ethernet/smsc/smsc911x.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c index b1b53f6..8355dfb 100644 --- a/drivers/net/ethernet/smsc/smc911x.c +++ b/drivers/net/ethernet/smsc/smc911x.c @@ -513,7 +513,8 @@ static void smc911x_hardware_send_pkt(struct net_device *dev) * now, or set the card to generates an interrupt when ready * for the packet. */ -static int smc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t +smc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct smc911x_local *lp = netdev_priv(dev); unsigned int free; diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index b944828..8d6cff8 100644 --- a/drivers/net/ethernet/smsc/smc91x.c +++ b/drivers/net/ethernet/smsc/smc91x.c @@ -638,7 +638,8 @@ static void smc_hardware_send_pkt(unsigned long data) * now, or set the card to generates an interrupt when ready * for the packet. */ -static int smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t +smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct smc_local *lp = netdev_priv(dev); void __iomem *ioaddr = lp->base; diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index c009407..99a5a8a 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c @@ -1786,7 +1786,8 @@ static int smsc911x_stop(struct net_device *dev) } /* Entry point for transmitting a packet */ -static int smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t +smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct smsc911x_data *pdata = netdev_priv(dev); unsigned int freespace; -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 06/22] net: wiznet: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/ethernet/wiznet/w5100.c | 2 +- drivers/net/ethernet/wiznet/w5300.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/wiznet/w5100.c b/drivers/net/ethernet/wiznet/w5100.c index 2bdfb39..d8ba512 100644 --- a/drivers/net/ethernet/wiznet/w5100.c +++ b/drivers/net/ethernet/wiznet/w5100.c @@ -835,7 +835,7 @@ static void w5100_tx_work(struct work_struct *work) w5100_tx_skb(priv->ndev, skb); } -static int w5100_start_tx(struct sk_buff *skb, struct net_device *ndev) +static netdev_tx_t w5100_start_tx(struct sk_buff *skb, struct net_device *ndev) { struct w5100_priv *priv = netdev_priv(ndev); diff --git a/drivers/net/ethernet/wiznet/w5300.c b/drivers/net/ethernet/wiznet/w5300.c index 56ae573..80fdbff 100644 --- a/drivers/net/ethernet/wiznet/w5300.c +++ b/drivers/net/ethernet/wiznet/w5300.c @@ -365,7 +365,7 @@ static void w5300_tx_timeout(struct net_device *ndev) netif_wake_queue(ndev); } -static int w5300_start_tx(struct sk_buff *skb, struct net_device *ndev) +static netdev_tx_t w5300_start_tx(struct sk_buff *skb, struct net_device *ndev) { struct w5300_priv *priv = netdev_priv(ndev); -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 03/22] net: seeq: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/ethernet/seeq/ether3.c | 5 +++-- drivers/net/ethernet/seeq/sgiseeq.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/seeq/ether3.c b/drivers/net/ethernet/seeq/ether3.c index c5bc124..d1bb73b 100644 --- a/drivers/net/ethernet/seeq/ether3.c +++ b/drivers/net/ethernet/seeq/ether3.c @@ -77,7 +77,8 @@ static int ether3_rx(struct net_device *dev, unsigned int maxcnt); static voidether3_tx(struct net_device *dev); static int ether3_open (struct net_device *dev); -static int ether3_sendpacket (struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t ether3_sendpacket(struct sk_buff *skb, + struct net_device *dev); static irqreturn_t ether3_interrupt (int irq, void *dev_id); static int ether3_close (struct net_device *dev); static voidether3_setmulticastlist (struct net_device *dev); @@ -481,7 +482,7 @@ static void ether3_timeout(struct net_device *dev) /* * Transmit a packet */ -static int +static netdev_tx_t ether3_sendpacket(struct sk_buff *skb, struct net_device *dev) { unsigned long flags; diff --git a/drivers/net/ethernet/seeq/sgiseeq.c b/drivers/net/ethernet/seeq/sgiseeq.c index 573691b..70cce63 100644 --- a/drivers/net/ethernet/seeq/sgiseeq.c +++ b/drivers/net/ethernet/seeq/sgiseeq.c @@ -578,7 +578,8 @@ static inline int sgiseeq_reset(struct net_device *dev) return 0; } -static int sgiseeq_start_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t +sgiseeq_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct sgiseeq_private *sp = netdev_priv(dev); struct hpc3_ethregs *hregs = sp->hregs; -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 08/22] net: apple: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/ethernet/apple/bmac.c| 4 ++-- drivers/net/ethernet/apple/mace.c| 4 ++-- drivers/net/ethernet/apple/macmace.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/apple/bmac.c b/drivers/net/ethernet/apple/bmac.c index 024998d..6a8e256 100644 --- a/drivers/net/ethernet/apple/bmac.c +++ b/drivers/net/ethernet/apple/bmac.c @@ -154,7 +154,7 @@ struct bmac_data { static irqreturn_t bmac_rxdma_intr(int irq, void *dev_id); static void bmac_set_timeout(struct net_device *dev); static void bmac_tx_timeout(struct timer_list *t); -static int bmac_output(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t bmac_output(struct sk_buff *skb, struct net_device *dev); static void bmac_start(struct net_device *dev); #defineDBDMA_SET(x)( ((x) | (x) << 16) ) @@ -1456,7 +1456,7 @@ static int bmac_close(struct net_device *dev) spin_unlock_irqrestore(&bp->lock, flags); } -static int +static netdev_tx_t bmac_output(struct sk_buff *skb, struct net_device *dev) { struct bmac_data *bp = netdev_priv(dev); diff --git a/drivers/net/ethernet/apple/mace.c b/drivers/net/ethernet/apple/mace.c index 0b5429d..68b9ee4 100644 --- a/drivers/net/ethernet/apple/mace.c +++ b/drivers/net/ethernet/apple/mace.c @@ -78,7 +78,7 @@ struct mace_data { static int mace_open(struct net_device *dev); static int mace_close(struct net_device *dev); -static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t mace_xmit_start(struct sk_buff *skb, struct net_device *dev); static void mace_set_multicast(struct net_device *dev); static void mace_reset(struct net_device *dev); static int mace_set_address(struct net_device *dev, void *addr); @@ -525,7 +525,7 @@ static inline void mace_set_timeout(struct net_device *dev) mp->timeout_active = 1; } -static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t mace_xmit_start(struct sk_buff *skb, struct net_device *dev) { struct mace_data *mp = netdev_priv(dev); volatile struct dbdma_regs __iomem *td = mp->tx_dma; diff --git a/drivers/net/ethernet/apple/macmace.c b/drivers/net/ethernet/apple/macmace.c index 137cbb4..376f2c2 100644 --- a/drivers/net/ethernet/apple/macmace.c +++ b/drivers/net/ethernet/apple/macmace.c @@ -89,7 +89,7 @@ struct mace_frame { static int mace_open(struct net_device *dev); static int mace_close(struct net_device *dev); -static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t mace_xmit_start(struct sk_buff *skb, struct net_device *dev); static void mace_set_multicast(struct net_device *dev); static int mace_set_address(struct net_device *dev, void *addr); static void mace_reset(struct net_device *dev); @@ -444,7 +444,7 @@ static int mace_close(struct net_device *dev) * Transmit a frame */ -static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t mace_xmit_start(struct sk_buff *skb, struct net_device *dev) { struct mace_data *mp = netdev_priv(dev); unsigned long flags; -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 07/22] net: i825xx: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/ethernet/i825xx/ether1.c | 5 +++-- drivers/net/ethernet/i825xx/lib82596.c | 4 ++-- drivers/net/ethernet/i825xx/sun3_82586.c | 6 -- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/i825xx/ether1.c b/drivers/net/ethernet/i825xx/ether1.c index dc98345..35f6291 100644 --- a/drivers/net/ethernet/i825xx/ether1.c +++ b/drivers/net/ethernet/i825xx/ether1.c @@ -64,7 +64,8 @@ #define RX_AREA_END0x0fc00 static int ether1_open(struct net_device *dev); -static int ether1_sendpacket(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t ether1_sendpacket(struct sk_buff *skb, +struct net_device *dev); static irqreturn_t ether1_interrupt(int irq, void *dev_id); static int ether1_close(struct net_device *dev); static void ether1_setmulticastlist(struct net_device *dev); @@ -667,7 +668,7 @@ netif_wake_queue(dev); } -static int +static netdev_tx_t ether1_sendpacket (struct sk_buff *skb, struct net_device *dev) { int tmp, tst, nopaddr, txaddr, tbdaddr, dataddr; diff --git a/drivers/net/ethernet/i825xx/lib82596.c b/drivers/net/ethernet/i825xx/lib82596.c index f00a1dc..2f7ae11 100644 --- a/drivers/net/ethernet/i825xx/lib82596.c +++ b/drivers/net/ethernet/i825xx/lib82596.c @@ -347,7 +347,7 @@ struct i596_private { 0x7f /* *multi IA */ }; static int i596_open(struct net_device *dev); -static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t i596_start_xmit(struct sk_buff *skb, struct net_device *dev); static irqreturn_t i596_interrupt(int irq, void *dev_id); static int i596_close(struct net_device *dev); static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd); @@ -966,7 +966,7 @@ static void i596_tx_timeout (struct net_device *dev) } -static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t i596_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct i596_private *lp = netdev_priv(dev); struct tx_cmd *tx_cmd; diff --git a/drivers/net/ethernet/i825xx/sun3_82586.c b/drivers/net/ethernet/i825xx/sun3_82586.c index 8bb15a8..1a86184 100644 --- a/drivers/net/ethernet/i825xx/sun3_82586.c +++ b/drivers/net/ethernet/i825xx/sun3_82586.c @@ -121,7 +121,8 @@ static irqreturn_t sun3_82586_interrupt(int irq,void *dev_id); static int sun3_82586_open(struct net_device *dev); static int sun3_82586_close(struct net_device *dev); -static int sun3_82586_send_packet(struct sk_buff *,struct net_device *); +static netdev_tx_t sun3_82586_send_packet(struct sk_buff *, + struct net_device *); static struct net_device_stats *sun3_82586_get_stats(struct net_device *dev); static voidset_multicast_list(struct net_device *dev); static voidsun3_82586_timeout(struct net_device *dev); @@ -1002,7 +1003,8 @@ static void sun3_82586_timeout(struct net_device *dev) * send frame */ -static int sun3_82586_send_packet(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t +sun3_82586_send_packet(struct sk_buff *skb, struct net_device *dev) { int len,i; #ifndef NO_NOPCOMMANDS -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 10/22] net: ti: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/ethernet/ti/cpmac.c| 2 +- drivers/net/ethernet/ti/davinci_emac.c | 2 +- drivers/net/ethernet/ti/netcp_core.c | 8 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c index 9b8a30b..64c45eb 100644 --- a/drivers/net/ethernet/ti/cpmac.c +++ b/drivers/net/ethernet/ti/cpmac.c @@ -544,7 +544,7 @@ static int cpmac_poll(struct napi_struct *napi, int budget) } -static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev) { int queue; unsigned int len; diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c index f270bee..b83f32d 100644 --- a/drivers/net/ethernet/ti/davinci_emac.c +++ b/drivers/net/ethernet/ti/davinci_emac.c @@ -943,7 +943,7 @@ static void emac_tx_handler(void *token, int len, int status) * * Returns success(NETDEV_TX_OK) or error code (typically out of desc's) */ -static int emac_dev_xmit(struct sk_buff *skb, struct net_device *ndev) +static netdev_tx_t emac_dev_xmit(struct sk_buff *skb, struct net_device *ndev) { struct device *emac_dev = &ndev->dev; int ret_code; diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c index 1f61226..2d8cfe8 100644 --- a/drivers/net/ethernet/ti/netcp_core.c +++ b/drivers/net/ethernet/ti/netcp_core.c @@ -1270,7 +1270,8 @@ static int netcp_tx_submit_skb(struct netcp_intf *netcp, } /* Submit the packet */ -static int netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev) +static netdev_tx_t +netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct netcp_intf *netcp = netdev_priv(ndev); struct netcp_stats *tx_stats = &netcp->stats; @@ -1290,7 +1291,7 @@ static int netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev) dev_warn(netcp->ndev_dev, "padding failed (%d), packet dropped\n", ret); tx_stats->tx_dropped++; - return ret; + return NETDEV_TX_BUSY; } skb->len = NETCP_MIN_PACKET_SIZE; } @@ -1298,7 +1299,6 @@ static int netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev) desc = netcp_tx_map_skb(skb, netcp); if (unlikely(!desc)) { netif_stop_subqueue(ndev, subqueue); - ret = -ENOBUFS; goto drop; } @@ -1319,7 +1319,7 @@ static int netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev) if (desc) netcp_free_tx_desc_chain(netcp, desc, sizeof(*desc)); dev_kfree_skb(skb); - return ret; + return NETDEV_TX_BUSY; } int netcp_txpipe_close(struct netcp_tx_pipe *tx_pipe) -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 14/22] net: caif: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/caif/caif_hsi.c| 10 +- drivers/net/caif/caif_serial.c | 7 +-- drivers/net/caif/caif_spi.c| 6 +++--- drivers/net/caif/caif_virtio.c | 2 +- net/caif/chnl_net.c| 3 ++- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c index 433a14b..70c449e 100644 --- a/drivers/net/caif/caif_hsi.c +++ b/drivers/net/caif/caif_hsi.c @@ -1006,7 +1006,7 @@ static void cfhsi_aggregation_tout(struct timer_list *t) cfhsi_start_tx(cfhsi); } -static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t cfhsi_xmit(struct sk_buff *skb, struct net_device *dev) { struct cfhsi *cfhsi = NULL; int start_xfer = 0; @@ -1014,7 +1014,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev) int prio; if (!dev) - return -EINVAL; + return NETDEV_TX_BUSY; cfhsi = netdev_priv(dev); @@ -1048,7 +1048,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev) if (WARN_ON(test_bit(CFHSI_SHUTDOWN, &cfhsi->bits))) { spin_unlock_bh(&cfhsi->lock); cfhsi_abort_tx(cfhsi); - return -EINVAL; + return NETDEV_TX_BUSY; } /* Send flow off if number of packets is above high water mark. */ @@ -1072,7 +1072,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev) spin_unlock_bh(&cfhsi->lock); if (aggregate_ready) cfhsi_start_tx(cfhsi); - return 0; + return NETDEV_TX_OK; } /* Delete inactivity timer if started. */ @@ -1102,7 +1102,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev) queue_work(cfhsi->wq, &cfhsi->wake_up_work); } - return 0; + return NETDEV_TX_OK; } static const struct net_device_ops cfhsi_netdevops; diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c index a0f954f..acb3264 100644 --- a/drivers/net/caif/caif_serial.c +++ b/drivers/net/caif/caif_serial.c @@ -275,7 +275,7 @@ static int handle_tx(struct ser_device *ser) return tty_wr; } -static int caif_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t caif_xmit(struct sk_buff *skb, struct net_device *dev) { struct ser_device *ser; @@ -290,7 +290,10 @@ static int caif_xmit(struct sk_buff *skb, struct net_device *dev) ser->common.flowctrl(ser->dev, OFF); skb_queue_tail(&ser->head, skb); - return handle_tx(ser); + if (handle_tx(ser)) + return NETDEV_TX_BUSY; + + return NETDEV_TX_OK; } diff --git a/drivers/net/caif/caif_spi.c b/drivers/net/caif/caif_spi.c index d28a139..9040658 100644 --- a/drivers/net/caif/caif_spi.c +++ b/drivers/net/caif/caif_spi.c @@ -486,12 +486,12 @@ static void cfspi_xfer_done_cb(struct cfspi_ifc *ifc) complete(&cfspi->comp); } -static int cfspi_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t cfspi_xmit(struct sk_buff *skb, struct net_device *dev) { struct cfspi *cfspi = NULL; unsigned long flags; if (!dev) - return -EINVAL; + return NETDEV_TX_BUSY; cfspi = netdev_priv(dev); @@ -512,7 +512,7 @@ static int cfspi_xmit(struct sk_buff *skb, struct net_device *dev) cfspi->cfdev.flowctrl(cfspi->ndev, 0); } - return 0; + return NETDEV_TX_OK; } int cfspi_rxfrm(struct cfspi *cfspi, u8 *buf, size_t len) diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c index 2814e0d..f5507db 100644 --- a/drivers/net/caif/caif_virtio.c +++ b/drivers/net/caif/caif_virtio.c @@ -519,7 +519,7 @@ static struct buf_info *cfv_alloc_and_copy_to_shm(struct cfv_info *cfv, } /* Put the CAIF packet on the virtio ring and kick the receiver */ -static int cfv_netdev_tx(struct sk_buff *skb, struct net_device *netdev) +static netdev_tx_t cfv_netdev_tx(struct sk_buff *skb, struct net_device *netdev) { struct cfv_info *cfv = netdev_priv(netdev); struct buf_info *buf_info; diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c index 13e2ae6..30be426 100644 --- a/net/caif/chnl_net.c +++ b/net/caif/chnl_net.c @@ -211,7 +211,8 @@ static void chnl_flowctrl_cb(struct cflayer *layr, enum caif_ctrlcmd flow, } } -static int chnl_net_start_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t +chnl_
[PATCH net-next 11/22] net: faraday: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/ethernet/faraday/ftgmac100.c | 4 ++-- drivers/net/ethernet/faraday/ftmac100.c | 7 --- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index d8ead7e..4d67322 100644 --- a/drivers/net/ethernet/faraday/ftgmac100.c +++ b/drivers/net/ethernet/faraday/ftgmac100.c @@ -712,8 +712,8 @@ static bool ftgmac100_prep_tx_csum(struct sk_buff *skb, u32 *csum_vlan) return skb_checksum_help(skb) == 0; } -static int ftgmac100_hard_start_xmit(struct sk_buff *skb, -struct net_device *netdev) +static netdev_tx_t ftgmac100_hard_start_xmit(struct sk_buff *skb, +struct net_device *netdev) { struct ftgmac100 *priv = netdev_priv(netdev); struct ftgmac100_txdes *txdes, *first; diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c index a1197d3..570caeb 100644 --- a/drivers/net/ethernet/faraday/ftmac100.c +++ b/drivers/net/ethernet/faraday/ftmac100.c @@ -634,8 +634,8 @@ static void ftmac100_tx_complete(struct ftmac100 *priv) ; } -static int ftmac100_xmit(struct ftmac100 *priv, struct sk_buff *skb, -dma_addr_t map) +static netdev_tx_t ftmac100_xmit(struct ftmac100 *priv, struct sk_buff *skb, +dma_addr_t map) { struct net_device *netdev = priv->netdev; struct ftmac100_txdes *txdes; @@ -1016,7 +1016,8 @@ static int ftmac100_stop(struct net_device *netdev) return 0; } -static int ftmac100_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev) +static netdev_tx_t +ftmac100_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev) { struct ftmac100 *priv = netdev_priv(netdev); dma_addr_t map; -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 04/22] net: cirrus: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/ethernet/cirrus/ep93xx_eth.c | 2 +- drivers/net/ethernet/cirrus/mac89x0.c| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/cirrus/ep93xx_eth.c b/drivers/net/ethernet/cirrus/ep93xx_eth.c index e2a7029..13dfdfc 100644 --- a/drivers/net/ethernet/cirrus/ep93xx_eth.c +++ b/drivers/net/ethernet/cirrus/ep93xx_eth.c @@ -332,7 +332,7 @@ static int ep93xx_poll(struct napi_struct *napi, int budget) return rx; } -static int ep93xx_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t ep93xx_xmit(struct sk_buff *skb, struct net_device *dev) { struct ep93xx_priv *ep = netdev_priv(dev); struct ep93xx_tdesc *txd; diff --git a/drivers/net/ethernet/cirrus/mac89x0.c b/drivers/net/ethernet/cirrus/mac89x0.c index 3f8fe8f..6324e80 100644 --- a/drivers/net/ethernet/cirrus/mac89x0.c +++ b/drivers/net/ethernet/cirrus/mac89x0.c @@ -113,7 +113,7 @@ struct net_local { /* Index to functions, as function prototypes. */ static int net_open(struct net_device *dev); -static int net_send_packet(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t net_send_packet(struct sk_buff *skb, struct net_device *dev); static irqreturn_t net_interrupt(int irq, void *dev_id); static void set_multicast_list(struct net_device *dev); static void net_rx(struct net_device *dev); @@ -324,7 +324,7 @@ static int mac89x0_device_probe(struct platform_device *pdev) return 0; } -static int +static netdev_tx_t net_send_packet(struct sk_buff *skb, struct net_device *dev) { struct net_local *lp = netdev_priv(dev); -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 16/22] usbnet: ipheth: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/usb/ipheth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c index 7275761..53eab6fb 100644 --- a/drivers/net/usb/ipheth.c +++ b/drivers/net/usb/ipheth.c @@ -413,7 +413,7 @@ static int ipheth_close(struct net_device *net) return 0; } -static int ipheth_tx(struct sk_buff *skb, struct net_device *net) +static netdev_tx_t ipheth_tx(struct sk_buff *skb, struct net_device *net) { struct ipheth_device *dev = netdev_priv(net); struct usb_device *udev = dev->udev; -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 15/22] net: hamradio: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/hamradio/baycom_epp.c | 3 ++- drivers/net/hamradio/dmascc.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c index 1e62d00..f4ceccf 100644 --- a/drivers/net/hamradio/baycom_epp.c +++ b/drivers/net/hamradio/baycom_epp.c @@ -772,7 +772,8 @@ static void epp_bh(struct work_struct *work) * = network driver interface = */ -static int baycom_send_packet(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t +baycom_send_packet(struct sk_buff *skb, struct net_device *dev) { struct baycom_state *bc = netdev_priv(dev); diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c index cde4120..2798870 100644 --- a/drivers/net/hamradio/dmascc.c +++ b/drivers/net/hamradio/dmascc.c @@ -239,7 +239,7 @@ struct scc_info { static int scc_open(struct net_device *dev); static int scc_close(struct net_device *dev); static int scc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); -static int scc_send_packet(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t scc_send_packet(struct sk_buff *skb, struct net_device *dev); static int scc_set_mac_address(struct net_device *dev, void *sa); static inline void tx_on(struct scc_priv *priv); @@ -921,7 +921,7 @@ static int scc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) } -static int scc_send_packet(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t scc_send_packet(struct sk_buff *skb, struct net_device *dev) { struct scc_priv *priv = dev->ml_priv; unsigned long flags; -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 13/22] net: xen-netback: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/xen-netback/interface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c index 92274c2..7e3ea39 100644 --- a/drivers/net/xen-netback/interface.c +++ b/drivers/net/xen-netback/interface.c @@ -165,7 +165,8 @@ static u16 xenvif_select_queue(struct net_device *dev, struct sk_buff *skb, return vif->hash.mapping[skb_get_hash_raw(skb) % size]; } -static int xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t +xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct xenvif *vif = netdev_priv(dev); struct xenvif_queue *queue = NULL; -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 12/22] net: ovs: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- net/openvswitch/vport-internal_dev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c index bb95c43..26f71cb 100644 --- a/net/openvswitch/vport-internal_dev.c +++ b/net/openvswitch/vport-internal_dev.c @@ -43,7 +43,8 @@ static struct internal_dev *internal_dev_priv(struct net_device *netdev) } /* Called with rcu_read_lock_bh. */ -static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev) +static netdev_tx_t +internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev) { int len, err; @@ -62,7 +63,7 @@ static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev) } else { netdev->stats.tx_errors++; } - return 0; + return NETDEV_TX_OK; } static int internal_dev_open(struct net_device *netdev) -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 21/22] l2tp: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- net/l2tp/l2tp_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c index 8aadc4f..4173cb1 100644 --- a/net/l2tp/l2tp_eth.c +++ b/net/l2tp/l2tp_eth.c @@ -77,7 +77,8 @@ static void l2tp_eth_dev_uninit(struct net_device *dev) */ } -static int l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t +l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev) { struct l2tp_eth *priv = netdev_priv(dev); struct l2tp_session *session = priv->session; -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 18/22] can: xilinx: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/can/xilinx_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c index 045f084..6de5004 100644 --- a/drivers/net/can/xilinx_can.c +++ b/drivers/net/can/xilinx_can.c @@ -612,7 +612,7 @@ static int xcan_start_xmit_mailbox(struct sk_buff *skb, struct net_device *ndev) * * Return: NETDEV_TX_OK on success and NETDEV_TX_BUSY when the tx queue is full */ -static int xcan_start_xmit(struct sk_buff *skb, struct net_device *ndev) +static netdev_tx_t xcan_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct xcan_priv *priv = netdev_priv(ndev); int ret; -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 20/22] rionet: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/rionet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c index e9f101c..de391c7 100644 --- a/drivers/net/rionet.c +++ b/drivers/net/rionet.c @@ -170,7 +170,8 @@ static int rionet_queue_tx_msg(struct sk_buff *skb, struct net_device *ndev, return 0; } -static int rionet_start_xmit(struct sk_buff *skb, struct net_device *ndev) +static netdev_tx_t +rionet_start_xmit(struct sk_buff *skb, struct net_device *ndev) { int i; struct rionet_private *rnet = netdev_priv(ndev); -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 22/22] net: hsr: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- net/hsr/hsr_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c index b8cd43c..a067150 100644 --- a/net/hsr/hsr_device.c +++ b/net/hsr/hsr_device.c @@ -233,7 +233,7 @@ static netdev_features_t hsr_fix_features(struct net_device *dev, } -static int hsr_dev_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t hsr_dev_xmit(struct sk_buff *skb, struct net_device *dev) { struct hsr_priv *hsr = netdev_priv(dev); struct hsr_port *master; -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/hyperv/netvsc_drv.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 3af6d8d..056c472 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -511,7 +511,8 @@ static int netvsc_vf_xmit(struct net_device *net, struct net_device *vf_netdev, return rc; } -static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) +static netdev_tx_t +netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) { struct net_device_context *net_device_ctx = netdev_priv(net); struct hv_netvsc_packet *packet = NULL; @@ -528,8 +529,11 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) */ vf_netdev = rcu_dereference_bh(net_device_ctx->vf_netdev); if (vf_netdev && netif_running(vf_netdev) && - !netpoll_tx_running(net)) - return netvsc_vf_xmit(net, vf_netdev, skb); + !netpoll_tx_running(net)) { + ret = netvsc_vf_xmit(net, vf_netdev, skb); + if (ret) + return NETDEV_TX_BUSY; + } /* We will atmost need two pages to describe the rndis * header. We can only transmit MAX_PAGE_BUFFER_COUNT number -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 19/22] net: plip: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/plip/plip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c index feb92ec..0b354e6 100644 --- a/drivers/net/plip/plip.c +++ b/drivers/net/plip/plip.c @@ -146,7 +146,7 @@ static void plip_interrupt(void *dev_id); /* Functions for DEV methods */ -static int plip_tx_packet(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t plip_tx_packet(struct sk_buff *skb, struct net_device *dev); static int plip_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned len); @@ -962,7 +962,7 @@ static __be16 plip_type_trans(struct sk_buff *skb, struct net_device *dev) spin_unlock_irqrestore(&nl->lock, flags); } -static int +static netdev_tx_t plip_tx_packet(struct sk_buff *skb, struct net_device *dev) { struct net_local *nl = netdev_priv(dev); -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH net-next 00/22] net: fix return type of ndo_start_xmit function
On 2018/9/20 23:50, David Miller wrote: > From: YueHaibing > Date: Thu, 20 Sep 2018 20:32:44 +0800 > >> The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', >> which is a typedef for an enum type, so make sure the implementation in >> this driver has returns 'netdev_tx_t' value, and change the function >> return type to netdev_tx_t. > > I would advise you not to send so many of these changes as a group. > > If one of the patches needs feedback addressed, which is already the > case, you will have to resubmit the entire series all over again with > the fixes. > Yes, I will send it separately after test and review again. Thank you for your advice. > . > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function
On 2018/9/20 22:50, Haiyang Zhang wrote: > > >> -Original Message- >> From: Stephen Hemminger >> Sent: Thursday, September 20, 2018 10:44 AM >> To: YueHaibing >> Cc: da...@davemloft.net; dmitry.tarnya...@lockless.no; >> w...@grandegger.com; m...@pengutronix.de; michal.si...@xilinx.com; >> hswee...@visionengravers.com; madalin.bu...@nxp.com; >> pantelis.anton...@gmail.com; claudiu.man...@nxp.com; leoyang...@nxp.com; >> li...@armlinux.org.uk; sa...@sammy.net; r...@linux-mips.org; >> n...@fluxnic.net; steve.glendinn...@shawell.net; f.faine...@gmail.com; >> grygorii.stras...@ti.com; w-kw...@ti.com; m-kariche...@ti.com; >> t.sai...@alumni.ethz.ch; jreu...@yaina.de; KY Srinivasan >> ; >> Haiyang Zhang ; wei.l...@citrix.com; >> paul.durr...@citrix.com; arvid.bro...@alten.se; pshe...@ovn.org; >> d...@openvswitch.org; linux-m...@linux-mips.org; xen- >> de...@lists.xenproject.org; net...@vger.kernel.org; >> linux-...@vger.kernel.org; >> linux-ker...@vger.kernel.org; linux-...@vger.kernel.org; >> de...@linuxdriverproject.org; linux-h...@vger.kernel.org; linux- >> o...@vger.kernel.org; linuxppc-...@lists.ozlabs.org; linux-arm- >> ker...@lists.infradead.org >> Subject: Re: [PATCH net-next 17/22] hv_netvsc: fix return type of >> ndo_start_xmit function >> >> On Thu, 20 Sep 2018 20:33:01 +0800 >> YueHaibing wrote: >>> int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) >>> */ >>> vf_netdev = rcu_dereference_bh(net_device_ctx->vf_netdev); >>> if (vf_netdev && netif_running(vf_netdev) && >>> - !netpoll_tx_running(net)) >>> - return netvsc_vf_xmit(net, vf_netdev, skb); >>> + !netpoll_tx_running(net)) { >>> + ret = netvsc_vf_xmit(net, vf_netdev, skb); >>> + if (ret) >>> + return NETDEV_TX_BUSY; >>> + } >> >> Sorry, the new code is wrong. It will fall through if ret == 0 (NETDEV_TX_OK) >> Please review and test your patches. > > Plus consideration of -- For error case, please just return NETDEV_TX_OK. We > are not sure if the error can go away after retrying, returning > NETDEV_TX_BUSY > may cause infinite retry from the upper layer. > > So, let's just always return NETDEV_TX_OK like this: > netvsc_vf_xmit(net, vf_netdev, skb); > return NETDEV_TX_OK; Thank you for review. Will do that in v2. > > Thanks, > - Haiyang > > . > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function
On 2018/9/20 22:43, Stephen Hemminger wrote: > On Thu, 20 Sep 2018 20:33:01 +0800 > YueHaibing wrote: > >> The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', >> which is a typedef for an enum type, so make sure the implementation in >> this driver has returns 'netdev_tx_t' value, and change the function >> return type to netdev_tx_t. >> >> Found by coccinelle. >> >> Signed-off-by: YueHaibing >> --- >> drivers/net/hyperv/netvsc_drv.c | 10 +++--- >> 1 file changed, 7 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/net/hyperv/netvsc_drv.c >> b/drivers/net/hyperv/netvsc_drv.c >> index 3af6d8d..056c472 100644 >> --- a/drivers/net/hyperv/netvsc_drv.c >> +++ b/drivers/net/hyperv/netvsc_drv.c >> @@ -511,7 +511,8 @@ static int netvsc_vf_xmit(struct net_device *net, struct >> net_device *vf_netdev, >> return rc; >> } >> >> -static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) >> +static netdev_tx_t >> +netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) >> { >> struct net_device_context *net_device_ctx = netdev_priv(net); >> struct hv_netvsc_packet *packet = NULL; >> @@ -528,8 +529,11 @@ static int netvsc_start_xmit(struct sk_buff *skb, >> struct net_device *net) >> */ >> vf_netdev = rcu_dereference_bh(net_device_ctx->vf_netdev); >> if (vf_netdev && netif_running(vf_netdev) && >> -!netpoll_tx_running(net)) >> -return netvsc_vf_xmit(net, vf_netdev, skb); >> +!netpoll_tx_running(net)) { >> +ret = netvsc_vf_xmit(net, vf_netdev, skb); >> +if (ret) >> +return NETDEV_TX_BUSY; >> +} > > Sorry, the new code is wrong. It will fall through if ret == 0 (NETDEV_TX_OK) > Please review and test your patches. I'm sorry for this, will correct it as Haiyang's suggestion. > > . > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] x86/hyper-v: Remove unused including
Remove including that don't need it. Signed-off-by: YueHaibing --- arch/x86/hyperv/hv_apic.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv/hv_apic.c index 2c43e30..8eb6fbee 100644 --- a/arch/x86/hyperv/hv_apic.c +++ b/arch/x86/hyperv/hv_apic.c @@ -20,7 +20,6 @@ */ #include -#include #include #include #include ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next] hv_netvsc: fix return type of ndo_start_xmit function
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. As suggestion from Haiyang Zhang , if netvsc_vf_xmit fails, We are not sure if the error can go away after retrying, returning NETDEV_TX_BUSY may cause infinite retry from the upper layer. so just return NETDEV_TX_OK at there. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/hyperv/netvsc_drv.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index ec69974..a1d44b4 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -511,7 +511,8 @@ static int netvsc_vf_xmit(struct net_device *net, struct net_device *vf_netdev, return rc; } -static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) +static netdev_tx_t +netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) { struct net_device_context *net_device_ctx = netdev_priv(net); struct hv_netvsc_packet *packet = NULL; @@ -528,8 +529,10 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) */ vf_netdev = rcu_dereference_bh(net_device_ctx->vf_netdev); if (vf_netdev && netif_running(vf_netdev) && - !netpoll_tx_running(net)) - return netvsc_vf_xmit(net, vf_netdev, skb); + !netpoll_tx_running(net)) { + netvsc_vf_xmit(net, vf_netdev, skb); + return NETDEV_TX_OK; + } /* We will atmost need two pages to describe the rndis * header. We can only transmit MAX_PAGE_BUFFER_COUNT number -- 1.8.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: rtlwifi: Remove set but not used variable 'ppsc'
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c: In function 'halbtc_leave_lps': drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:284:21: warning: variable 'ppsc' set but not used [-Wunused-but-set-variable] drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c: In function 'halbtc_enter_lps': drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:307:21: warning: variable 'ppsc' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c index 85a7490..24e19ff 100644 --- a/drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c +++ b/drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c @@ -281,11 +281,9 @@ bool halbtc_send_bt_mp_operation(struct btc_coexist *btcoexist, u8 op_code, static void halbtc_leave_lps(struct btc_coexist *btcoexist) { struct rtl_priv *rtlpriv; - struct rtl_ps_ctl *ppsc; bool ap_enable = false; rtlpriv = btcoexist->adapter; - ppsc = rtl_psc(rtlpriv); btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_AP_MODE_ENABLE, &ap_enable); @@ -304,11 +302,9 @@ static void halbtc_leave_lps(struct btc_coexist *btcoexist) static void halbtc_enter_lps(struct btc_coexist *btcoexist) { struct rtl_priv *rtlpriv; - struct rtl_ps_ctl *ppsc; bool ap_enable = false; rtlpriv = btcoexist->adapter; - ppsc = rtl_psc(rtlpriv); btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_AP_MODE_ENABLE, &ap_enable); ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] [media] media: drop pointless static qualifier in vpfe_resizer_init()
There is no need to have the 'resource_size_t res_len' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing --- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.c b/drivers/staging/media/davinci_vpfe/dm365_resizer.c index aac6dbf..b2b23a7 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_resizer.c +++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.c @@ -1884,7 +1884,7 @@ int vpfe_resizer_init(struct vpfe_resizer_device *vpfe_rsz, struct v4l2_subdev *sd = &vpfe_rsz->crop_resizer.subdev; struct media_pad *pads = &vpfe_rsz->crop_resizer.pads[0]; struct media_entity *me = &sd->entity; - static resource_size_t res_len; + resource_size_t res_len; struct resource *res; int ret; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] [media] media: drop pointless static qualifier in vpfe_ipipeif_init()
There is no need to have the 'resource_size_t res_len' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing --- drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c index a53231b..e191829 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c @@ -998,7 +998,7 @@ int vpfe_ipipeif_init(struct vpfe_ipipeif_device *ipipeif, struct v4l2_subdev *sd = &ipipeif->subdev; struct media_pad *pads = &ipipeif->pads[0]; struct media_entity *me = &sd->entity; - static resource_size_t res_len; + resource_size_t res_len; struct resource *res; int ret; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: axis-fifo: remove duplicated include from axis-fifo.c
Remove duplicated include. Signed-off-by: YueHaibing --- drivers/staging/axis-fifo/axis-fifo.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c index 63c8efd..48a9877 100644 --- a/drivers/staging/axis-fifo/axis-fifo.c +++ b/drivers/staging/axis-fifo/axis-fifo.c @@ -27,8 +27,6 @@ #include #include #include -#include -#include #include #include #include ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] media: rockchip/vpu: remove set but not used variables 'luma_qtable_p, chroma_qtable_p'
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c:101:10: warning: variable 'chroma_qtable_p' set but not used [-Wunused-but-set-variable] drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c:100:10: warning: variable 'luma_qtable_p' set but not used [-Wunused-but-set-variable] drivers/staging/media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c:70:10: warning: variable 'chroma_qtable_p' set but not used [-Wunused-but-set-variable] drivers/staging/media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c:69:10: warning: variable 'luma_qtable_p' set but not used [-Wunused-but-set-variable] It never used since introduction in commit 775fec69008d ("media: add Rockchip VPU JPEG encoder driver") Signed-off-by: YueHaibing --- drivers/staging/media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c | 5 - drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c | 5 - 2 files changed, 10 deletions(-) diff --git a/drivers/staging/media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c b/drivers/staging/media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c index e27c108..5282236 100644 --- a/drivers/staging/media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c +++ b/drivers/staging/media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c @@ -66,13 +66,8 @@ rk3288_vpu_jpeg_enc_set_qtable(struct rockchip_vpu_dev *vpu, unsigned char *luma_qtable, unsigned char *chroma_qtable) { - __be32 *luma_qtable_p; - __be32 *chroma_qtable_p; u32 reg, i; - luma_qtable_p = (__be32 *)luma_qtable; - chroma_qtable_p = (__be32 *)chroma_qtable; - for (i = 0; i < VEPU_JPEG_QUANT_TABLE_COUNT; i++) { reg = get_unaligned_be32(&luma_qtable[i]); vepu_write_relaxed(vpu, reg, VEPU_REG_JPEG_LUMA_QUAT(i)); diff --git a/drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c b/drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c index 5f75e4d..dbc86d9 100644 --- a/drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c +++ b/drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c @@ -97,13 +97,8 @@ rk3399_vpu_jpeg_enc_set_qtable(struct rockchip_vpu_dev *vpu, unsigned char *luma_qtable, unsigned char *chroma_qtable) { - __be32 *luma_qtable_p; - __be32 *chroma_qtable_p; u32 reg, i; - luma_qtable_p = (__be32 *)luma_qtable; - chroma_qtable_p = (__be32 *)chroma_qtable; - for (i = 0; i < VEPU_JPEG_QUANT_TABLE_COUNT; i++) { reg = get_unaligned_be32(&luma_qtable[i]); vepu_write_relaxed(vpu, reg, VEPU_REG_JPEG_LUMA_QUAT(i)); -- 2.7.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] media: rkvdec: Remove redundant platform_get_irq error message
platform_get_irq() will call dev_err() itself on failure, so there is no need for the driver to also do this. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/staging/media/rkvdec/rkvdec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c index d25c4a37e2af..552e0bd12ecf 100644 --- a/drivers/staging/media/rkvdec/rkvdec.c +++ b/drivers/staging/media/rkvdec/rkvdec.c @@ -1038,10 +1038,8 @@ static int rkvdec_probe(struct platform_device *pdev) vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32)); irq = platform_get_irq(pdev, 0); - if (irq <= 0) { - dev_err(&pdev->dev, "Could not get vdec IRQ\n"); + if (irq <= 0) return -ENXIO; - } ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, rkvdec_irq_handler, IRQF_ONESHOT, -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: regulator: hi6421v600-regulator: Remove unused including
Remove including that don't need it. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/staging/hikey9xx/hi6421v600-regulator.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/hikey9xx/hi6421v600-regulator.c b/drivers/staging/hikey9xx/hi6421v600-regulator.c index 82635ff54a74..614b03c9ddfb 100644 --- a/drivers/staging/hikey9xx/hi6421v600-regulator.c +++ b/drivers/staging/hikey9xx/hi6421v600-regulator.c @@ -36,7 +36,6 @@ #include #include #include -#include #define rdev_dbg(rdev, fmt, arg...)\ pr_debug("%s: %s: " fmt, (rdev)->desc->name, __func__, ##arg) -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: fbtft: use strcmp() instead of strncmp() for subsystem lookup
strncmp() stops comparing when either the end of one of the first two arguments is reached or when 'n' characters have been compared, whichever comes first.That means that strncmp(s1, s2, n) is equivalent to strcmp(s1, s2) if n exceeds the length of s1 or the length of s2. This patch avoids that the following warning is reported by smatch: drivers/staging/fbtft/fbtft_device.c:1458 fbtft_device_init() error: strncmp() '"list"' too small (5 vs 32) Signed-off-by: YueHaibing --- drivers/staging/fbtft/fbtft_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c index 50e97da..0e995028 100644 --- a/drivers/staging/fbtft/fbtft_device.c +++ b/drivers/staging/fbtft/fbtft_device.c @@ -1455,7 +1455,7 @@ static int __init fbtft_device_init(void) } /* name=list lists all supported displays */ - if (strncmp(name, "list", FBTFT_GPIO_NAME_SIZE) == 0) { + if (strcmp(name, "list") == 0) { pr_info("Supported displays:\n"); for (i = 0; i < ARRAY_SIZE(displays); i++) -- 2.7.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH -next] staging: fbtft: use strcmp() instead of strncmp() for subsystem lookup
sorry, Pls ignore this. The title need fix. On 2018/12/18 21:09, YueHaibing wrote: > strncmp() stops comparing when either the end of one of the first two > arguments is reached or when 'n' characters have been compared, whichever > comes first.That means that strncmp(s1, s2, n) is equivalent to > strcmp(s1, s2) if n exceeds the length of s1 or the length of s2. > > This patch avoids that the following warning is reported by smatch: > > drivers/staging/fbtft/fbtft_device.c:1458 > fbtft_device_init() error: strncmp() '"list"' too small (5 vs 32) > > Signed-off-by: YueHaibing > --- > drivers/staging/fbtft/fbtft_device.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/fbtft/fbtft_device.c > b/drivers/staging/fbtft/fbtft_device.c > index 50e97da..0e995028 100644 > --- a/drivers/staging/fbtft/fbtft_device.c > +++ b/drivers/staging/fbtft/fbtft_device.c > @@ -1455,7 +1455,7 @@ static int __init fbtft_device_init(void) > } > > /* name=list lists all supported displays */ > - if (strncmp(name, "list", FBTFT_GPIO_NAME_SIZE) == 0) { > + if (strcmp(name, "list") == 0) { > pr_info("Supported displays:\n"); > > for (i = 0; i < ARRAY_SIZE(displays); i++) > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 -next] staging: fbtft: use strcmp() instead of strncmp() for
strncmp() stops comparing when either the end of one of the first two arguments is reached or when 'n' characters have been compared, whichever comes first.That means that strncmp(s1, s2, n) is equivalent to strcmp(s1, s2) if n exceeds the length of s1 or the length of s2. This patch avoids that the following warning is reported by smatch: drivers/staging/fbtft/fbtft_device.c:1458 fbtft_device_init() error: strncmp() '"list"' too small (5 vs 32) Signed-off-by: YueHaibing --- v2: fix patch title --- drivers/staging/fbtft/fbtft_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c index 50e97da..0e995028 100644 --- a/drivers/staging/fbtft/fbtft_device.c +++ b/drivers/staging/fbtft/fbtft_device.c @@ -1455,7 +1455,7 @@ static int __init fbtft_device_init(void) } /* name=list lists all supported displays */ - if (strncmp(name, "list", FBTFT_GPIO_NAME_SIZE) == 0) { + if (strcmp(name, "list") == 0) { pr_info("Supported displays:\n"); for (i = 0; i < ARRAY_SIZE(displays); i++) -- 2.7.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 -next] staging: fbtft: use strcmp() instead of strncmp() for
On 2018/12/18 21:37, Dan Carpenter wrote: > On Tue, Dec 18, 2018 at 09:25:08PM +0800, YueHaibing wrote: >> strncmp() stops comparing when either the end of one of the first two >> arguments is reached or when 'n' characters have been compared, whichever >> comes first.That means that strncmp(s1, s2, n) is equivalent to >> strcmp(s1, s2) if n exceeds the length of s1 or the length of s2. >> >> This patch avoids that the following warning is reported by smatch: >> >> drivers/staging/fbtft/fbtft_device.c:1458 >> fbtft_device_init() error: strncmp() '"list"' too small (5 vs 32) >> >> Signed-off-by: YueHaibing >> --- >> v2: fix patch title > > v2 is worse than v1... Yes, , I messed up. I will fix it. > > v1 is a little long but I wouldn't have complained about it. > > Please assume that the subject and the commit message are separate > things. Take a look how the patch description reads on marc.info: > > https://marc.info/?l=linux-driver-devel&m=154513957719226&w=2 > > regards, > dan carpenter > > > . > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 -next] staging: fbtft: fix strncmp() size warning
strncmp() stops comparing when either the end of one of the first two arguments is reached or when 'n' characters have been compared, whichever comes first.That means that strncmp(s1, s2, n) is equivalent to strcmp(s1, s2) if n exceeds the length of s1 or the length of s2. This patch avoids that the following warning is reported by smatch: drivers/staging/fbtft/fbtft_device.c:1458 fbtft_device_init() error: strncmp() '"list"' too small (5 vs 32) Signed-off-by: YueHaibing --- v2-v3: fix messed patch title --- drivers/staging/fbtft/fbtft_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c index 50e97da..046f9d3 100644 --- a/drivers/staging/fbtft/fbtft_device.c +++ b/drivers/staging/fbtft/fbtft_device.c @@ -1455,7 +1455,7 @@ static int __init fbtft_device_init(void) } /* name=list lists all supported displays */ - if (strncmp(name, "list", FBTFT_GPIO_NAME_SIZE) == 0) { + if (strcmp(name, "list") == 0) { pr_info("Supported displays:\n"); for (i = 0; i < ARRAY_SIZE(displays); i++) -- 2.7.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] media: staging/intel-ipu3: Fix err handle of ipu3_css_find_binary
'bindex' is unsigned, it never less than zero. This patch bring int 'binary' back to handle the err condition. Fixes: 51abe041c5ed ("media: staging/intel-ipu3: Add dual pipe support") Signed-off-by: YueHaibing --- drivers/staging/media/ipu3/ipu3-css.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/ipu3/ipu3-css.c b/drivers/staging/media/ipu3/ipu3-css.c index 44c5563..28f0c02 100644 --- a/drivers/staging/media/ipu3/ipu3-css.c +++ b/drivers/staging/media/ipu3/ipu3-css.c @@ -1751,7 +1751,7 @@ int ipu3_css_fmt_try(struct ipu3_css *css, &q[IPU3_CSS_QUEUE_OUT].fmt.mpix; struct v4l2_pix_format_mplane *const vf = &q[IPU3_CSS_QUEUE_VF].fmt.mpix; - int i, s; + int i, s, binary; /* Adjust all formats, get statistics buffer sizes and formats */ for (i = 0; i < IPU3_CSS_QUEUES; i++) { @@ -1826,13 +1826,13 @@ int ipu3_css_fmt_try(struct ipu3_css *css, s = (bds->height - gdc->height) / 2 - FILTER_SIZE; env->height = s < MIN_ENVELOPE ? MIN_ENVELOPE : s; - css->pipes[pipe].bindex = - ipu3_css_find_binary(css, pipe, q, r); - if (css->pipes[pipe].bindex < 0) { + binary = ipu3_css_find_binary(css, pipe, q, r); + if (binary < 0) { dev_err(css->dev, "failed to find suitable binary\n"); return -EINVAL; } + css->pipes[pipe].bindex = binary; dev_dbg(css->dev, "Binary index %d for pipe %d found.", css->pipes[pipe].bindex, pipe); -- 2.7.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: wilc1000: remove set but not used variable 'msa'
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/wilc1000/host_interface.c: In function 'wilc_parse_network_info': drivers/staging/wilc1000/host_interface.c:748:16: warning: variable 'msa' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- drivers/staging/wilc1000/host_interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 5dae6e7..c05c120 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -745,7 +745,7 @@ static s32 wilc_parse_network_info(u8 *msg_buffer, { struct network_info *info; struct ieee80211_mgmt *mgt; - u8 *wid_val, *msa, *ies; + u8 *wid_val, *ies; u16 wid_len, rx_len, ies_len; u8 msg_type; size_t offset; @@ -764,7 +764,6 @@ static s32 wilc_parse_network_info(u8 *msg_buffer, info->rssi = wid_val[0]; - msa = &wid_val[1]; mgt = (struct ieee80211_mgmt *)&wid_val[1]; rx_len = wid_len - 1; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: rtl8712: drop pointless static qualifier in r8712_efuse_pg_packet_write()
There is no need to have the 'intrepeat_times' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing --- drivers/staging/rtl8712/rtl8712_efuse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/rtl8712_efuse.c b/drivers/staging/rtl8712/rtl8712_efuse.c index 8bc45ff..39eb743 100644 --- a/drivers/staging/rtl8712/rtl8712_efuse.c +++ b/drivers/staging/rtl8712/rtl8712_efuse.c @@ -358,7 +358,7 @@ u8 r8712_efuse_pg_packet_write(struct _adapter *padapter, const u8 offset, u8 pg_header = 0; u16 efuse_addr = 0, curr_size = 0; u8 efuse_data, target_word_cnts = 0; - static int repeat_times; + int repeat_times; int sub_repeat; u8 bResult = true; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: gasket: interrupt: remove unused including
From: Yue Haibing Remove including that don't need it. Signed-off-by: Yue Haibing --- drivers/staging/gasket/gasket_interrupt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_interrupt.c b/drivers/staging/gasket/gasket_interrupt.c index 1cfbc12..176ac2a 100644 --- a/drivers/staging/gasket/gasket_interrupt.c +++ b/drivers/staging/gasket/gasket_interrupt.c @@ -9,7 +9,6 @@ #include #include #include -#include #ifdef GASKET_KERNEL_TRACE_SUPPORT #define CREATE_TRACE_POINTS #include ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: mt7621-mmc: Remove unused including
Remove including that don't need it. Signed-off-by: YueHaibing --- drivers/staging/mt7621-mmc/dbg.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/mt7621-mmc/dbg.c b/drivers/staging/mt7621-mmc/dbg.c index eabe0595978b..c7c091fa1da0 100644 --- a/drivers/staging/mt7621-mmc/dbg.c +++ b/drivers/staging/mt7621-mmc/dbg.c @@ -36,7 +36,6 @@ * Inc. */ -#include #include #include #include ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: rtl8192e: Remove set but not used variables 'broad_addr, stype'
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8192e/rtl8192e/rtl_core.c: In function '_rtl92e_tx': drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1732:28: warning: variable 'broad_addr' set but not used [-Wunused-but-set-variable] drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1731:24: warning: variable 'stype' set but not used [-Wunused-but-set-variable] They're never used and can be removed. Signed-off-by: YueHaibing --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index c145b689175c..ddf3ee71a632 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -1728,8 +1728,8 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb) MAX_DEV_ADDR_SIZE); struct tx_desc *pdesc = NULL; struct rtllib_hdr_1addr *header = NULL; - u16 fc = 0, type = 0, stype = 0; - bool multi_addr = false, broad_addr = false, uni_addr = false; + u16 fc = 0, type = 0; + bool multi_addr = false, uni_addr = false; u8 *pda_addr = NULL; int idx; u32 fwinfo_size = 0; @@ -1747,11 +1747,10 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb) header = (struct rtllib_hdr_1addr *)(((u8 *)skb->data) + fwinfo_size); fc = le16_to_cpu(header->frame_ctl); type = WLAN_FC_GET_TYPE(fc); - stype = WLAN_FC_GET_STYPE(fc); pda_addr = header->addr1; if (is_broadcast_ether_addr(pda_addr)) - broad_addr = true; + ; else if (is_multicast_ether_addr(pda_addr)) multi_addr = true; else ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH -next] staging: rtl8192e: Remove set but not used variables 'broad_addr, stype'
On 2019/2/18 22:31, Dan Carpenter wrote: > On Mon, Feb 18, 2019 at 12:33:59PM +0000, YueHaibing wrote: >> @@ -1747,11 +1747,10 @@ static short _rtl92e_tx(struct net_device *dev, >> struct sk_buff *skb) >> header = (struct rtllib_hdr_1addr *)(((u8 *)skb->data) + fwinfo_size); >> fc = le16_to_cpu(header->frame_ctl); >> type = WLAN_FC_GET_TYPE(fc); >> -stype = WLAN_FC_GET_STYPE(fc); >> pda_addr = header->addr1; >> >> if (is_broadcast_ether_addr(pda_addr)) >> -broad_addr = true; >> +; >> else if (is_multicast_ether_addr(pda_addr)) >> multi_addr = true; >> else >> > > This is ugly. Please do it like this: Thank you for correct me. > > > diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c > b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c > index c145b689175c..29b53e2246b4 100644 > --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c > +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c > @@ -1729,7 +1729,6 @@ static short _rtl92e_tx(struct net_device *dev, struct > sk_buff *skb) > struct tx_desc *pdesc = NULL; > struct rtllib_hdr_1addr *header = NULL; > u16 fc = 0, type = 0, stype = 0; > - bool multi_addr = false, broad_addr = false, uni_addr = false; > u8 *pda_addr = NULL; > int idx; > u32 fwinfo_size = 0; > @@ -1751,18 +1750,11 @@ static short _rtl92e_tx(struct net_device *dev, > struct sk_buff *skb) > pda_addr = header->addr1; > > if (is_broadcast_ether_addr(pda_addr)) > - broad_addr = true; > + priv->stats.txbytesbroadcast += skb->len - fwinfo_size; > else if (is_multicast_ether_addr(pda_addr)) > - multi_addr = true; > - else > - uni_addr = true; > - > - if (uni_addr) > - priv->stats.txbytesunicast += skb->len - fwinfo_size; > - else if (multi_addr) > priv->stats.txbytesmulticast += skb->len - fwinfo_size; > else > - priv->stats.txbytesbroadcast += skb->len - fwinfo_size; > + priv->stats.txbytesunicast += skb->len - fwinfo_size; > > spin_lock_irqsave(&priv->irq_th_lock, flags); > ring = &priv->tx_ring[tcb_desc->queue_index]; > > . > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 -next] staging: rtl8192e: Remove set but not used variables 'broad_addr, stype'
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8192e/rtl8192e/rtl_core.c: In function '_rtl92e_tx': drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1732:28: warning: variable 'broad_addr' set but not used [-Wunused-but-set-variable] drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1731:24: warning: variable 'stype' set but not used [-Wunused-but-set-variable] This remove unnessesary bool variable 'multi_addr, broad_addr, uni_addr' Also 'stype' never used and can be removed. Signed-off-by: YueHaibing --- v2: remove unnessesary bool variable 'multi_addr,uni_addr' --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index c145b689175c..253f1911a3f4 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -1728,8 +1728,7 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb) MAX_DEV_ADDR_SIZE); struct tx_desc *pdesc = NULL; struct rtllib_hdr_1addr *header = NULL; - u16 fc = 0, type = 0, stype = 0; - bool multi_addr = false, broad_addr = false, uni_addr = false; + u16 fc = 0, type = 0; u8 *pda_addr = NULL; int idx; u32 fwinfo_size = 0; @@ -1747,22 +1746,14 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb) header = (struct rtllib_hdr_1addr *)(((u8 *)skb->data) + fwinfo_size); fc = le16_to_cpu(header->frame_ctl); type = WLAN_FC_GET_TYPE(fc); - stype = WLAN_FC_GET_STYPE(fc); pda_addr = header->addr1; if (is_broadcast_ether_addr(pda_addr)) - broad_addr = true; + priv->stats.txbytesbroadcast += skb->len - fwinfo_size; else if (is_multicast_ether_addr(pda_addr)) - multi_addr = true; - else - uni_addr = true; - - if (uni_addr) - priv->stats.txbytesunicast += skb->len - fwinfo_size; - else if (multi_addr) priv->stats.txbytesmulticast += skb->len - fwinfo_size; else - priv->stats.txbytesbroadcast += skb->len - fwinfo_size; + priv->stats.txbytesunicast += skb->len - fwinfo_size; spin_lock_irqsave(&priv->irq_th_lock, flags); ring = &priv->tx_ring[tcb_desc->queue_index]; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: rtlwifi: Remove set but not used variables 'dataempty, hoffset'
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtlwifi/efuse.c: In function 'efuse_pg_packet_write': drivers/staging/rtlwifi/efuse.c:922:24: warning: variable 'dataempty' set but not used [-Wunused-but-set-variable] drivers/staging/rtlwifi/efuse.c: In function 'efuse_get_current_size': drivers/staging/rtlwifi/efuse.c:1185:5: warning: variable 'hoffset' set but not used [-Wunused-but-set-variable] They're never used and can be removed. Signed-off-by: YueHaibing --- drivers/staging/rtlwifi/efuse.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtlwifi/efuse.c b/drivers/staging/rtlwifi/efuse.c index abb0f72..54add99 100644 --- a/drivers/staging/rtlwifi/efuse.c +++ b/drivers/staging/rtlwifi/efuse.c @@ -919,7 +919,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw, struct rtl_priv *rtlpriv = rtl_priv(hw); struct pgpkt_struct target_pkt; u8 write_state = PG_STATE_HEADER; - int continual = true, dataempty = true, result = true; + int continual = true, result = true; u16 efuse_addr = 0; u8 efuse_data; u8 target_word_cnts = 0; @@ -946,7 +946,6 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw, while (continual && (efuse_addr < (EFUSE_MAX_SIZE - rtlpriv->cfg->maps[EFUSE_OOB_PROTECT_BYTES_LEN]))) { if (write_state == PG_STATE_HEADER) { - dataempty = true; badworden = 0x0F; RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, "efuse PG_STATE_HEADER\n"); @@ -1182,13 +1181,12 @@ static u16 efuse_get_current_size(struct ieee80211_hw *hw) { int continual = true; u16 efuse_addr = 0; - u8 hoffset, hworden; + u8 hworden; u8 efuse_data, word_cnts; while (continual && efuse_one_byte_read(hw, efuse_addr, &efuse_data) && (efuse_addr < EFUSE_MAX_SIZE)) { if (efuse_data != 0xFF) { - hoffset = (efuse_data >> 4) & 0x0F; hworden = efuse_data & 0x0F; word_cnts = efuse_calculate_word_cnts(hworden); efuse_addr = efuse_addr + (word_cnts * 2) + 1; -- 2.7.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8192u: ieee80211: add space around '==' and before '('
On 2019/4/5 9:56, Caio Salvador Rohwedder wrote: > Fix checkpatch coding style errors on rtl819x_TSProc.c > - space required before the open parenthesis '(' > - spaces required around that '==' > > Signed-off-by: Caio Salvador Rohwedder > --- > drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c > b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c > index c76715ffa08b..0af1a87a5545 100644 > --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c > +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c > @@ -373,7 +373,7 @@ bool GetTs( > if(!list_empty(pUnusedList)) { > (*ppTS) = list_entry(pUnusedList->next, struct > ts_common_info, list); > list_del_init(&(*ppTS)->list); > - if(TxRxSelect==TX_DIR) { > + if (TxRxSelect == TX_DIR) { > struct tx_ts_record *tmp = > container_of(*ppTS, struct tx_ts_record, ts_common_info); This line seems over 80 characters, may also be fixed. In fact, this file has so many code style issues, see ./scripts/checkpatch.pl --no-tree -f drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c > ResetTxTsEntry(tmp); > } else { > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: rtl8723bs: remove set but not used variable 'bEEPROMCheck'
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs//hal/odm_CfoTracking.c: In function 'odm_SetCrystalCap': drivers/staging/rtl8723bs//hal/odm_CfoTracking.c:14:7: warning: variable 'bEEPROMCheck' set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/staging/rtl8723bs/hal/odm_CfoTracking.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c b/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c index a733046..95edd14 100644 --- a/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c +++ b/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c @@ -11,11 +11,6 @@ static void odm_SetCrystalCap(void *pDM_VOID, u8 CrystalCap) { PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID; PCFO_TRACKING pCfoTrack = &pDM_Odm->DM_CfoTrack; - bool bEEPROMCheck; - struct adapter *Adapter = pDM_Odm->Adapter; - struct hal_com_data *pHalData = GET_HAL_DATA(Adapter); - - bEEPROMCheck = pHalData->EEPROMVersion >= 0x01; if (pCfoTrack->CrystalCap == CrystalCap) return; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: wusbcore: Fix build error without CONFIG_USB
USB_WUSB should depends on CONFIG_USB, otherwise building fails drivers/staging/wusbcore/wusbhc.o: In function `wusbhc_giveback_urb': wusbhc.c:(.text+0xa28): undefined reference to `usb_hcd_giveback_urb' Reported-by: Hulk Robot Fixes: 71ed79b0e4be ("USB: Move wusbcore and UWB to staging as it is obsolete") Signed-off-by: YueHaibing --- drivers/staging/wusbcore/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wusbcore/Kconfig b/drivers/staging/wusbcore/Kconfig index 056c60b..a559d02 100644 --- a/drivers/staging/wusbcore/Kconfig +++ b/drivers/staging/wusbcore/Kconfig @@ -4,7 +4,7 @@ # config USB_WUSB tristate "Enable Wireless USB extensions" - depends on UWB + depends on UWB && USB select CRYPTO select CRYPTO_AES select CRYPTO_CCM -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: rtl8192u: ieee80211: remove set but not used variable 'data_len'
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c: In function ieee80211_ccmp_encrypt: drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c:162:6: warning: variable data_len set but not used [-Wunused-but-set-variable] It is not used since commit eb0e7bf3ca94 ("staging: rtl8192u: ieee80211: ieee80211_crypt_ccmp.c: Use crypto API ccm(aes)") Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c index aecee42..a43a5d6 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c @@ -159,7 +159,7 @@ static int ccmp_init_iv_and_aad(struct rtl_80211_hdr_4addr *hdr, static int ieee80211_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) { struct ieee80211_ccmp_data *key = priv; - int data_len, i; + int i; u8 *pos; struct rtl_80211_hdr_4addr *hdr; struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); @@ -169,7 +169,6 @@ static int ieee80211_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) skb->len < hdr_len) return -1; - data_len = skb->len - hdr_len; pos = skb_push(skb, CCMP_HDR_LEN); memmove(pos, pos + CCMP_HDR_LEN, hdr_len); pos += hdr_len; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: rtl8192e: remove two set but not used variables
Fixes gcc '-Wunused-but-set-variable' warning: In function '_rtl92e_dm_tx_power_tracking_callback_tssi': drivers/staging/rtl8192e/rtl8192e/rtl_dm.c:621:7: warning: variable 'bHighpowerstate' set but not used [-Wunused-but-set-variable] In function '_rtl92e_dm_rx_path_sel_byrssi': drivers/staging/rtl8192e/rtl8192e/rtl_dm.c:1904:32: warning: variable 'cck_rx_ver2_min_index' set but not used [-Wunused-but-set-variable] They are never used, so can be removed. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index 1b7e3fd..20e4941 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -618,7 +618,7 @@ static void _rtl92e_dm_tx_update_tssi_strong_signal(struct net_device *dev, static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); - boolbHighpowerstate, viviflag = false; + boolviviflag = false; struct dcmd_txcmd tx_cmd; u8 powerlevelOFDM24G; int i = 0, j = 0, k = 0; @@ -632,7 +632,6 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev) rtl92e_writeb(dev, Pw_Track_Flag, 0); rtl92e_writeb(dev, FW_Busy_Flag, 0); priv->rtllib->bdynamic_txpower_enable = false; - bHighpowerstate = priv->bDynamicTxHighPower; powerlevelOFDM24G = (u8)(priv->Pwr_Track>>24); RF_Type = priv->rf_type; @@ -1901,7 +1900,7 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev) u8 cck_default_Rx = 0x2; u8 cck_optional_Rx = 0x3; long tmp_cck_max_pwdb = 0, tmp_cck_min_pwdb = 0, tmp_cck_sec_pwdb = 0; - u8 cck_rx_ver2_max_index = 0, cck_rx_ver2_min_index = 0; + u8 cck_rx_ver2_max_index = 0; u8 cck_rx_ver2_sec_index = 0; u8 cur_rf_rssi; long cur_cck_pwdb; @@ -1984,7 +1983,6 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev) if (rf_num == 1) { cck_rx_ver2_max_index = i; - cck_rx_ver2_min_index = i; cck_rx_ver2_sec_index = i; tmp_cck_max_pwdb = cur_cck_pwdb; tmp_cck_min_pwdb = cur_cck_pwdb; @@ -1997,7 +1995,6 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev) tmp_cck_sec_pwdb = cur_cck_pwdb; tmp_cck_min_pwdb = cur_cck_pwdb; cck_rx_ver2_sec_index = i; - cck_rx_ver2_min_index = i; } } else { if (cur_cck_pwdb > tmp_cck_max_pwdb) { @@ -2027,13 +2024,10 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev) (cur_cck_pwdb > tmp_cck_min_pwdb)) { ; } else if (cur_cck_pwdb == tmp_cck_min_pwdb) { - if (tmp_cck_sec_pwdb == tmp_cck_min_pwdb) { + if (tmp_cck_sec_pwdb == tmp_cck_min_pwdb) tmp_cck_min_pwdb = cur_cck_pwdb; - cck_rx_ver2_min_index = i; - } } else if (cur_cck_pwdb < tmp_cck_min_pwdb) { tmp_cck_min_pwdb = cur_cck_pwdb; - cck_rx_ver2_min_index = i; } } -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: rtl8192e: remove set but not used variable 'data_len'
Fixes gcc '-Wunused-but-set-variable' warning: In function ieee80211_ccmp_encrypt: drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c:162:6: warning: variable data_len set but not used [-Wunused-but-set-variable] It is not used since commit 5ee5265674ce ("staging: rtl8192e: rtllib_crypt_ccmp.c: Use crypto API ccm(aes)") Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c index 44ec45d..0cbf4a1 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c +++ b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c @@ -153,7 +153,7 @@ static int ccmp_init_iv_and_aad(struct rtllib_hdr_4addr *hdr, static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) { struct rtllib_ccmp_data *key = priv; - int data_len, i; + int i; u8 *pos; struct rtllib_hdr_4addr *hdr; struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + @@ -163,7 +163,6 @@ static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) skb->len < hdr_len) return -1; - data_len = skb->len - hdr_len; pos = skb_push(skb, CCMP_HDR_LEN); memmove(pos, pos + CCMP_HDR_LEN, hdr_len); pos += hdr_len; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] media: staging: tegra-vde: Disable building with COMPILE_TEST
If COMPILE_TEST is y and IOMMU_SUPPORT is n, selecting TEGRA_VDE to m will set IOMMU_IOVA to m, this fails the building of TEGRA_HOST1X and DRM_TEGRA which is y like this: drivers/gpu/host1x/cdma.o: In function `host1x_cdma_init': cdma.c:(.text+0x66c): undefined reference to `alloc_iova' cdma.c:(.text+0x698): undefined reference to `__free_iova' drivers/gpu/drm/tegra/drm.o: In function `tegra_drm_unload': drm.c:(.text+0xeb0): undefined reference to `put_iova_domain' drm.c:(.text+0xeb4): undefined reference to `iova_cache_put' Reported-by: Hulk Robot Fixes: 6b2265975239 ("media: staging: tegra-vde: Fix build error") Fixes: b301f8de1925 ("media: staging: media: tegra-vde: Add IOMMU support") Signed-off-by: YueHaibing --- drivers/staging/media/tegra-vde/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/tegra-vde/Kconfig b/drivers/staging/media/tegra-vde/Kconfig index ba49ea5..a41d30c 100644 --- a/drivers/staging/media/tegra-vde/Kconfig +++ b/drivers/staging/media/tegra-vde/Kconfig @@ -1,9 +1,9 @@ # SPDX-License-Identifier: GPL-2.0 config TEGRA_VDE tristate "NVIDIA Tegra Video Decoder Engine driver" - depends on ARCH_TEGRA || COMPILE_TEST + depends on ARCH_TEGRA select DMA_SHARED_BUFFER - select IOMMU_IOVA if (IOMMU_SUPPORT || COMPILE_TEST) + select IOMMU_IOVA if IOMMU_SUPPORT select SRAM help Say Y here to enable support for the NVIDIA Tegra video decoder -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: most: sound: Fix error path of audio_init
If most_register_configfs_subsys() fails, we should call most_deregister_component() do cleanup. Reported-by: Hulk Robot Fixes: 919c03ae11b9 ("staging: most: enable configfs support") Signed-off-by: YueHaibing --- drivers/staging/most/sound/sound.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/most/sound/sound.c b/drivers/staging/most/sound/sound.c index 342f390..7981706 100644 --- a/drivers/staging/most/sound/sound.c +++ b/drivers/staging/most/sound/sound.c @@ -802,8 +802,11 @@ static int __init audio_init(void) if (ret) pr_err("Failed to register %s\n", comp.name); ret = most_register_configfs_subsys(&comp); - if (ret) + if (ret) { pr_err("Failed to register %s configfs subsys\n", comp.name); + most_deregister_component(&comp); + } + return ret; } -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] media: imx: remove unused including
Remove including that don't need it. Signed-off-by: YueHaibing --- drivers/staging/media/imx/imx-media-csc-scaler.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/imx/imx-media-csc-scaler.c b/drivers/staging/media/imx/imx-media-csc-scaler.c index de599af59ffc..2b635ebf62d6 100644 --- a/drivers/staging/media/imx/imx-media-csc-scaler.c +++ b/drivers/staging/media/imx/imx-media-csc-scaler.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: exfat: remove duplicated include from exfat_super.c
Remove duplicated include. Signed-off-by: YueHaibing --- drivers/staging/exfat/exfat_super.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index 5b5c2ca8c9aa..f202a6588dc3 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: exfat: remove unused including
Remove including that don't need it. Signed-off-by: YueHaibing --- drivers/staging/exfat/exfat_super.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index 5b5c2ca8c9aa..cb43a39864af 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -3,7 +3,6 @@ * Copyright (C) 2012-2013 Samsung Electronics Co., Ltd. */ -#include #include #include #include ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: exfat: Use kmemdup in exfat_symlink()
Use kmemdup rather than duplicating its implementation Signed-off-by: YueHaibing --- drivers/staging/exfat/exfat_super.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index 5b5c2ca8c9aa..05fdecc3e9ea 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -2696,12 +2696,11 @@ static int exfat_symlink(struct inode *dir, struct dentry *dentry, inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); /* timestamp is already written, so mark_inode_dirty() is unneeded. */ - EXFAT_I(inode)->target = kmalloc(len+1, GFP_KERNEL); + EXFAT_I(inode)->target = kmemdup(target, len + 1, GFP_KERNEL); if (!EXFAT_I(inode)->target) { err = -ENOMEM; goto out; } - memcpy(EXFAT_I(inode)->target, target, len+1); dentry->d_time = GET_IVERSION(dentry->d_parent->d_inode); d_instantiate(dentry, inode); ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] media: staging: tegra-vde: Disable building with COMPILE_TEST
On 2019/9/6 21:38, Dmitry Osipenko wrote: > 29.08.2019 18:49, Thierry Reding пишет: >> On Thu, Aug 29, 2019 at 04:58:22PM +0300, Dmitry Osipenko wrote: >>> 29.08.2019 15:40, Thierry Reding пишет: >>>> On Thu, Aug 29, 2019 at 01:39:32PM +0200, Hans Verkuil wrote: >>>>> On 8/26/19 3:31 PM, YueHaibing wrote: >>>>>> If COMPILE_TEST is y and IOMMU_SUPPORT is n, selecting TEGRA_VDE >>>>>> to m will set IOMMU_IOVA to m, this fails the building of >>>>>> TEGRA_HOST1X and DRM_TEGRA which is y like this: >>>>>> >>>>>> drivers/gpu/host1x/cdma.o: In function `host1x_cdma_init': >>>>>> cdma.c:(.text+0x66c): undefined reference to `alloc_iova' >>>>>> cdma.c:(.text+0x698): undefined reference to `__free_iova' >>>>>> >>>>>> drivers/gpu/drm/tegra/drm.o: In function `tegra_drm_unload': >>>>>> drm.c:(.text+0xeb0): undefined reference to `put_iova_domain' >>>>>> drm.c:(.text+0xeb4): undefined reference to `iova_cache_put' >>>>>> >>>>>> Reported-by: Hulk Robot >>>>>> Fixes: 6b2265975239 ("media: staging: tegra-vde: Fix build error") >>>>>> Fixes: b301f8de1925 ("media: staging: media: tegra-vde: Add IOMMU >>>>>> support") >>>>>> Signed-off-by: YueHaibing >>>>>> --- >>>>>> drivers/staging/media/tegra-vde/Kconfig | 4 ++-- >>>>>> 1 file changed, 2 insertions(+), 2 deletions(-) >>>>>> >>>>>> diff --git a/drivers/staging/media/tegra-vde/Kconfig >>>>>> b/drivers/staging/media/tegra-vde/Kconfig >>>>>> index ba49ea5..a41d30c 100644 >>>>>> --- a/drivers/staging/media/tegra-vde/Kconfig >>>>>> +++ b/drivers/staging/media/tegra-vde/Kconfig >>>>>> @@ -1,9 +1,9 @@ >>>>>> # SPDX-License-Identifier: GPL-2.0 >>>>>> config TEGRA_VDE >>>>>> tristate "NVIDIA Tegra Video Decoder Engine driver" >>>>>> -depends on ARCH_TEGRA || COMPILE_TEST >>>>>> +depends on ARCH_TEGRA >>>>> >>>>> What happens if you drop this change, >>>>> >>>>>> select DMA_SHARED_BUFFER >>>>>> -select IOMMU_IOVA if (IOMMU_SUPPORT || COMPILE_TEST) >>>>>> +select IOMMU_IOVA if IOMMU_SUPPORT >>>>> >>>>> but keep this change? >>>>> >>>>> iova.h has stubs that are used if IOMMU_IOVA is not set, so it should >>>>> work when compile testing this tegra-vde driver. >>>>> >>>>> Haven't tried it, but making sure that compile testing keep working is >>>>> really important. >>> >>> The driver's code compilation works okay, it's the linkage stage which >>> fails during compile-testing. >>> >>>> Yeah, that variant seems to work for me. I think it's also more correct >>>> because the IOMMU_IOVA if IOMMU_SUPPORT dependency really says that the >>>> IOVA usage is bound to IOMMU support. If IOMMU support is not enabled, >>>> then IOVA is not needed either, so the dummies will do just fine. >>> >>> Am I understanding correctly that you're suggesting to revert [1][2] and >>> get back to the other problem? >>> >>> [1] >>> https://lore.kernel.org/linux-media/dd547b44-7abb-371f-aeee-a82b96f82...@gmail.com/T/ >>> [2] https://patchwork.ozlabs.org/patch/1136619/ >>> >>> If we want to keep compile testing, I guess the only reasonable variant >>> right now is to select IOMMU_IOVA unconditionally in all of the drivers >>> (vde, host1x, drm and etc) and then just ignore that IOVA will be >>> compiled-and-unused if IOMMU_SUPPORT=n (note that IOMMU_SUPPORT=y in all >>> of default kernel configurations). >> >> Agreed. I think we should just select IOMMU_IOVA unconditionally. We >> really do want IOMMU_SUPPORT always as well, but it might be nice to be >> able to switch it off for testing or so. In the cases that really matter >> we will be enabling both IOMMU_SUPPORT and IOMMU_IOVA anyway, so might >> as well select IOMMU_IOVA always. It's not terribly big and I can't >> imagine anyone wanting to run a kernel without IOMMU_SUPPORT for >> anything other than testing. > > Hello Yue, > > Could you please make an updated version of the fix in accordance to the > above comments? > > Alternatively, we can go with the current patch and temporarily remove the > compile-testing. I'll make > patches to properly re-add compile-testing sometime later then. I prefer to do this choice, thanks. > > . > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: clocking-wizard: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c b/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c index 15b7a82..e52a64b 100644 --- a/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c +++ b/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c @@ -135,7 +135,6 @@ static int clk_wzrd_probe(struct platform_device *pdev) unsigned long rate; const char *clk_name; struct clk_wzrd *clk_wzrd; - struct resource *mem; struct device_node *np = pdev->dev.of_node; clk_wzrd = devm_kzalloc(&pdev->dev, sizeof(*clk_wzrd), GFP_KERNEL); @@ -143,8 +142,7 @@ static int clk_wzrd_probe(struct platform_device *pdev) return -ENOMEM; platform_set_drvdata(pdev, clk_wzrd); - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - clk_wzrd->base = devm_ioremap_resource(&pdev->dev, mem); + clk_wzrd->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(clk_wzrd->base)) return PTR_ERR(clk_wzrd->base); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: emxx_udc: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/staging/emxx_udc/emxx_udc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index 147481b..9e0c19e 100644 --- a/drivers/staging/emxx_udc/emxx_udc.c +++ b/drivers/staging/emxx_udc/emxx_udc.c @@ -3078,7 +3078,6 @@ static int nbu2ss_drv_probe(struct platform_device *pdev) { int status = -ENODEV; struct nbu2ss_udc *udc; - struct resource *r; int irq; void __iomem *mmio_base; @@ -3088,8 +3087,7 @@ static int nbu2ss_drv_probe(struct platform_device *pdev) platform_set_drvdata(pdev, udc); /* require I/O memory and IRQ to be provided as resources */ - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mmio_base = devm_ioremap_resource(&pdev->dev, r); + mmio_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mmio_base)) return PTR_ERR(mmio_base); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: rtl8723bs: Remove unnecessary null check
Null check before kfree is redundant, so remove it. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c index 5044f73..74b097a 100644 --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c @@ -1141,8 +1141,7 @@ void rtw_ndev_destructor(struct net_device *ndev) { DBG_871X(FUNC_NDEV_FMT "\n", FUNC_NDEV_ARG(ndev)); - if (ndev->ieee80211_ptr) - kfree(ndev->ieee80211_ptr); + kfree(ndev->ieee80211_ptr); } void rtw_dev_unload(struct adapter *padapter) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: rtl8723bs: remove unnecessary null check
Null check before kfree is redundant, so remove it. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/staging/rtl8723bs/core/rtw_xmit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c index 7011c2a..4597f4f 100644 --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c @@ -2210,8 +2210,7 @@ void rtw_free_hwxmits(struct adapter *padapter) struct xmit_priv *pxmitpriv = &padapter->xmitpriv; hwxmits = pxmitpriv->hwxmits; - if (hwxmits) - kfree(hwxmits); + kfree(hwxmits); } void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 -next] staging: rtl8723bs: remove unnecessary null check
Null check before kfree is redundant, so remove it. This is detected by coccinelle. Signed-off-by: YueHaibing --- v2: remove unnecessary 'hwxmits' --- drivers/staging/rtl8723bs/core/rtw_xmit.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c index 7011c2a..6d193f1 100644 --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c @@ -2206,12 +2206,9 @@ s32 rtw_alloc_hwxmits(struct adapter *padapter) void rtw_free_hwxmits(struct adapter *padapter) { - struct hw_xmit *hwxmits; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; - hwxmits = pxmitpriv->hwxmits; - if (hwxmits) - kfree(hwxmits); + kfree(pxmitpriv->hwxmits); } void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: fieldbus: arcx-anybus:use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/staging/fieldbus/anybuss/arcx-anybus.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/fieldbus/anybuss/arcx-anybus.c b/drivers/staging/fieldbus/anybuss/arcx-anybus.c index 2ecffa4..5b8d0ba 100644 --- a/drivers/staging/fieldbus/anybuss/arcx-anybus.c +++ b/drivers/staging/fieldbus/anybuss/arcx-anybus.c @@ -127,12 +127,10 @@ static const struct regmap_config arcx_regmap_cfg = { static struct regmap *create_parallel_regmap(struct platform_device *pdev, int idx) { - struct resource *res; void __iomem *base; struct device *dev = &pdev->dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, idx + 1); - base = devm_ioremap_resource(dev, res); + base = devm_platform_ioremap_resource(pdev, idx + 1); if (IS_ERR(base)) return ERR_CAST(base); return devm_regmap_init_mmio(dev, base, &arcx_regmap_cfg); @@ -230,7 +228,6 @@ static int controller_probe(struct platform_device *pdev) struct regulator_config config = { }; struct regulator_dev *regulator; int err, id; - struct resource *res; struct anybuss_host *host; u8 status1, cap; @@ -244,8 +241,7 @@ static int controller_probe(struct platform_device *pdev) return PTR_ERR(cd->reset_gpiod); /* CPLD control memory, sits at index 0 */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - cd->cpld_base = devm_ioremap_resource(dev, res); + cd->cpld_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(cd->cpld_base)) { dev_err(dev, "failed to map cpld base address\n"); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: media: omap4iss: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/staging/media/omap4iss/iss.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c index 1a966cb..6fb60b5 100644 --- a/drivers/staging/media/omap4iss/iss.c +++ b/drivers/staging/media/omap4iss/iss.c @@ -908,11 +908,7 @@ static int iss_map_mem_resource(struct platform_device *pdev, struct iss_device *iss, enum iss_mem_resources res) { - struct resource *mem; - - mem = platform_get_resource(pdev, IORESOURCE_MEM, res); - - iss->regs[res] = devm_ioremap_resource(iss->dev, mem); + iss->regs[res] = devm_platform_ioremap_resource(pdev, res); return PTR_ERR_OR_ZERO(iss->regs[res]); } -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: media: cedrus: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_hw.c b/drivers/staging/media/sunxi/cedrus/cedrus_hw.c index a942cd9..f19b87c 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus_hw.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus_hw.c @@ -146,7 +146,6 @@ static irqreturn_t cedrus_irq(int irq, void *data) int cedrus_hw_probe(struct cedrus_dev *dev) { const struct cedrus_variant *variant; - struct resource *res; int irq_dec; int ret; @@ -225,8 +224,7 @@ int cedrus_hw_probe(struct cedrus_dev *dev) goto err_sram; } - res = platform_get_resource(dev->pdev, IORESOURCE_MEM, 0); - dev->base = devm_ioremap_resource(dev->dev, res); + dev->base = devm_platform_ioremap_resource(dev->pdev, 0); if (IS_ERR(dev->base)) { dev_err(dev->dev, "Failed to map registers\n"); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: mt7621-dma: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/staging/mt7621-dma/mtk-hsdma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/mt7621-dma/mtk-hsdma.c b/drivers/staging/mt7621-dma/mtk-hsdma.c index d964642..4d541c4 100644 --- a/drivers/staging/mt7621-dma/mtk-hsdma.c +++ b/drivers/staging/mt7621-dma/mtk-hsdma.c @@ -650,7 +650,6 @@ static int mtk_hsdma_probe(struct platform_device *pdev) struct mtk_hsdma_chan *chan; struct mtk_hsdam_engine *hsdma; struct dma_device *dd; - struct resource *res; int ret; int irq; void __iomem *base; @@ -667,8 +666,7 @@ static int mtk_hsdma_probe(struct platform_device *pdev) if (!hsdma) return -EINVAL; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); hsdma->base = base + HSDMA_BASE_OFFSET; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: netlogic: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/staging/netlogic/xlr_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c index 05079f7..204fcdf 100644 --- a/drivers/staging/netlogic/xlr_net.c +++ b/drivers/staging/netlogic/xlr_net.c @@ -976,8 +976,7 @@ static int xlr_net_probe(struct platform_device *pdev) priv->ndev = ndev; priv->port_id = (pdev->id * 4) + port; priv->nd = (struct xlr_net_data *)pdev->dev.platform_data; - res = platform_get_resource(pdev, IORESOURCE_MEM, port); - priv->base_addr = devm_ioremap_resource(&pdev->dev, res); + priv->base_addr = devm_platform_ioremap_resource(pdev, port); if (IS_ERR(priv->base_addr)) { err = PTR_ERR(priv->base_addr); goto err_gmac; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: ralink-gdma: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/staging/ralink-gdma/ralink-gdma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c b/drivers/staging/ralink-gdma/ralink-gdma.c index 900424d..eabf109 100644 --- a/drivers/staging/ralink-gdma/ralink-gdma.c +++ b/drivers/staging/ralink-gdma/ralink-gdma.c @@ -796,7 +796,6 @@ static int gdma_dma_probe(struct platform_device *pdev) struct gdma_dma_dev *dma_dev; struct dma_device *dd; unsigned int i; - struct resource *res; int ret; int irq; void __iomem *base; @@ -818,8 +817,7 @@ static int gdma_dma_probe(struct platform_device *pdev) return -EINVAL; dma_dev->data = data; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); dma_dev->base = base; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: comedi: dt2814: remove set but not used variables 'data'
drivers/staging/comedi/drivers/dt2814.c:193:6: warning: variable data set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Signed-off-by: YueHaibing --- drivers/staging/comedi/drivers/dt2814.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/dt2814.c b/drivers/staging/comedi/drivers/dt2814.c index d2c7157..e7c6787 100644 --- a/drivers/staging/comedi/drivers/dt2814.c +++ b/drivers/staging/comedi/drivers/dt2814.c @@ -186,21 +186,17 @@ static int dt2814_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) static irqreturn_t dt2814_interrupt(int irq, void *d) { - int lo, hi; struct comedi_device *dev = d; struct dt2814_private *devpriv = dev->private; struct comedi_subdevice *s = dev->read_subdev; - int data; if (!dev->attached) { dev_err(dev->class_dev, "spurious interrupt\n"); return IRQ_HANDLED; } - hi = inb(dev->iobase + DT2814_DATA); - lo = inb(dev->iobase + DT2814_DATA); - - data = (hi << 4) | (lo >> 4); + inb(dev->iobase + DT2814_DATA); + inb(dev->iobase + DT2814_DATA); if (!(--devpriv->ntrig)) { int i; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: comedi: remove unused variable 'route_table_size'
drivers/staging/comedi/drivers/ni_routes.c:52:21: warning: route_table_size defined but not used [-Wunused-const-variable=] It is never used since introduction. Signed-off-by: YueHaibing --- drivers/staging/comedi/drivers/ni_routes.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_routes.c b/drivers/staging/comedi/drivers/ni_routes.c index eb61494..673d732 100644 --- a/drivers/staging/comedi/drivers/ni_routes.c +++ b/drivers/staging/comedi/drivers/ni_routes.c @@ -49,8 +49,6 @@ /* Helper for accessing data. */ #define RVi(table, src, dest) ((table)[(dest) * NI_NUM_NAMES + (src)]) -static const size_t route_table_size = NI_NUM_NAMES * NI_NUM_NAMES; - /* * Find the proper route_values and ni_device_routes tables for this particular * device. -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: vboxsf: Remove unused including
Remove including that don't need it. Signed-off-by: YueHaibing --- drivers/staging/vboxsf/vfsmod.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/vboxsf/vfsmod.h b/drivers/staging/vboxsf/vfsmod.h index de650d65fbe4..18f95b00fc33 100644 --- a/drivers/staging/vboxsf/vfsmod.h +++ b/drivers/staging/vboxsf/vfsmod.h @@ -10,7 +10,6 @@ #include #include -#include #include "shfl_hostintf.h" #define DIR_BUFFER_SIZE SZ_16K ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: hp100: Use match_string() helper to simplify the code
match_string() returns the array index of a matching string. Use it instead of the open-coded implementation. Signed-off-by: YueHaibing --- drivers/staging/hp/hp100.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c index 6ec78f5..e2f0b58 100644 --- a/drivers/staging/hp/hp100.c +++ b/drivers/staging/hp/hp100.c @@ -339,14 +339,11 @@ static __init int hp100_isa_probe1(struct net_device *dev, int ioaddr) if (sig == NULL) goto err; - for (i = 0; i < ARRAY_SIZE(hp100_isa_tbl); i++) { - if (!strcmp(hp100_isa_tbl[i], sig)) - break; - - } + i = match_string(hp100_isa_tbl, ARRAY_SIZE(hp100_isa_tbl), sig); + if (i < 0) + goto err; - if (i < ARRAY_SIZE(hp100_isa_tbl)) - return hp100_probe1(dev, ioaddr, HP100_BUS_ISA, NULL); + return hp100_probe1(dev, ioaddr, HP100_BUS_ISA, NULL); err: return -ENODEV; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: hp100: Fix build error without ETHERNET
It should depends on ETHERNET, otherwise building fails: drivers/staging/hp/hp100.o: In function `hp100_pci_remove': hp100.c:(.text+0x165): undefined reference to `unregister_netdev' hp100.c:(.text+0x214): undefined reference to `free_netdev' Fixes: 52340b82cf1a ("hp100: Move 100BaseVG AnyLAN driver to staging") Signed-off-by: YueHaibing --- drivers/staging/hp/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/hp/Kconfig b/drivers/staging/hp/Kconfig index fb395cf..f20ab21 100644 --- a/drivers/staging/hp/Kconfig +++ b/drivers/staging/hp/Kconfig @@ -6,6 +6,7 @@ config NET_VENDOR_HP bool "HP devices" default y + depends on ETHERNET depends on ISA || EISA || PCI ---help--- If you have a network (Ethernet) card belonging to this class, say Y. -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: exfat: remove two unused functions
Fix sparse warnings: drivers/staging/exfat/exfat_core.c:2045:4: warning: symbol 'calc_checksum_1byte' was not declared. Should it be static? drivers/staging/exfat/exfat_core.c:2080:5: warning: symbol 'calc_checksum_4byte' was not declared. Should it be static? The two functions has no caller in tree, so remove it. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/staging/exfat/exfat_core.c | 35 --- 1 file changed, 35 deletions(-) diff --git a/drivers/staging/exfat/exfat_core.c b/drivers/staging/exfat/exfat_core.c index 1638ed2..d2d3447 100644 --- a/drivers/staging/exfat/exfat_core.c +++ b/drivers/staging/exfat/exfat_core.c @@ -2042,17 +2042,6 @@ static s32 exfat_calc_num_entries(struct uni_name_t *p_uniname) return (len - 1) / 15 + 3; } -u8 calc_checksum_1byte(void *data, s32 len, u8 chksum) -{ - int i; - u8 *c = (u8 *)data; - - for (i = 0; i < len; i++, c++) - chksum = (((chksum & 1) << 7) | ((chksum & 0xFE) >> 1)) + *c; - - return chksum; -} - u16 calc_checksum_2byte(void *data, s32 len, u16 chksum, s32 type) { int i; @@ -2077,30 +2066,6 @@ u16 calc_checksum_2byte(void *data, s32 len, u16 chksum, s32 type) return chksum; } -u32 calc_checksum_4byte(void *data, s32 len, u32 chksum, s32 type) -{ - int i; - u8 *c = (u8 *)data; - - switch (type) { - case CS_PBR_SECTOR: - for (i = 0; i < len; i++, c++) { - if ((i == 106) || (i == 107) || (i == 112)) - continue; - chksum = (((chksum & 1) << 31) | - ((chksum & 0xFFFE) >> 1)) + (u32)*c; - } - break; - default - : - for (i = 0; i < len; i++, c++) - chksum = (((chksum & 1) << 31) | - ((chksum & 0xFFFE) >> 1)) + (u32)*c; - } - - return chksum; -} - /* * Name Resolution Functions */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: comedi: dyna_pci10xx: remove set but not used variables 'chan' and range'
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/comedi/drivers/dyna_pci10xx.c: In function 'dyna_pci10xx_insn_write_ao': drivers/staging/comedi/drivers/dyna_pci10xx.c:109:21: warning: variable 'range' set but not used [-Wunused-but-set-variable] unsigned int chan, range; drivers/staging/comedi/drivers/dyna_pci10xx.c:109:15: warning: variable 'chan' set but not used [-Wunused-but-set-variable] unsigned int chan, range; They are never used since introduction in commit 16a7373a8e14 ("Staging: comedi: add dyna_pci10xx driver") Signed-off-by: YueHaibing --- drivers/staging/comedi/drivers/dyna_pci10xx.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/dyna_pci10xx.c b/drivers/staging/comedi/drivers/dyna_pci10xx.c index 9bdd5bf2eb99..d38bfc6113e8 100644 --- a/drivers/staging/comedi/drivers/dyna_pci10xx.c +++ b/drivers/staging/comedi/drivers/dyna_pci10xx.c @@ -106,10 +106,6 @@ static int dyna_pci10xx_insn_write_ao(struct comedi_device *dev, { struct dyna_pci10xx_private *devpriv = dev->private; int n; - unsigned int chan, range; - - chan = CR_CHAN(insn->chanspec); - range = range_codes_pci1050_ai[CR_RANGE((insn->chanspec))]; mutex_lock(&devpriv->mutex); for (n = 0; n < insn->n; n++) { ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: rtlwifi: rtl8822be: Remove set but not used variable 'curtxbw_40mhz'
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtlwifi/rtl8822be/hw.c: In function 'rtl8822be_update_hal_rate_mask': drivers/staging/rtlwifi/rtl8822be/hw.c:2144:5: warning: variable 'curtxbw_40mhz' set but not used [-Wunused-but-set-variable] It's never used and can be removed. Signed-off-by: YueHaibing --- drivers/staging/rtlwifi/rtl8822be/hw.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtlwifi/rtl8822be/hw.c b/drivers/staging/rtlwifi/rtl8822be/hw.c index dac22c21f821..1de4e903a4de 100644 --- a/drivers/staging/rtlwifi/rtl8822be/hw.c +++ b/drivers/staging/rtlwifi/rtl8822be/hw.c @@ -2141,8 +2141,6 @@ static void rtl8822be_update_hal_rate_mask(struct ieee80211_hw *hw, u32 ratr_bitmap, ratr_bitmap_msb = 0; u8 ratr_index; enum wireless_mode wirelessmode = 0; - u8 curtxbw_40mhz = - (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) ? 1 : 0; bool b_shortgi = false; u8 rate_mask[7]; u8 macid = 0; @@ -2153,11 +2151,8 @@ static void rtl8822be_update_hal_rate_mask(struct ieee80211_hw *hw, RT_TRACE(rtlpriv, COMP_RATR, DBG_LOUD, "wireless mode = 0x%x\n", wirelessmode); - if (mac->opmode == NL80211_IFTYPE_STATION || - mac->opmode == NL80211_IFTYPE_MESH_POINT) { - curtxbw_40mhz = mac->bw_40; - } else if (mac->opmode == NL80211_IFTYPE_AP || - mac->opmode == NL80211_IFTYPE_ADHOC) + if (mac->opmode == NL80211_IFTYPE_AP || + mac->opmode == NL80211_IFTYPE_ADHOC) macid = sta->aid + 1; if (wirelessmode == WIRELESS_MODE_N_5G || wirelessmode == WIRELESS_MODE_AC_5G || ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: rtl8192e: Remove set but not used variable 'VenderID'
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8192e/rtl8192e/rtl_pci.c: In function 'rtl92e_check_adapter': drivers/staging/rtl8192e/rtl8192e/rtl_pci.c:36:6: warning: variable 'VenderID' set but not used [-Wunused-but-set-variable] u16 VenderID; ^ It's never used and can be removed. Signed-off-by: YueHaibing --- drivers/staging/rtl8192e/rtl8192e/rtl_pci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c index bab41ab7c0a5..1d992d5c4e17 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c @@ -33,12 +33,10 @@ static void _rtl92e_parse_pci_configuration(struct pci_dev *pdev, bool rtl92e_check_adapter(struct pci_dev *pdev, struct net_device *dev) { struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); - u16 VenderID; u16 DeviceID; u8 RevisionID; u16 IrqLine; - VenderID = pdev->vendor; DeviceID = pdev->device; RevisionID = pdev->revision; pci_read_config_word(pdev, 0x3C, &IrqLine); ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: rtlwifi: base: Remove set but not used variables
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtlwifi/base.c: In function 'rtl_tx_agg_stop': drivers/staging/rtlwifi/base.c:1733:23: warning: variable 'tid_data' set but not used [-Wunused-but-set-variable] drivers/staging/rtlwifi/base.c: In function 'rtl_check_beacon_key': drivers/staging/rtlwifi/base.c:2474:5: warning: variable 'ds_param_len' set but not used [-Wunused-but-set-variable] drivers/staging/rtlwifi/base.c:2472:5: warning: variable 'ht_oper_len' set but not used [-Wunused-but-set-variable] drivers/staging/rtlwifi/base.c:2470:5: warning: variable 'ht_cap_len' set but not used [-Wunused-but-set-variable] They are never used and can be removed. Signed-off-by: YueHaibing --- drivers/staging/rtlwifi/base.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c index b8358ebbf912..b8b89e4c54d4 100644 --- a/drivers/staging/rtlwifi/base.c +++ b/drivers/staging/rtlwifi/base.c @@ -1730,7 +1730,6 @@ int rtl_tx_agg_stop(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta, u16 tid) { struct rtl_priv *rtlpriv = rtl_priv(hw); - struct rtl_tid_data *tid_data; struct rtl_sta_info *sta_entry = NULL; if (!sta) @@ -1743,7 +1742,6 @@ int rtl_tx_agg_stop(struct ieee80211_hw *hw, struct ieee80211_vif *vif, return -EINVAL; sta_entry = (struct rtl_sta_info *)sta->drv_priv; - tid_data = &sta_entry->tids[tid]; sta_entry->tids[tid].agg.agg_state = RTL_AGG_STOP; ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); @@ -2467,11 +2465,8 @@ bool rtl_check_beacon_key(struct ieee80211_hw *hw, void *data, unsigned int len) struct rtl_beacon_keys bcn_key = {}; struct rtl_beacon_keys *cur_bcn_key; u8 *ht_cap; - u8 ht_cap_len; u8 *ht_oper; - u8 ht_oper_len; u8 *ds_param; - u8 ds_param_len; if (mac->opmode != NL80211_IFTYPE_STATION) return false; @@ -2502,18 +2497,15 @@ bool rtl_check_beacon_key(struct ieee80211_hw *hw, void *data, unsigned int len) /* Parsing DS Param IE **/ ds_param = rtl_find_ie(data, len - FCS_LEN, WLAN_EID_DS_PARAMS); - if (ds_param && !(ds_param[1] < sizeof(*ds_param))) { - ds_param_len = ds_param[1]; + if (ds_param && !(ds_param[1] < sizeof(*ds_param))) bcn_key.bcn_channel = ds_param[2]; - } else { + else ds_param = NULL; - } /* Parsing HT Cap. IE **/ ht_cap = rtl_find_ie(data, len - FCS_LEN, WLAN_EID_HT_CAPABILITY); if (ht_cap && !(ht_cap[1] < sizeof(*ht_cap))) { - ht_cap_len = ht_cap[1]; ht_cap_ie = (struct ieee80211_ht_cap *)&ht_cap[2]; bcn_key.ht_cap_info = ht_cap_ie->cap_info; } else { @@ -2523,12 +2515,10 @@ bool rtl_check_beacon_key(struct ieee80211_hw *hw, void *data, unsigned int len) /* Parsing HT Info. IE **/ ht_oper = rtl_find_ie(data, len - FCS_LEN, WLAN_EID_HT_OPERATION); - if (ht_oper && !(ht_oper[1] < sizeof(*ht_oper))) { - ht_oper_len = ht_oper[1]; + if (ht_oper && !(ht_oper[1] < sizeof(*ht_oper))) ht_oper_ie = (struct ieee80211_ht_operation *)&ht_oper[2]; - } else { + else ht_oper = NULL; - } /* update bcn_key */ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: kpc2000: remove duplicated include from kp2000_module.c
Remove duplicated include. Signed-off-by: YueHaibing --- drivers/staging/kpc2000/kpc2000/kp2000_module.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/kpc2000/kpc2000/kp2000_module.c b/drivers/staging/kpc2000/kpc2000/kp2000_module.c index 661b0b74ed66..fa3bd266ba54 100644 --- a/drivers/staging/kpc2000/kpc2000/kp2000_module.c +++ b/drivers/staging/kpc2000/kpc2000/kp2000_module.c @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: kpc2000: fix platform_no_drv_owner.cocci warnings
Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing --- drivers/staging/kpc2000/kpc_spi/spi_driver.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/kpc2000/kpc_spi/spi_driver.c b/drivers/staging/kpc2000/kpc_spi/spi_driver.c index b38149b752fb..63b4616bf538 100644 --- a/drivers/staging/kpc2000/kpc_spi/spi_driver.c +++ b/drivers/staging/kpc2000/kpc_spi/spi_driver.c @@ -496,7 +496,6 @@ kp_spi_remove(struct platform_device *pldev) static struct platform_driver kp_spi_driver = { .driver = { .name = KP_DRIVER_NAME_SPI, -.owner =THIS_MODULE, }, .probe =kp_spi_probe, .remove = kp_spi_remove, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: kpc2000: Fix build error without CONFIG_UIO
Fix gcc build error while CONFIG_UIO is not set ERROR: "uio_unregister_device" [drivers/staging/kpc2000/kpc2000/kpc2000.ko] undefined! ERROR: "__uio_register_device" [drivers/staging/kpc2000/kpc2000/kpc2000.ko] undefined! Add UIO Kconfig dependency to fix this. Reported-by: Hulk Robot Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers") Signed-off-by: YueHaibing --- drivers/staging/kpc2000/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/kpc2000/Kconfig b/drivers/staging/kpc2000/Kconfig index fb59229..febe4f8 100644 --- a/drivers/staging/kpc2000/Kconfig +++ b/drivers/staging/kpc2000/Kconfig @@ -3,6 +3,7 @@ config KPC2000 bool "Daktronics KPC Device support" depends on PCI + depends on UIO help Select this if you wish to use the Daktronics KPC PCI devices -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: kpc2000: remove unused function kp2000_cdev_write
There is no callers in tree, so can be removed. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/staging/kpc2000/kpc2000/fileops.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/fileops.c b/drivers/staging/kpc2000/kpc2000/fileops.c index b3b0b763fa1e..f8774d8f69b8 100644 --- a/drivers/staging/kpc2000/kpc2000/fileops.c +++ b/drivers/staging/kpc2000/kpc2000/fileops.c @@ -74,11 +74,6 @@ ssize_t kp2000_cdev_read(struct file *filp, char __user *buf, size_t count, lof return count; } -ssize_t kp2000_cdev_write(struct file *filp, const char __user *buf, size_t count, loff_t *f_pos) -{ - return -EINVAL; -} - long kp2000_cdev_ioctl(struct file *filp, unsigned int ioctl_num, unsigned long ioctl_param) { struct kp2000_device *pcard = filp->private_data; @@ -122,9 +117,6 @@ struct file_operations kp2000_fops = { .open = kp2000_cdev_open, .release= kp2000_cdev_close, .read = kp2000_cdev_read, - //.write = kp2000_cdev_write, - //.poll = kp2000_cdev_poll, - //.fasync = kp2000_cdev_fasync, .llseek = noop_llseek, .unlocked_ioctl = kp2000_cdev_ioctl, }; -- 2.20.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: rtl8723bs: hal: Remove set but not used variable 'no_res' and 'phal'
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c: In function xmit_xmitframes: drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c:205:5: warning: variable no_res set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c: In function rtl8723bs_free_xmit_priv: drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c:640:23: warning: variable phal set but not used [-Wunused-but-set-variable] They are never used and can be removed. Signed-off-by: YueHaibing --- drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c index 7b06aab04ee6..9cf8da799ade 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c @@ -202,7 +202,7 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv s32 err, ret; u32 k = 0; struct hw_xmit *hwxmits, *phwxmit; - u8 no_res, idx, hwentry; + u8 idx, hwentry; struct tx_servq *ptxservq; struct list_head *sta_plist, *sta_phead, *frame_plist, *frame_phead; struct xmit_frame *pxmitframe; @@ -213,7 +213,6 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv int inx[4]; err = 0; - no_res = false; hwxmits = pxmitpriv->hwxmits; hwentry = pxmitpriv->hwxmit_entry; ptxservq = NULL; @@ -637,7 +636,6 @@ s32 rtl8723bs_init_xmit_priv(struct adapter *padapter) void rtl8723bs_free_xmit_priv(struct adapter *padapter) { - struct hal_com_data *phal; struct xmit_priv *pxmitpriv; struct xmit_buf *pxmitbuf; struct __queue *pqueue; @@ -645,7 +643,6 @@ void rtl8723bs_free_xmit_priv(struct adapter *padapter) struct list_head tmplist; - phal = GET_HAL_DATA(padapter); pxmitpriv = &padapter->xmitpriv; pqueue = &pxmitpriv->pending_xmitbuf_queue; phead = get_list_head(pqueue); -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: fieldbus: Fix build error without CONFIG_REGMAP_MMIO
Fix gcc build error while CONFIG_REGMAP_MMIO is not set drivers/staging/fieldbus/anybuss/arcx-anybus.o: In function `controller_probe': arcx-anybus.c:(.text+0x9d6): undefined reference to `__devm_regmap_init_mmio_clk' Select REGMAP_MMIO to fix it. Reported-by: Hulk Robot Fixes: 2411a336c8ce ("staging: fieldbus: arcx-anybus: change custom -> mmio regmap") Signed-off-by: YueHaibing --- drivers/staging/fieldbus/anybuss/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/fieldbus/anybuss/Kconfig b/drivers/staging/fieldbus/anybuss/Kconfig index 8bc3d9a..635a0a7 100644 --- a/drivers/staging/fieldbus/anybuss/Kconfig +++ b/drivers/staging/fieldbus/anybuss/Kconfig @@ -14,6 +14,7 @@ if HMS_ANYBUSS_BUS config ARCX_ANYBUS_CONTROLLER tristate "Arcx Anybus-S Controller" depends on OF && GPIOLIB && HAS_IOMEM && REGULATOR + select REGMAP_MMIO help Select this to get support for the Arcx Anybus controller. It connects to the SoC via a parallel memory bus, and -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH -next] staging: fieldbus: Fix build error without CONFIG_REGMAP_MMIO
On 2019/5/28 21:41, Sven Van Asbroeck wrote: > Hello YueHaibing, > > On Tue, May 28, 2019 at 9:33 AM YueHaibing wrote: >> >> Fix gcc build error while CONFIG_REGMAP_MMIO is not set >> >> drivers/staging/fieldbus/anybuss/arcx-anybus.o: In function >> `controller_probe': >> arcx-anybus.c:(.text+0x9d6): undefined reference to >> `__devm_regmap_init_mmio_clk' >> >> Select REGMAP_MMIO to fix it. > > Thank you for noticing this, I appreciate it ! > > However, when I run this patch through the scripts/checkpatch.pl > script, it reports > some issues. Could you fix and post v2 please? > > checkpatch.pl output follows: > > WARNING: Possible unwrapped commit description (prefer a maximum 75 > chars per line) > #68: > arcx-anybus.c:(.text+0x9d6): undefined reference to > `__devm_regmap_init_mmio_clk' > > ERROR: DOS line endings > #87: FILE: drivers/staging/fieldbus/anybuss/Kconfig:17: > +^Iselect REGMAP_MMIO^M$ > > total: 1 errors, 1 warnings, 0 checks, 7 lines checked > > NOTE: For some of the reported defects, checkpatch may be able to > mechanically convert to the typical style using --fix or --fix-inplace. > > Your patch has style problems, please review. Thanks, will fix it in v2. > > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 -next] staging: fieldbus: Fix build error without CONFIG_REGMAP_MMIO
Fix gcc build error while CONFIG_REGMAP_MMIO is not set drivers/staging/fieldbus/anybuss/arcx-anybus.o: In function `controller_probe': arcx-anybus.c: undefined reference to `__devm_regmap_init_mmio_clk' Select REGMAP_MMIO to fix it. Reported-by: Hulk Robot Fixes: 2411a336c8ce ("staging: fieldbus: arcx-anybus: change custom -> mmio regmap") Signed-off-by: YueHaibing --- v2: fix patch style warning --- drivers/staging/fieldbus/anybuss/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/fieldbus/anybuss/Kconfig b/drivers/staging/fieldbus/anybuss/Kconfig index 8bc3d9a..635a0a7 100644 --- a/drivers/staging/fieldbus/anybuss/Kconfig +++ b/drivers/staging/fieldbus/anybuss/Kconfig @@ -14,6 +14,7 @@ if HMS_ANYBUSS_BUS config ARCX_ANYBUS_CONTROLLER tristate "Arcx Anybus-S Controller" depends on OF && GPIOLIB && HAS_IOMEM && REGULATOR + select REGMAP_MMIO help Select this to get support for the Arcx Anybus controller. It connects to the SoC via a parallel memory bus, and -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 -next] staging: fieldbus: Fix build error without CONFIG_REGMAP_MMIO
Sorry, this is broken, Pls igore this. On 2019/5/28 22:29, YueHaibing wrote: > Fix gcc build error while CONFIG_REGMAP_MMIO is not set > > drivers/staging/fieldbus/anybuss/arcx-anybus.o: In function > `controller_probe': > arcx-anybus.c: undefined reference to `__devm_regmap_init_mmio_clk' > > Select REGMAP_MMIO to fix it. > > Reported-by: Hulk Robot > Fixes: 2411a336c8ce ("staging: fieldbus: arcx-anybus: change custom -> mmio > regmap") > Signed-off-by: YueHaibing > --- > v2: fix patch style warning > --- > drivers/staging/fieldbus/anybuss/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/fieldbus/anybuss/Kconfig > b/drivers/staging/fieldbus/anybuss/Kconfig > index 8bc3d9a..635a0a7 100644 > --- a/drivers/staging/fieldbus/anybuss/Kconfig > +++ b/drivers/staging/fieldbus/anybuss/Kconfig > @@ -14,6 +14,7 @@ if HMS_ANYBUSS_BUS > config ARCX_ANYBUS_CONTROLLER > tristate "Arcx Anybus-S Controller" > depends on OF && GPIOLIB && HAS_IOMEM && REGULATOR > + select REGMAP_MMIO > help > Select this to get support for the Arcx Anybus controller. > It connects to the SoC via a parallel memory bus, and > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 -next] staging: fieldbus: Fix build error without CONFIG_REGMAP_MMIO
On 2019/5/28 22:35, Sven Van Asbroeck wrote: > On Tue, May 28, 2019 at 10:31 AM YueHaibing wrote: >> >> Fix gcc build error while CONFIG_REGMAP_MMIO is not set >> > > checkpatch.pl errors remain: > > $ ./scripts/checkpatch.pl < ~/Downloads/YueHaibing.eml > ERROR: DOS line endings > #92: FILE: drivers/staging/fieldbus/anybuss/Kconfig:17: > +^Iselect REGMAP_MMIO^M$ This seems text/plain messages have crlf set when saved as .eml file, I do check my v2 patch is not crlf ending, but when save as eml file in my thunderbird, it becomes crlf ending. > > total: 1 errors, 0 warnings, 0 checks, 7 lines checked > > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] Staging: kpc2000: kpc_dma: Make some symbols static
Fix sparse warnings: drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:46:6: warning: symbol 'kpc_dma_del_device' was not declared. Should it be static? drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:84:1: warning: symbol 'dev_attr_engine_regs' was not declared. Should it be static? drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:91:14: warning: symbol 'kpc_dma_class' was not declared. Should it be static? drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:199:24: warning: symbol 'kpc_dma_plat_driver_i' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c index 9acf1ea..ca76073 100644 --- a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c +++ b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c @@ -43,7 +43,7 @@ static void kpc_dma_add_device(struct kpc_dma_device *ldev) mutex_unlock(&kpc_dma_mtx); } -void kpc_dma_del_device(struct kpc_dma_device *ldev) +static void kpc_dma_del_device(struct kpc_dma_device *ldev) { mutex_lock(&kpc_dma_mtx); list_del(&ldev->list); @@ -81,14 +81,14 @@ static ssize_t show_engine_regs(struct device *dev, struct device_attribute *at ldev->desc_completed ); } -DEVICE_ATTR(engine_regs, 0444, show_engine_regs, NULL); +static DEVICE_ATTR(engine_regs, 0444, show_engine_regs, NULL); static const struct attribute *ndd_attr_list[] = { &dev_attr_engine_regs.attr, NULL, }; -struct class *kpc_dma_class; +static struct class *kpc_dma_class; /** Platform Driver Functions **/ static @@ -196,7 +196,7 @@ int kpc_dma_remove(struct platform_device *pldev) } /** Driver Functions **/ -struct platform_driver kpc_dma_plat_driver_i = { +static struct platform_driver kpc_dma_plat_driver_i = { .probe= kpc_dma_probe, .remove = kpc_dma_remove, .driver = { -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] media: meson: vdec: Add missing kthread.h
Fix building error: drivers/staging/media/meson/vdec/vdec.c: In function vdec_recycle_thread: drivers/staging/media/meson/vdec/vdec.c:59:10: error: implicit declaration of function kthread_should_stop; did you mean thread_saved_sp? [-Werror=implicit-function-declaration] Reported-by: Hulk Robot Fixes: 3e7f51bd9607 ("media: meson: add v4l2 m2m video decoder driver") Signed-off-by: YueHaibing --- drivers/staging/media/meson/vdec/vdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/meson/vdec/vdec.c b/drivers/staging/media/meson/vdec/vdec.c index 4e4f9d6..0a1a04f 100644 --- a/drivers/staging/media/meson/vdec/vdec.c +++ b/drivers/staging/media/meson/vdec/vdec.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: iio: adt7316: Add missing include files
Fix build error: drivers/staging/iio/addac/adt7316.c: In function adt7316_store_update_DAC: drivers/staging/iio/addac/adt7316.c:949:3: error: implicit declaration of function gpiod_set_value; did you mean gpio_set_value? [-Werror=implicit-function-declaration] gpiod_set_value(chip->ldac_pin, 0); drivers/staging/iio/addac/adt7316.c: In function adt7316_setup_irq: drivers/staging/iio/addac/adt7316.c:1807:13: error: implicit declaration of function irqd_get_trigger_type; did you mean devm_iio_trigger_free? [-Werror=implicit-function-declaration] irq_type = irqd_get_trigger_type(irq_get_irq_data(chip->bus.irq)); Reported-by: Hulk Robot Fixes: 7f6b6d553df7 ("Staging: iio: adt7316: Add all irq related code in adt7316_irq_setup()") Fixes: c63460c4298f ("Staging: iio: adt7316: Use device tree data to set ldac_pin") Signed-off-by: YueHaibing --- drivers/staging/iio/addac/adt7316.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c index 37ce563..9d3d159 100644 --- a/drivers/staging/iio/addac/adt7316.c +++ b/drivers/staging/iio/addac/adt7316.c @@ -16,6 +16,8 @@ #include #include #include +#include +#include #include #include -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: iio: adt7316: Add missing include files
On 2019/6/16 21:11, Jonathan Cameron wrote: > On Fri, 14 Jun 2019 23:28:46 +0800 > YueHaibing wrote: > >> Fix build error: >> >> drivers/staging/iio/addac/adt7316.c: In function adt7316_store_update_DAC: >> drivers/staging/iio/addac/adt7316.c:949:3: error: implicit declaration of >> function gpiod_set_value; did you mean gpio_set_value? >> [-Werror=implicit-function-declaration] >>gpiod_set_value(chip->ldac_pin, 0); >> >> drivers/staging/iio/addac/adt7316.c: In function adt7316_setup_irq: >> drivers/staging/iio/addac/adt7316.c:1807:13: error: implicit declaration of >> function irqd_get_trigger_type; did you mean devm_iio_trigger_free? >> [-Werror=implicit-function-declaration] >> irq_type = irqd_get_trigger_type(irq_get_irq_data(chip->bus.irq)); >> >> Reported-by: Hulk Robot >> Fixes: 7f6b6d553df7 ("Staging: iio: adt7316: Add all irq related code in >> adt7316_irq_setup()") >> Fixes: c63460c4298f ("Staging: iio: adt7316: Use device tree data to set >> ldac_pin") >> Signed-off-by: YueHaibing > Hi yuehaibing, > > You were second to send a fix for this. I've had it in my > fixes branch since last week, but not done a pull request quite yet. > I'll probably send it out later today. Sorry, our robot report this again and I forgot this ... > > https://patchwork.kernel.org/patch/10978301/ > > Thanks, > > Jonathan > >> --- >> drivers/staging/iio/addac/adt7316.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/staging/iio/addac/adt7316.c >> b/drivers/staging/iio/addac/adt7316.c >> index 37ce563..9d3d159 100644 >> --- a/drivers/staging/iio/addac/adt7316.c >> +++ b/drivers/staging/iio/addac/adt7316.c >> @@ -16,6 +16,8 @@ >> #include >> #include >> #include >> +#include >> +#include >> >> #include >> #include > > > . > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] Staging: kpc2000: kpc_dma: Fix platform_no_drv_owner.cocci warnings
Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing --- drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c index 08af269adabe..a05ae6d40db9 100644 --- a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c +++ b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c @@ -197,7 +197,6 @@ static struct platform_driver kpc_dma_plat_driver_i = { .remove = kpc_dma_remove, .driver = { .name = KP_DRIVER_NAME_DMA_CONTROLLER, - .owner = THIS_MODULE, }, }; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: ks7010: Fix build error
when CRYPTO is m and KS7010 is y, building fails: drivers/staging/ks7010/ks_hostif.o: In function `michael_mic.constprop.13': ks_hostif.c:(.text+0x560): undefined reference to `crypto_alloc_shash' ks_hostif.c:(.text+0x580): undefined reference to `crypto_shash_setkey' ks_hostif.c:(.text+0x5e0): undefined reference to `crypto_destroy_tfm' ks_hostif.c:(.text+0x614): undefined reference to `crypto_shash_update' ks_hostif.c:(.text+0x62c): undefined reference to `crypto_shash_update' ks_hostif.c:(.text+0x648): undefined reference to `crypto_shash_finup' select CRYPTO and CRYPTO_HASH to fix this. Reported-by: Hulk Robot Fixes: 8b523f20417d ("staging: ks7010: removed custom Michael MIC implementation.") Signed-off-by: YueHaibing --- drivers/staging/ks7010/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/ks7010/Kconfig b/drivers/staging/ks7010/Kconfig index 0987fdc..6a20e64 100644 --- a/drivers/staging/ks7010/Kconfig +++ b/drivers/staging/ks7010/Kconfig @@ -5,6 +5,8 @@ config KS7010 select WIRELESS_EXT select WEXT_PRIV select FW_LOADER + select CRYPTO + select CRYPTO_HASH help This is a driver for KeyStream KS7010 based SDIO WIFI cards. It is found on at least later Spectec SDW-821 (FCC-ID "S2Y-WLAN-11G-K" only, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel