lkml.org 
[lkml]   [2009]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/31] Constify struct dma_map_ops for 2.6.32 v1
Hi Emese,

On Fri, 04 Dec 2009 23:14:08 +0100 Emese Revfy <re.emese@gmail.com> wrote:
>
> --- a/arch/powerpc/kernel/vio.c
> +++ b/arch/powerpc/kernel/vio.c
> @@ -601,6 +601,7 @@ static void vio_dma_iommu_unmap_sg(struct device *dev,
> vio_cmo_dealloc(viodev, alloc_size);
> }
>
> +/* cannot be const */
> struct dma_map_ops vio_dma_mapping_ops = {

The problem with leaving this not const is that a pointer to it is later
assigned to an archdata::dma_ops which you have made into a const pointer
earlier in this patch. This will generate a warning which is fatal in
arch/powerpc as we compile that directory with -Werror.

--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2009-12-05 02:01    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog