Commit ef0657c4 authored by Julia Lawall's avatar Julia Lawall Committed by David S. Miller
Browse files

drivers/net/cs89x0.c: Avoid using magic number in set_dma_mode

The constant DMA_RX_MODE is defined to be 0x14 in the local include file
cs89x0.h.  Since a constant with the same name is used elsewhere with
set_dma_mode, it seems likely that this constant could be used here.

The semantic match that finds this problem is as follows:


// <smpl>
@@ expression E1; identifier I; constant int C; @@
// </smpl>
Signed-off-by: default avatarJulia Lawall <>
Signed-off-by: default avatarDavid S. Miller <>
parent 5dcc60b7
......@@ -1367,7 +1367,7 @@ net_open(struct net_device *dev)
spin_lock_irqsave(&lp->lock, flags);
set_dma_mode(dev->dma, 0x14); /* auto_init as well */
set_dma_mode(dev->dma, DMA_RX_MODE); /* auto_init as well */
set_dma_addr(dev->dma, isa_virt_to_bus(lp->dma_buff));
set_dma_count(dev->dma, lp->dmasize*1024);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment