]> git.baikalelectronics.ru Git - kernel.git/commit
Altera TSE: Fix DMA secriptor length initialization
authorTobias Klauser <tobias.klauser@gmail.com>
Mon, 28 Apr 2014 21:23:01 +0000 (23:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Apr 2014 20:12:21 +0000 (16:12 -0400)
commit0d848fc38850ce051eb5df347210e978d77e0771
treef0208c5a1c25ad413c60ae2d1631bb255664cf0e
parent4074490733703fe128203e7c4d07ed03a732ce7c
Altera TSE: Fix DMA secriptor length initialization

sgdma_descrip is a function name as well as the name of a struct. In
sgdma_initialize(), we should initialize the descriptor length field
with the actual length of a descriptor not with the size of the
function. In order to prevent such things from happening in the future,
rename the function to sgdma_setup_descrip().

Found by sparse which yields the following warning:

drivers/net/ethernet/altera/altera_sgdma.c:74:30: warning: expression using sizeof on a function

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/altera/altera_sgdma.c