lkml.org 
[lkml]   [2011]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH net-next 2/2] drivers/net: Remove casts of void *
    On Tue, Jun 14, 2011 at 12:02 AM, Joe Perches <joe@perches.com> wrote:

    > diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
    > index 86a9122..c3c5db1 100644
    > --- a/drivers/net/atl1e/atl1e_main.c
    > +++ b/drivers/net/atl1e/atl1e_main.c
    > @@ -800,8 +800,7 @@ static int atl1e_setup_ring_resources(struct atl1e_adapter *adapter)
    >        /* Init TPD Ring */
    >        tx_ring->dma = roundup(adapter->ring_dma, 8);
    >        offset = tx_ring->dma - adapter->ring_dma;
    > -       tx_ring->desc = (struct atl1e_tpd_desc *)
    > -                       (adapter->ring_vir_addr + offset);
    > +       tx_ring->desc = adapter->ring_vir_addr + offset;
    >        size = sizeof(struct atl1e_tx_buffer) * (tx_ring->count);
    >        tx_ring->tx_buffer = kzalloc(size, GFP_KERNEL);
    >        if (tx_ring->tx_buffer == NULL) {
    > @@ -827,7 +826,7 @@ static int atl1e_setup_ring_resources(struct atl1e_adapter *adapter)
    >
    >        /* Init CMB dma address */
    >        tx_ring->cmb_dma = adapter->ring_dma + offset;
    > -       tx_ring->cmb     = (u32 *)(adapter->ring_vir_addr + offset);
    > +       tx_ring->cmb = adapter->ring_vir_addr + offset;
    >        offset += sizeof(u32);
    >
    >        for (i = 0; i < adapter->num_rx_queues; i++) {
    > diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
    > index 16249e9..24e1592 100644
    > --- a/drivers/net/atlx/atl2.c
    > +++ b/drivers/net/atlx/atl2.c
    > @@ -311,8 +311,7 @@ static s32 atl2_setup_ring_resources(struct atl2_adapter *adapter)
    >        adapter->txd_dma = adapter->ring_dma ;
    >        offset = (adapter->txd_dma & 0x7) ? (8 - (adapter->txd_dma & 0x7)) : 0;
    >        adapter->txd_dma += offset;
    > -       adapter->txd_ring = (struct tx_pkt_header *) (adapter->ring_vir_addr +
    > -               offset);
    > +       adapter->txd_ring = adapter->ring_vir_addr + offset;
    >
    >        /* Init TXS Ring */
    >        adapter->txs_dma = adapter->txd_dma + adapter->txd_ring_size;

    atlx looks fine.

    Acked-By: Chris Snook <chris.snook@gmail.com>
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2011-06-14 12:37    [W:0.023 / U:29.804 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site