[PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()

Kevin Hao haokexin at gmail.com
Tue Sep 22 12:25:09 AEST 2015


On Mon, Sep 21, 2015 at 09:16:59PM -0500, Scott Wood wrote:
> On Mon, 2015-09-21 at 17:22 +0800, Kevin Hao wrote:
> > With the reimplementation of probe_kernel_address() in commit
> > ecc83243e1d4 ("uaccess: reimplement probe_kernel_address() using
> > probe_kernel_read()"), the explication of the cast for the addr
> > parameter has been dropped. So we have to explicitly cast the
> > regs->nip to void * when passing it to probe_kernel_address() in
> > order to fix the following build error:
> >   arch/powerpc/sysdev/fsl_pci.c: In function 'fsl_pci_mcheck_exception':
> >   arch/powerpc/sysdev/fsl_pci.c:1002:4: error: passing argument 2 of 
> > 'probe_kernel_read' makes pointer from integer without a cast [-Werror]
> >       ret = probe_kernel_address(regs->nip, inst);
> >       ^
> > 
> > Signed-off-by: Kevin Hao <haokexin at gmail.com>
> > ---
> > 
> > This is against linux-next.
> 
> I don't see ecc83243e1d4 in linux-next.  What tree is it in?

It's a patch from Andrew Morton. But it seems that the patches commit id
from Andrew's tree are not constant. Anyway I just fetched the latest
linux-next tree and found this issue was already fixed by commit 3a5f4236fec1
("uaccess-reimplement-probe_kernel_address-using-probe_kernel_read-fix-fix").

Thanks,
Kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20150922/824186e4/attachment.sig>


More information about the Linuxppc-dev mailing list