Messages in this thread | | | Date | Wed, 28 Feb 2001 11:26:10 -0500 | From | Jeff Garzik <> | Subject | Re: [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/
| |