From 9d9bb819d56d89bc7bc3223145699b92eadbb204 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Pouiller?= Date: Tue, 12 May 2020 17:03:58 +0200 Subject: [PATCH] staging: wfx: fix use of cpu_to_le32 instead of le32_to_cpu MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Sparse detected that le32_to_cpu should be used instead of cpu_to_le32. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200512150414.267198-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman --- 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 d878cb3e84fcd..777217cdf9a7a 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.30.2