diff options
author | archie <archie@FreeBSD.org> | 1998-12-07 21:58:50 +0000 |
---|---|---|
committer | archie <archie@FreeBSD.org> | 1998-12-07 21:58:50 +0000 |
commit | 60d13c7a9dd18f720483338ebef03609492ca98c (patch) | |
tree | 5709d8cdab99e3c1cb9ae7c2117627c1031fdf39 /sys/pci | |
parent | 2f8d013d96c256b3a48e227aab238e53eb9304cf (diff) | |
download | FreeBSD-src-60d13c7a9dd18f720483338ebef03609492ca98c.zip FreeBSD-src-60d13c7a9dd18f720483338ebef03609492ca98c.tar.gz |
The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/adv_pci.c | 13 | ||||
-rw-r--r-- | sys/pci/adw_pci.c | 4 | ||||
-rw-r--r-- | sys/pci/ahc_pci.c | 3 | ||||
-rw-r--r-- | sys/pci/brooktree848.c | 9 | ||||
-rw-r--r-- | sys/pci/dpt_pci.c | 7 | ||||
-rw-r--r-- | sys/pci/if_mx.c | 6 | ||||
-rw-r--r-- | sys/pci/if_pn.c | 6 | ||||
-rw-r--r-- | sys/pci/if_rl.c | 6 | ||||
-rw-r--r-- | sys/pci/if_tl.c | 8 | ||||
-rw-r--r-- | sys/pci/if_tx.c | 5 | ||||
-rw-r--r-- | sys/pci/if_vr.c | 6 | ||||
-rw-r--r-- | sys/pci/if_xl.c | 8 | ||||
-rw-r--r-- | sys/pci/ncr.c | 11 | ||||
-rw-r--r-- | sys/pci/pci_compat.c | 12 | ||||
-rw-r--r-- | sys/pci/pcisupport.c | 4 |
15 files changed, 54 insertions, 54 deletions
diff --git a/sys/pci/adv_pci.c b/sys/pci/adv_pci.c index 2f9e4e1..593b305 100644 --- a/sys/pci/adv_pci.c +++ b/sys/pci/adv_pci.c @@ -47,7 +47,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: adv_pci.c,v 1.1 1998/09/15 07:03:43 gibbs Exp $ */ #include <pci.h> @@ -122,7 +122,6 @@ static void advpciattach(pcici_t config_id, int unit) { u_int16_t io_port; - u_int16_t config_msw; struct adv_softc *adv; u_int32_t id; u_int32_t command; @@ -252,9 +251,13 @@ advpciattach(pcici_t config_id, int unit) adv->max_dma_addr = ADV_PCI_MAX_DMA_ADDR; #if CC_DISABLE_PCI_PARITY_INT - config_msw = ADV_INW(adv, ADV_CONFIG_MSW); - config_msw &= 0xFFC0; - ADV_OUTW(adv, ADV_CONFIG_MSW, config_msw); + { + u_int16_t config_msw; + + config_msw = ADV_INW(adv, ADV_CONFIG_MSW); + config_msw &= 0xFFC0; + ADV_OUTW(adv, ADV_CONFIG_MSW, config_msw); + } #endif if (id == PCI_DEVICE_ID_ADVANSYS_1200A diff --git a/sys/pci/adw_pci.c b/sys/pci/adw_pci.c index 2109b91..eb941bf 100644 --- a/sys/pci/adw_pci.c +++ b/sys/pci/adw_pci.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: adw_pci.c,v 1.1 1998/10/07 03:20:49 gibbs Exp $ */ #include <pci.h> @@ -89,7 +89,9 @@ adwpciattach(pcici_t config_id, int unit) u_int32_t id; u_int32_t command; vm_offset_t vaddr; +#ifdef ADW_ALLOW_MEMIO vm_offset_t paddr; +#endif u_int16_t io_port; bus_space_tag_t tag; bus_space_handle_t bsh; diff --git a/sys/pci/ahc_pci.c b/sys/pci/ahc_pci.c index 344658d..6c26c09 100644 --- a/sys/pci/ahc_pci.c +++ b/sys/pci/ahc_pci.c @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ahc_pci.c,v 1.1 1998/09/15 07:25:33 gibbs Exp $ + * $Id: ahc_pci.c,v 1.2 1998/10/07 03:40:51 gibbs Exp $ */ #include <pci.h> @@ -1172,7 +1172,6 @@ void ahc_pci_intr(struct ahc_softc *ahc) { u_int8_t status1; - pcici_t config_id; status1 = pci_cfgread(ahc->pci_config_id, PCIR_STATUS + 1, /*bytes*/1); diff --git a/sys/pci/brooktree848.c b/sys/pci/brooktree848.c index 677303e..d4de62e 100644 --- a/sys/pci/brooktree848.c +++ b/sys/pci/brooktree848.c @@ -1,4 +1,4 @@ -/* $Id: brooktree848.c,v 1.58 1998/11/07 14:30:48 nsouch Exp $ */ +/* $Id: brooktree848.c,v 1.59 1998/11/08 12:39:06 dfr Exp $ */ /* BT848 Driver for Brooktree's Bt848 based cards. The Brooktree BT848 Driver driver is based upon Mark Tinguely and Jim Lowe's driver for the Matrox Meteor PCI card . The @@ -1940,7 +1940,6 @@ bktr_ioctl( dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct proc* pr ) static int video_ioctl( bktr_ptr_t bktr, int unit, int cmd, caddr_t arg, struct proc* pr ) { - int tmp_int; bt848_ptr_t bt848; volatile u_char c_temp; unsigned int temp; @@ -1951,7 +1950,6 @@ video_ioctl( bktr_ptr_t bktr, int unit, int cmd, caddr_t arg, struct proc* pr ) struct meteor_video *video; struct bktr_capture_area *cap_area; vm_offset_t buf; - struct format_params *fp; int i; char char_temp; @@ -4495,7 +4493,7 @@ static void probeCard( bktr_ptr_t bktr, int verbose ) { int card, i,j, card_found; - int status, *test; + int status; bt848_ptr_t bt848; u_char probe_signature[128], *probe_temp; int any_i2c_devices; @@ -4737,7 +4735,6 @@ checkMSP: checkEnd: -checkPLL: #if defined( BKTR_USE_PLL ) bktr->xtal_pll_mode = BT848_USE_PLL; goto checkPLLEnd; @@ -4748,7 +4745,9 @@ checkPLL: if ((card == CARD_HAUPPAUGE) && (bktr->id==BROOKTREE_878_ID || bktr->id==BROOKTREE_879_ID) ) bktr->xtal_pll_mode = BT848_USE_PLL; +#if defined( BKTR_USE_PLL ) checkPLLEnd: +#endif bktr->card.tuner_pllAddr = tuner_i2c_address; diff --git a/sys/pci/dpt_pci.c b/sys/pci/dpt_pci.c index 7af9a2a..b704fca 100644 --- a/sys/pci/dpt_pci.c +++ b/sys/pci/dpt_pci.c @@ -32,7 +32,7 @@ * dptpci.c: PCI Bus Attachment for DPT SCSI HBAs */ -#ident "$Id: dpt_pci.c,v 1.8 1998/09/15 08:33:38 gibbs Exp $" +#ident "$Id: dpt_pci.c,v 1.9 1998/10/07 03:40:51 gibbs Exp $" #include "opt_devfs.h" #include "opt_dpt.h" @@ -112,14 +112,13 @@ dpt_pci_attach(pcici_t config_id, int unit) { dpt_softc_t *dpt; vm_offset_t vaddr; +#ifdef DPT_ALLOW_MEMIO vm_offset_t paddr; +#endif u_int16_t io_base; bus_space_tag_t tag; bus_space_handle_t bsh; u_int32_t command; - u_int32_t data; - int result; - int ndx; int s; vaddr = NULL; diff --git a/sys/pci/if_mx.c b/sys/pci/if_mx.c index 8f43a5d..1970ade 100644 --- a/sys/pci/if_mx.c +++ b/sys/pci/if_mx.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_mx.c,v 1.2 1998/12/04 21:48:12 wpaul Exp $ + * $Id: if_mx.c,v 1.3 1998/12/05 02:21:43 wpaul Exp $ */ /* @@ -93,8 +93,8 @@ #include <pci/if_mxreg.h> #ifndef lint -static char rcsid[] = - "$Id: if_mx.c,v 1.2 1998/12/04 21:48:12 wpaul Exp $"; +static const char rcsid[] = + "$Id: if_mx.c,v 1.3 1998/12/05 02:21:43 wpaul Exp $"; #endif /* diff --git a/sys/pci/if_pn.c b/sys/pci/if_pn.c index a9796f8..39d9786 100644 --- a/sys/pci/if_pn.c +++ b/sys/pci/if_pn.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_pn.c,v 1.1 1998/12/04 18:01:21 wpaul Exp $ + * $Id: if_pn.c,v 1.2 1998/12/05 02:21:43 wpaul Exp $ */ /* @@ -94,8 +94,8 @@ #include <pci/if_pnreg.h> #ifndef lint -static char rcsid[] = - "$Id: if_pn.c,v 1.1 1998/12/04 18:01:21 wpaul Exp $"; +static const char rcsid[] = + "$Id: if_pn.c,v 1.2 1998/12/05 02:21:43 wpaul Exp $"; #endif /* diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index 6d929b2..c91b7ef 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_rl.c,v 1.16 1998/12/07 00:16:44 wpaul Exp $ + * $Id: if_rl.c,v 1.4 1998/12/07 00:35:05 wpaul Exp $ */ /* @@ -126,8 +126,8 @@ #include <pci/if_rlreg.h> #ifndef lint -static char rcsid[] = - "$Id: if_rl.c,v 1.16 1998/12/07 00:16:44 wpaul Exp $"; +static const char rcsid[] = + "$Id: if_rl.c,v 1.4 1998/12/07 00:35:05 wpaul Exp $"; #endif /* diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c index 840fe85..062afaf 100644 --- a/sys/pci/if_tl.c +++ b/sys/pci/if_tl.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_tl.c,v 1.19 1998/10/31 17:23:48 wpaul Exp $ + * $Id: if_tl.c,v 1.20 1998/12/05 02:21:42 wpaul Exp $ */ /* @@ -216,9 +216,9 @@ #include <pci/if_tlreg.h> -#ifndef lint -static char rcsid[] = - "$Id: if_tl.c,v 1.19 1998/10/31 17:23:48 wpaul Exp $"; +#if !defined(lint) +static const char rcsid[] = + "$Id: if_tl.c,v 1.20 1998/12/05 02:21:42 wpaul Exp $"; #endif #ifdef TL_DEBUG diff --git a/sys/pci/if_tx.c b/sys/pci/if_tx.c index d1a63ce..a462796 100644 --- a/sys/pci/if_tx.c +++ b/sys/pci/if_tx.c @@ -1,5 +1,5 @@ /* $OpenBSD: if_tx.c,v 1.3 1998/10/10 04:30:09 jason Exp $ */ -/* $Id: if_tx.c,v 1.16 1998/11/01 07:44:33 semenu Exp $ */ +/* $Id: if_tx.c,v 1.17 1998/11/09 09:34:00 peter Exp $ */ /*- * Copyright (c) 1997 Semen Ustimenko (semen@iclub.nsu.ru) @@ -407,8 +407,7 @@ epic_freebsd_attach( #else caddr_t pmembase; #endif - int i,k,s,tmp; - u_int32_t pool; + int i,s,tmp; printf("tx%d",unit); diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c index a96d14c..e0b377f 100644 --- a/sys/pci/if_vr.c +++ b/sys/pci/if_vr.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_vr.c,v 1.1 1998/12/04 18:01:21 wpaul Exp $ + * $Id: if_vr.c,v 1.2 1998/12/05 02:21:44 wpaul Exp $ */ /* @@ -96,8 +96,8 @@ #include <pci/if_vrreg.h> #ifndef lint -static char rcsid[] = - "$Id: if_vr.c,v 1.1 1998/12/04 18:01:21 wpaul Exp $"; +static const char rcsid[] = + "$Id: if_vr.c,v 1.2 1998/12/05 02:21:44 wpaul Exp $"; #endif /* diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c index a3bbf22..8c711a9 100644 --- a/sys/pci/if_xl.c +++ b/sys/pci/if_xl.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_xl.c,v 1.17 1998/11/18 16:46:53 wpaul Exp $ + * $Id: if_xl.c,v 1.18 1998/12/05 02:21:42 wpaul Exp $ */ /* @@ -145,9 +145,9 @@ #include <pci/if_xlreg.h> -#ifndef lint -static char rcsid[] = - "$Id: if_xl.c,v 1.17 1998/11/18 16:46:53 wpaul Exp $"; +#if !defined(lint) +static const char rcsid[] = + "$Id: if_xl.c,v 1.18 1998/12/05 02:21:42 wpaul Exp $"; #endif /* diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index 0171ba9..f6a3a39 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: ncr.c,v 1.137 1998/10/15 23:17:49 gibbs Exp $ +** $Id: ncr.c,v 1.138 1998/12/04 22:54:55 archie Exp $ ** ** Device driver for the NCR 53C8XX PCI-SCSI-Controller Family. ** @@ -1333,7 +1333,6 @@ static void ncr_getsync (ncb_p np, u_char sfac, u_char *fakp, u_char *scntl3p); static void ncr_setsync (ncb_p np, nccb_p cp,u_char scntl3,u_char sxfer, u_char period); -static void ncr_settags (tcb_p tp, lcb_p lp, u_long usrtag); static void ncr_setwide (ncb_p np, nccb_p cp, u_char wide, u_char ack); static int ncr_show_msg (u_char * msg); static int ncr_snooptest (ncb_p np); @@ -1356,8 +1355,10 @@ static void ncr_attach (pcici_t tag, int unit); */ -static char ident[] = - "\n$Id: ncr.c,v 1.137 1998/10/15 23:17:49 gibbs Exp $\n"; +#if !defined(lint) +static const char ident[] = + "\n$Id: ncr.c,v 1.138 1998/12/04 22:54:55 archie Exp $\n"; +#endif static const u_long ncr_version = NCR_VERSION * 11 + (u_long) sizeof (struct ncb) * 7 @@ -5013,8 +5014,6 @@ ncr_setsync(ncb_p np, nccb_p cp, u_char scntl3, u_char sxfer, u_char period) tp->tinfo.wval = scntl3; if (sxfer & 0x1f) { - unsigned f10 = 100000 << tp->tinfo.current.width; - unsigned mb10 = (f10 + period_10ns/2) / period_10ns; /* ** Disable extended Sreq/Sack filtering */ diff --git a/sys/pci/pci_compat.c b/sys/pci/pci_compat.c index 9048953..5d5bc5b 100644 --- a/sys/pci/pci_compat.c +++ b/sys/pci/pci_compat.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pci_compat.c,v 1.13 1998/11/09 08:03:01 peter Exp $ + * $Id: pci_compat.c,v 1.14 1998/12/04 22:54:56 archie Exp $ * */ @@ -172,11 +172,10 @@ int pci_map_mem(pcici_t cfg, u_long reg, vm_offset_t* va, vm_offset_t* pa) int pci_map_dense(pcici_t cfg, u_long reg, vm_offset_t* va, vm_offset_t* pa) { - vm_offset_t dense; - int retval = 0; - if(pci_map_mem(cfg, reg, va, pa)){ #ifdef __alpha__ + vm_offset_t dense; + if(dense = pci_cvt_to_dense(*pa)){ *pa = dense; *va = ALPHA_PHYS_TO_K0SEG(*pa); @@ -193,11 +192,10 @@ pci_map_dense(pcici_t cfg, u_long reg, vm_offset_t* va, vm_offset_t* pa) int pci_map_bwx(pcici_t cfg, u_long reg, vm_offset_t* va, vm_offset_t* pa) { - vm_offset_t bwx; - int retval = 0; - if(pci_map_mem(cfg, reg, va, pa)){ #ifdef __alpha__ + vm_offset_t bwx; + if(bwx = pci_cvt_to_bwx(*pa)){ *pa = bwx; *va = ALPHA_PHYS_TO_K0SEG(*pa); diff --git a/sys/pci/pcisupport.c b/sys/pci/pcisupport.c index 6a46960..fb6c701 100644 --- a/sys/pci/pcisupport.c +++ b/sys/pci/pcisupport.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pcisupport.c,v 1.75 1998/12/01 21:50:58 sos Exp $ +** $Id: pcisupport.c,v 1.76 1998/12/04 22:54:56 archie Exp $ ** ** Device driver for DEC/INTEL PCI chipsets. ** @@ -1085,8 +1085,10 @@ static char* vga_probe (pcici_t tag, pcidi_t typea) if (vendor && chip) { char *buf; int len; +#if 0 int i; int reqmapmem; +#endif if (type == 0) { type = "SVGA controller"; |