lkml.org 
[lkml]   [2008]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH]: PCI: GART iommu alignment fixes [v2]
Date
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...

Jesse


\
 
 \ /
  Last update: 2008-08-08 18:19    [W:0.083 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site