lkml.org 
[lkml]   [2014]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 21/22] synclink_gt: Use pci_zalloc_consistent
    Date
    Remove the now unnecessary memset too.

    Signed-off-by: Joe Perches <joe@perches.com>
    ---
    drivers/tty/synclink_gt.c | 5 ++---
    1 file changed, 2 insertions(+), 3 deletions(-)

    diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c
    index c359a91..07ea71c 100644
    --- a/drivers/tty/synclink_gt.c
    +++ b/drivers/tty/synclink_gt.c
    @@ -3387,12 +3387,11 @@ static int alloc_desc(struct slgt_info *info)
    unsigned int pbufs;

    /* allocate memory to hold descriptor lists */
    - info->bufs = pci_alloc_consistent(info->pdev, DESC_LIST_SIZE, &info->bufs_dma_addr);
    + info->bufs = pci_zalloc_consistent(info->pdev, DESC_LIST_SIZE,
    + &info->bufs_dma_addr);
    if (info->bufs == NULL)
    return -ENOMEM;

    - memset(info->bufs, 0, DESC_LIST_SIZE);
    -
    info->rbufs = (struct slgt_desc*)info->bufs;
    info->tbufs = ((struct slgt_desc*)info->bufs) + info->rbuf_count;

    --
    1.8.1.2.459.gbcd45b4.dirty


    \
     
     \ /
      Last update: 2014-06-23 16:41    [W:3.561 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site