lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20091205122015.c898e234.sfr@canb.auug.org.au>
Date:	Sat, 5 Dec 2009 12:20:15 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Emese Revfy <re.emese@...il.com>
Cc:	tony.luck@...el.com, geoffrey.levand@...sony.com,
	davem@...emloft.net, tglx@...utronix.de, joerg.roedel@....com,
	muli@...ibm.com, jdmason@...zu.us, jbarnes@...tuousgeek.org,
	dwmw2@...radead.org, torvalds@...ux-foundation.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/31] Constify struct dma_map_ops for 2.6.32 v1

Hi Emese,

On Sat, 5 Dec 2009 11:59:36 +1100 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>
> On Fri, 04 Dec 2009 23:14:08 +0100 Emese Revfy <re.emese@...il.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.

Actually with a little more work, it can be made const.  The only
assignment to it can be put in the initialiser instead ... As an aside,
it should also be made static.

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au
http://www.canb.auug.org.au/~sfr/

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ