lkml.org 
[lkml]   [2001]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] pci_dma_set_mask()
Zach Brown wrote:
> +int
> +pci_set_dma_mask(struct pci_dev *dev, dma_addr_t mask)
> +{
> + if(! pci_dma_supported(dev, mask))
> + return 0;
> +
> + dev->dma_mask = mask;
> +
> + return 1;
> +}

pci_dma_supported has a boolean return, but the kernel norm is to return
zero on success, and -EFOO on error. I like your proposal with the
extremely minor nit that I think pci_set_dma_mask should return ENODEV
or EIO or something on error, and zero on success.

Jeff



--
Jeff Garzik | "You see, in this world there's two kinds of
Building 1024 | people, my friend: Those with loaded guns
MandrakeSoft | and those who dig. You dig." --Blondie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.284 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site