[PATCH] powerpc: Dont require a dma_ops struct to set dma mask

Stephen Rothwell sfr at canb.auug.org.au
Tue Aug 3 16:17:43 EST 2010


Hi Kumar,

On Mon,  2 Aug 2010 12:21:22 -0500 Kumar Gala <galak at kernel.crashing.org> wrote:
>
> --- a/arch/powerpc/include/asm/dma-mapping.h
> +++ b/arch/powerpc/include/asm/dma-mapping.h
> @@ -131,9 +131,7 @@ static inline int dma_set_mask(struct device *dev, u64 dma_mask)
>  {
>  	struct dma_map_ops *dma_ops = get_dma_ops(dev);
>  
> -	if (unlikely(dma_ops == NULL))
> -		return -EIO;
> -	if (dma_ops->set_dma_mask != NULL)
> +	if (unlikely(dma_ops == NULL) && (dma_ops->set_dma_mask != NULL))

The first part of this condition is backward (should be != (or just
"dma_ops") (and "likely"?)).

-- 
Stephen Rothwell <sfr at canb.auug.org.au>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20100803/1a8b678d/attachment.pgp>


More information about the Linuxppc-dev mailing list