Subject: Re: [PATCH 2/5] [POWERPC] cpm_uart: OF-related fix for arch/powerpc

From: Vitaly Bordug <[email-masked]>
Date: Mon, 22 Jan 2007 16:55:43 +0300

On Mon, 22 Jan 2007 21:02:11 +1100
Paul Mackerras wrote:

> Vitaly Bordug writes:
> 
> >  		mem_addr = (u8 *)
> > cpm_dpram_addr(cpm_dpalloc(memsz, 8)); +#ifdef  CONFIG_PPC_MERGE
> > +		dma_addr = (u32)cpm_dpram_phys(mem_addr);
> > +#else
> >  		dma_addr = (u32)mem_addr;
> > +#endif
> 
> Please define a cpm_dpram_phys() function in include/asm-ppc/fs_pd.h
> rather than having ifdefs in code.  And please also try to avoid
> unnecessary casts.
> 
> Actually, I notice that cpm_dpram_phys doesn't currently appear
> anywhere in the kernel tree, and your patch sequence doesn't create
> it.  So how come this change won't cause a compile error?
> 

Well, CONFIG_PPC_MERGE && CPM1 is always false as of now  - it will play with 8xx series that are forthcoming. So that it 
won't lead to a hardly-detected confusion, I did it here, though now I think  better option will be to move this particular hunk to 8xx series.

--
Thanks, Vitaly