Re: [PATCH net-next] net: stmmac: use correct pointer when printing normal descriptor ring

From: Andy Shevchenko
Date: Sat May 27 2017 - 17:59:46 EST


On Tue, May 9, 2017 at 7:52 PM, Niklas Cassel <niklas.cassel@xxxxxxxx> wrote:
> From: Niklas Cassel <niklas.cassel@xxxxxxxx>

Commit message?

> 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),

There is should not be casting. Pointer might be 64-bit, thus %pap
must be used instead with a reference to the physical address.

> le32_to_cpu(p->des0), le32_to_cpu(p->des1),
> le32_to_cpu(p->des2), le32_to_cpu(p->des3));
> p++;

--
With Best Regards,
Andy Shevchenko