mt76: mt7915: fix endianness in mt7915_rf_regval_get
authorLorenzo Bianconi <lorenzo@kernel.org>
Tue, 17 May 2022 16:05:59 +0000 (18:05 +0200)
committerFelix Fietkau <nbd@nbd.name>
Mon, 11 Jul 2022 11:40:00 +0000 (13:40 +0200)
Fix the following sparse warning in mt7915_rf_regval_get routine:
drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:979:16: warning: cast to restricted __le32

Fixes: 0a17329ae9c1f ("mt76: mt7915: add debugfs knob for RF registers read/write")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c

index cab6e02e1f8cccda312adaa3d3c9b537eb27c686..d0c719ecacd0cbe0ebb0d7d90578a2296288a4c0 100644 (file)
@@ -976,7 +976,7 @@ mt7915_rf_regval_get(void *data, u64 *val)
        if (ret)
                return ret;
 
-       *val = le32_to_cpu(regval);
+       *val = regval;
 
        return 0;
 }