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 02/17] staging: wfx: take advantage of le32_to_cpup()
    Date
    From: Jérôme Pouiller <jerome.pouiller@silabs.com>

    le32_to_cpu(*x) can be advantageously converted in le32_to_cpup(x).

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

    diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c
    index ac4ec4f30496..83c3fdbb10fa 100644
    --- a/drivers/staging/wfx/hif_rx.c
    +++ b/drivers/staging/wfx/hif_rx.c
    @@ -22,7 +22,7 @@ static int hif_generic_confirm(struct wfx_dev *wdev,
    const struct hif_msg *hif, const void *buf)
    {
    // All confirm messages start with status
    - int status = le32_to_cpu(*((__le32 *) buf));
    + int status = le32_to_cpup((__le32 *)buf);
    int cmd = hif->id;
    int len = hif->len - 4; // drop header

    --
    2.26.2
    \
     
     \ /
      Last update: 2020-05-11 17:51    [W:3.245 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site