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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to