net: stmmac: use correct pointer when printing normal descriptor ring
Subsystems (4)
PATCH 1/1 net: stmmac: use correct pointer when printing normal descriptor ring
From: Niklas Cassel <[email protected]>
Signed-off-by Niklas Cassel <[email protected]>
--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1 -1
@@ -3725,7 +3725,7 @@ static void sysfs_display_ring(void *head, int size, int extend_desc, ep++; }else {seq_printf (seq,"%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n" , - i, (unsigned int )virt_to_phys (ep), + i, (unsigned int )virt_to_phys (p),le32_to_cpu (p->des0),le32_to_cpu (p->des1),le32_to_cpu (p->des2),le32_to_cpu (p->des3)); p++;
Signature · 1 line
2.11.0
Quoted 1 line · Niklas Cassel
From: Niklas Cassel <[email protected]>
Commit message?
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c static void sysfs_display_ring(void *head, int size, int extend_desc, · line 3728
Quoted 3 lines
seq_printf(seq, "%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n",drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1
-1- i, (unsigned int)virt_to_phys(ep), + i, (unsigned int)virt_to_phys(p),
There is should not be casting. Pointer might be 64-bit, thus %pap must be used instead with a reference to the physical address.
Quoted 3 lines
le32_to_cpu(p->des0), le32_to_cpu(p->des1),
le32_to_cpu(p->des2), le32_to_cpu(p->des3));
p++;Signature · 2 lines
With Best Regards, Andy Shevchenko