drivers:net: Remove dma_alloc_coherent OOM messages
I believe these error messages are already logged on allocation failure by warn_alloc_failed and so get a dump_stack on OOM. Remove the unnecessary additional error logging. Around these deletions: o Alignment neatening. o Remove unnecessary casts of dma_alloc_coherent. o Hoist assigns from ifs. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
68c45a2da3
commit
d0320f7500
@@ -389,7 +389,8 @@ static int bfin_sir_startup(struct bfin_sir_port *port, struct net_device *dev)
|
||||
set_dma_callback(port->rx_dma_channel, bfin_sir_dma_rx_int, dev);
|
||||
set_dma_callback(port->tx_dma_channel, bfin_sir_dma_tx_int, dev);
|
||||
|
||||
port->rx_dma_buf.buf = (unsigned char *)dma_alloc_coherent(NULL, PAGE_SIZE, &dma_handle, GFP_DMA);
|
||||
port->rx_dma_buf.buf = dma_alloc_coherent(NULL, PAGE_SIZE,
|
||||
&dma_handle, GFP_DMA);
|
||||
port->rx_dma_buf.head = 0;
|
||||
port->rx_dma_buf.tail = 0;
|
||||
port->rx_dma_nrows = 0;
|
||||
|
@@ -564,20 +564,14 @@ static int smsc_ircc_open(unsigned int fir_base, unsigned int sir_base, u8 dma,
|
||||
self->rx_buff.head =
|
||||
dma_alloc_coherent(NULL, self->rx_buff.truesize,
|
||||
&self->rx_buff_dma, GFP_KERNEL);
|
||||
if (self->rx_buff.head == NULL) {
|
||||
IRDA_ERROR("%s, Can't allocate memory for receive buffer!\n",
|
||||
driver_name);
|
||||
if (self->rx_buff.head == NULL)
|
||||
goto err_out2;
|
||||
}
|
||||
|
||||
self->tx_buff.head =
|
||||
dma_alloc_coherent(NULL, self->tx_buff.truesize,
|
||||
&self->tx_buff_dma, GFP_KERNEL);
|
||||
if (self->tx_buff.head == NULL) {
|
||||
IRDA_ERROR("%s, Can't allocate memory for transmit buffer!\n",
|
||||
driver_name);
|
||||
if (self->tx_buff.head == NULL)
|
||||
goto err_out3;
|
||||
}
|
||||
|
||||
memset(self->rx_buff.head, 0, self->rx_buff.truesize);
|
||||
memset(self->tx_buff.head, 0, self->tx_buff.truesize);
|
||||
|
Reference in New Issue
Block a user