| Date | Sat, 5 Dec 2009 11:59:36 +1100 | | From | Stephen Rothwell <> | | Subject | Re: [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] |