Re: [PATCH] export PCI resources in sysfs

From: Greg KH
Date: Tue Dec 21 2004 - 15:20:58 EST


On Tue, Dec 21, 2004 at 11:56:39AM -0800, Jesse Barnes wrote:
> On Tuesday, December 21, 2004 11:09 am, Jesse Barnes wrote:
> > > How about wrapping these two #ifdef blocks into one function, and moving
> > > it up in the file under the other #ifdef. Do that for the other cleanup
> > > function, and it will drop a bunch of #ifdefs.
> >
> > Yeah, that sounds good. I really don't like adding these ifdefs, and
> > limiting their scope to a function somewhere up above would be nicer. I'll
> > do that and respin.
>
> Ok, here you go.
>
> This patch exports PCI resources to userspace in the corresponding sysfs
> device directory. It depends on the platform HAVE_PCI_MMAP code, and is
> #ifdef'd accordingly. I've also added documentation describing the sysfs PCI
> device file layout.
>
> Signed-off-by: Jesse Barnes <jbarnes@xxxxxxx>

Looks good, I made one tiny change:

> +#else /* !HAVE_PCI_MMAP */
> +static void pci_create_resource_files(struct pci_dev *dev) { return; }
> +static void pci_remove_resource_files(struct pci_dev *dev) { return; }
> +#endif /* HAVE_PCI_MMAP */

I made these inline to have the compiler just "make them go away" for
when that define isn't enabled.

Applied to my trees,

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/