Re: [PATCH 01/10] cpm2: Infrastructure code cleanup.

2007-09-08 Thread Arnd Bergmann
On Wednesday 05 September 2007, Scott Wood wrote:
> 
>  void *cpm_dpram_addr(unsigned long offset)
>  {
> -   return (void *)(im_dprambase + offset);
> +   return (void __force *)(im_dprambase + offset);
>  }
>  EXPORT_SYMBOL(cpm_dpram_addr);

This does not look like a legitimate use of __force. I think it's better
to leave the warning in place for cases like this, so that someone else
can clean up the remaining users of this.

In this particular case, it seems that the function should either
be removed or changed to return an __iomem pointer so you get the
warning in the mac-fcc driver using it.

The rest of your patch looks great.

Arnd <><
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 01/10] cpm2: Infrastructure code cleanup.

2007-09-08 Thread Scott Wood
On Sat, Sep 08, 2007 at 04:48:53PM +0200, Arnd Bergmann wrote:
> On Wednesday 05 September 2007, Scott Wood wrote:
> > 
> >  void *cpm_dpram_addr(unsigned long offset)
> >  {
> > -   return (void *)(im_dprambase + offset);
> > +   return (void __force *)(im_dprambase + offset);
> >  }
> >  EXPORT_SYMBOL(cpm_dpram_addr);
> 
> This does not look like a legitimate use of __force. I think it's better
> to leave the warning in place for cases like this, so that someone else
> can clean up the remaining users of this.
> 
> In this particular case, it seems that the function should either
> be removed or changed to return an __iomem pointer so you get the
> warning in the mac-fcc driver using it.

Yeah, there's a fair amount of crud in the CPM API...

I wanted to avoid changing it until arch/ppc is gone (or at least until
CPM platforms are officially no longer supported in it) so I don't have
to worry about breaking it.  I'm OK with leaving the warning there as a
reminder.

-Scott
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev