[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 9 Aug 2008 06:13:36 +0900
From: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To: jbarnes@...tuousgeek.org
Cc: prarit@...hat.com, muli@...ibm.com, fujita.tomonori@....ntt.co.jp,
joro@...tes.org, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org, jakub@...hat.com
Subject: Re: [PATCH]: PCI: GART iommu alignment fixes [v2]
On Fri, 8 Aug 2008 09:15:51 -0700
Jesse Barnes <jbarnes@...tuousgeek.org> wrote:
> On Friday, August 8, 2008 8:18 am Prarit Bhargava wrote:
> > --- a/include/linux/dma-mapping.h
> > +++ b/include/linux/dma-mapping.h
> > @@ -78,7 +78,7 @@ static inline unsigned int dma_set_max_seg_size(struct
> > device
> > static inline unsigned long dma_get_seg_boundary(struct device *dev)
> > {
> > return dev->dma_parms ?
> > - dev->dma_parms->segment_boundary_mask : 0xffffffff;
> > + dev->dma_parms->segment_boundary_mask : 0xffffffffUL;
> > }
>
> Yeah generally you need to cast values like this when working with real
> unsigned long values rather than ints, but this *should* still be safe
> (barring a compiler bug). The return type is unsigned long, so even if you
> just return 0xffffffff the right thing should still happen...
I told Prarid that the overflow should not happen here again and
again...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists