Skip to content

Commit bf19edd

Browse files
committed
Revert "powerpc/powernv: Fix endian bug in LPC bus debugfs accessors"
This reverts commit bf7588a. Ben says although the code is not correct "[this] fix was completely wrong and does more damages than it fixes things." Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 19d36c2 commit bf19edd

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎arch/powerpc/platforms/powernv/opal-lpc.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ static ssize_t lpc_debug_read(struct file *filp, char __user *ubuf,
191191
{
192192
struct lpc_debugfs_entry *lpc = filp->private_data;
193193
u32 data, pos, len, todo;
194-
__be32 bedata;
195194
int rc;
196195

197196
if (!access_ok(VERIFY_WRITE, ubuf, count))
@@ -214,10 +213,9 @@ static ssize_t lpc_debug_read(struct file *filp, char __user *ubuf,
214213
len = 2;
215214
}
216215
rc = opal_lpc_read(opal_lpc_chip_id, lpc->lpc_type, pos,
217-
&bedata, len);
216+
&data, len);
218217
if (rc)
219218
return -ENXIO;
220-
data = be32_to_cpu(bedata);
221219
switch(len) {
222220
case 4:
223221
rc = __put_user((u32)data, (u32 __user *)ubuf);

0 commit comments

Comments
 (0)