aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/fsl_ucc_hdlc.c
Commit message (Collapse)AuthorAge
* wan/fsl_ucc_hdlc: Fix size used in dma_free_coherent()Christophe Jaillet2016-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Size used with 'dma_alloc_coherent()' and 'dma_free_coherent()' should be consistent. Here, the size of a pointer is used in dma_alloc... and the size of the pointed structure is used in dma_free... This has been spotted with coccinelle, using the following script: //////////////////// @r@ expression x0, x1, y0, y1, z0, z1, t0, t1, ret; @@ * ret = dma_alloc_coherent(x0, y0, z0, t0); ... * dma_free_coherent(x1, y1, ret, t1); @script:python@ y0 << r.y0; y1 << r.y1; @@ if y1.find(y0) == -1: print "WARNING: sizes look different: '%s' vs '%s'" % (y0, y1) //////////////////// Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
* wan/fsl_ucc_hdlc: fix spelling mistake "prameter" -> "parameter"Colin Ian King2016-08-28
| | | | | | | Trivial fix to spelling mistake in dev_err message. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* wan/fsl_ucc_hdlc: avoid possible NULL pointer dereferencexypron.glpk@gmx.de2016-08-01
| | | | | | | | All assignments to components of priv should only occur after the check if prif is NULL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* wan/fsl_ucc_hdlc: use module_platform_driver to simplify the codeWei Yongjun2016-07-20
| | | | | | | | module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
* wan/fsl_ucc_hdlc: remove .owner field for driverWei Yongjun2016-07-20
| | | | | | | | | Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
* wan/fsl_ucc_hdlc: rewrite error handling to make it clearerZhao Qiang2016-07-16
| | | | | | | | | It was used err_xxx for labeled statement, it is not easy to understand, now use free_xxx for labeled statement. Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* wan/fsl_ucc_hdlc: remove reduplicative freed memory 'uhdlc_priv'Zhao Qiang2016-07-16
| | | | | | | 'uhdlc_priv' has freed twice, drop the first one. Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* wan/fsl_ucc_hdlc: info leak in uhdlc_ioctl()Dan Carpenter2016-07-15
| | | | | | | | | There is a 2 byte struct whole after line.loopback so we need to clear that out to avoid disclosing stack information. Fixes: c19b6d246a35 ('drivers/net: support hdlc function for QE-UCC') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net: support hdlc function for QE-UCCZhao Qiang2016-06-07
The driver add hdlc support for Freescale QUICC Engine. It support NMSI and TSA mode. Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>