diff options
author | iap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk> | 2005-02-08 15:43:01 +0000 |
---|---|---|
committer | iap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk> | 2005-02-08 15:43:01 +0000 |
commit | 055935cf6d7925378728bea9a68aa4e58807db4d (patch) | |
tree | 63cc5b41b6296d7a394137625ef1d8aa62a5f463 /xen/drivers/pci | |
parent | 02f82c278807571fd2a6a88e7921f5f11f8975d3 (diff) | |
download | xen-055935cf6d7925378728bea9a68aa4e58807db4d.tar.gz xen-055935cf6d7925378728bea9a68aa4e58807db4d.tar.bz2 xen-055935cf6d7925378728bea9a68aa4e58807db4d.zip |
bitkeeper revision 1.1159.223.80 (4208de05Xtv_u_3smJSRU6ex6bTAfA)
Some functions aren't static and could be (damn C language!).
I tried turning on -Wmissing-prototypes: unfortunately gives warnings
for functions used in asm, which means introducing gratuitous prototypes
for them. Not sure it's worth it.
1) keyhandler.c: keypress_softirq() and do_task_queues() can be static.
2) physdev.c: pcidev_dom0_hidden() can be static.
3) resource.c/resource.h: check_region is deprecated (racy): remove.
4) sched_bvt.c: lots of things can be static.
5) pci/compat.c: not required for Xen.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (authored)
Signed-off-by: ian.pratt@cl.cam.ac.uk
Diffstat (limited to 'xen/drivers/pci')
-rw-r--r-- | xen/drivers/pci/Makefile | 2 | ||||
-rw-r--r-- | xen/drivers/pci/compat.c | 65 |
2 files changed, 1 insertions, 66 deletions
diff --git a/xen/drivers/pci/Makefile b/xen/drivers/pci/Makefile index 040d5aaccd..f2580105df 100644 --- a/xen/drivers/pci/Makefile +++ b/xen/drivers/pci/Makefile @@ -4,7 +4,7 @@ include $(BASEDIR)/Rules.mk -OBJS := pci.o quirks.o compat.o names.o setup-res.o +OBJS := pci.o quirks.o names.o setup-res.o #obj-$(CONFIG_PCI) += pci.o quirks.o compat.o names.o #obj-$(CONFIG_PROC_FS) += proc.o diff --git a/xen/drivers/pci/compat.c b/xen/drivers/pci/compat.c index 61e14b0a84..e69de29bb2 100644 --- a/xen/drivers/pci/compat.c +++ b/xen/drivers/pci/compat.c @@ -1,65 +0,0 @@ -/* - * $Id: compat.c,v 1.1 1998/02/16 10:35:50 mj Exp $ - * - * PCI Bus Services -- Function For Backward Compatibility - * - * Copyright 1998--2000 Martin Mares <mj@ucw.cz> - */ - -#include <xen/types.h> -//#include <xen/kernel.h> -#include <xen/pci.h> - -int -pcibios_present(void) -{ - return !list_empty(&pci_devices); -} - -int -pcibios_find_class(unsigned int class, unsigned short index, unsigned char *bus, unsigned char *devfn) -{ - const struct pci_dev *dev = NULL; - int cnt = 0; - - while ((dev = pci_find_class(class, dev))) - if (index == cnt++) { - *bus = dev->bus->number; - *devfn = dev->devfn; - return PCIBIOS_SUCCESSFUL; - } - return PCIBIOS_DEVICE_NOT_FOUND; -} - - -int -pcibios_find_device(unsigned short vendor, unsigned short device, unsigned short index, - unsigned char *bus, unsigned char *devfn) -{ - const struct pci_dev *dev = NULL; - int cnt = 0; - - while ((dev = pci_find_device(vendor, device, dev))) - if (index == cnt++) { - *bus = dev->bus->number; - *devfn = dev->devfn; - return PCIBIOS_SUCCESSFUL; - } - return PCIBIOS_DEVICE_NOT_FOUND; -} - -#define PCI_OP(rw,size,type) \ -int pcibios_##rw##_config_##size (unsigned char bus, unsigned char dev_fn, \ - unsigned char where, unsigned type val) \ -{ \ - struct pci_dev *dev = pci_find_slot(bus, dev_fn); \ - if (!dev) return PCIBIOS_DEVICE_NOT_FOUND; \ - return pci_##rw##_config_##size(dev, where, val); \ -} - -PCI_OP(read, byte, char *) -PCI_OP(read, word, short *) -PCI_OP(read, dword, int *) -PCI_OP(write, byte, char) -PCI_OP(write, word, short) -PCI_OP(write, dword, int) |