lkml.org 
[lkml]   [2020]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 01/17] staging: wfx: fix use of cpu_to_le32 instead of le32_to_cpu
    Date
    From: Jérôme Pouiller <jerome.pouiller@silabs.com>

    Sparse detected that le32_to_cpu should be used instead of cpu_to_le32.

    Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
    ---
    drivers/staging/wfx/hwio.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/staging/wfx/hwio.c b/drivers/staging/wfx/hwio.c
    index d878cb3e84fc..777217cdf9a7 100644
    --- a/drivers/staging/wfx/hwio.c
    +++ b/drivers/staging/wfx/hwio.c
    @@ -205,7 +205,7 @@ static int indirect_read32_locked(struct wfx_dev *wdev, int reg,
    return -ENOMEM;
    wdev->hwbus_ops->lock(wdev->hwbus_priv);
    ret = indirect_read(wdev, reg, addr, tmp, sizeof(u32));
    - *val = cpu_to_le32(*tmp);
    + *val = le32_to_cpu(*tmp);
    _trace_io_ind_read32(reg, addr, *val);
    wdev->hwbus_ops->unlock(wdev->hwbus_priv);
    kfree(tmp);
    --
    2.26.2
    \
     
     \ /
      Last update: 2020-05-11 17:51    [W:3.881 / U:0.144 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site