@@ -457,21 +457,19 @@ static int davinci_emac_send(struct eth_device *edev, void *packet, int length)
457457/*
458458 * This function handles receipt of a packet from the network
459459 */
460- static int davinci_emac_recv (struct eth_device * edev )
460+ static void davinci_emac_recv (struct eth_device * edev )
461461{
462462 struct davinci_emac_priv * priv = edev -> priv ;
463463 void __iomem * rx_curr_desc , * curr_desc , * tail_desc ;
464464 unsigned char * pkt ;
465- int status , len , ret = -1 ;
465+ int status , len ;
466466
467467 dev_dbg (priv -> dev , "+ emac_recv\n" );
468468
469469 rx_curr_desc = priv -> emac_rx_active_head ;
470470 status = readl (rx_curr_desc + EMAC_DESC_PKT_FLAG_LEN );
471- if (status & EMAC_CPPI_OWNERSHIP_BIT ) {
472- ret = 0 ;
471+ if (status & EMAC_CPPI_OWNERSHIP_BIT )
473472 goto out ;
474- }
475473
476474 if (status & EMAC_CPPI_RX_ERROR_FRAME ) {
477475 /* Error in packet - discard it and requeue desc */
@@ -483,7 +481,6 @@ static int davinci_emac_recv(struct eth_device *edev)
483481 dma_sync_single_for_cpu (priv -> dev , (unsigned long )pkt , len , DMA_FROM_DEVICE );
484482 net_receive (edev , pkt , len );
485483 dma_sync_single_for_device (priv -> dev , (unsigned long )pkt , len , DMA_FROM_DEVICE );
486- ret = len ;
487484 }
488485
489486 /* Ack received packet descriptor */
@@ -529,8 +526,6 @@ static int davinci_emac_recv(struct eth_device *edev)
529526
530527out :
531528 dev_dbg (priv -> dev , "- emac_recv\n" );
532-
533- return ret ;
534529}
535530
536531static int davinci_emac_probe (struct device * dev )
0 commit comments