lkml.org 
[lkml]   [2016]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 05/14] GPU-DRM-OMAP: Improve a size determination in dmm_txn_append()
    From
    Date
    From: Markus Elfring <elfring@users.sourceforge.net>
    Date: Wed, 21 Sep 2016 13:53:11 +0200

    Replace the specification of a data structure by a pointer dereference
    as the parameter for the operator "sizeof" to make the corresponding size
    determination a bit safer according to the Linux coding style convention.

    Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
    ---
    drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
    index c262ef5..f110965 100644
    --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
    +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
    @@ -224,7 +224,7 @@ static void dmm_txn_append(struct dmm_txn *txn, struct pat_area *area,
    int rows = (1 + area->y1 - area->y0);
    int i = columns*rows;

    - pat = alloc_dma(txn, sizeof(struct pat), &pat_pa);
    + pat = alloc_dma(txn, sizeof(*pat), &pat_pa);

    if (txn->last_pat)
    txn->last_pat->next_pa = (uint32_t)pat_pa;
    --
    2.10.0
    \
     
     \ /
      Last update: 2016-09-22 23:59    [W:7.208 / U:0.704 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site