]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging: wfx: fix use of cpu_to_le32 instead of le32_to_cpu
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Tue, 12 May 2020 15:03:58 +0000 (17:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 May 2020 11:49:42 +0000 (13:49 +0200)
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>
Link: https://lore.kernel.org/r/20200512150414.267198-2-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/hwio.c

index d878cb3e84fcd24f0644a0fd50a5229e82c8c442..777217cdf9a7a34d47b26ea0c8d1cfd949e25ebb 100644 (file)
@@ -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);