From 43e684e6ce593032871c21165ab6c186f9afc1ae Mon Sep 17 00:00:00 2001 From: maxv Date: Sun, 1 Dec 2019 12:47:10 +0000 Subject: [PATCH] minor adjustments, to avoid warnings on debug builds --- sys/dev/pci/if_msk.c | 10 +++++----- sys/dev/usb/if_atu.c | 11 ++++------- sys/dev/usb/uhid.c | 8 ++++---- sys/dev/usb/ustir.c | 5 ++--- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c index b00198ad849d..7d2e3a1d5e1d 100644 --- a/sys/dev/pci/if_msk.c +++ b/sys/dev/pci/if_msk.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_msk.c,v 1.95 2019/11/28 17:09:10 maxv Exp $ */ +/* $NetBSD: if_msk.c,v 1.96 2019/12/01 12:47:10 maxv Exp $ */ /* $OpenBSD: if_msk.c,v 1.79 2009/10/15 17:54:56 deraadt Exp $ */ /* @@ -52,7 +52,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.95 2019/11/28 17:09:10 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.96 2019/12/01 12:47:10 maxv Exp $"); #include #include @@ -139,9 +139,9 @@ static void msk_fill_rx_tick(void *); #define DPRINTFN(n, x) if (mskdebug >= (n)) printf x int mskdebug = MSK_DEBUG; -void msk_dump_txdesc(struct msk_tx_desc *, int); -void msk_dump_mbuf(struct mbuf *); -void msk_dump_bytes(const char *, int); +static void msk_dump_txdesc(struct msk_tx_desc *, int); +static void msk_dump_mbuf(struct mbuf *); +static void msk_dump_bytes(const char *, int); #else #define DPRINTF(x) #define DPRINTFN(n, x) diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c index f52e5d02f01d..f662f5a3e977 100644 --- a/sys/dev/usb/if_atu.c +++ b/sys/dev/usb/if_atu.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_atu.c,v 1.66 2019/11/28 17:09:10 maxv Exp $ */ +/* $NetBSD: if_atu.c,v 1.67 2019/12/01 12:47:10 maxv Exp $ */ /* $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */ /* * Copyright (c) 2003, 2004 @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.66 2019/11/28 17:09:10 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.67 2019/12/01 12:47:10 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -267,10 +267,6 @@ static int atu_rx_list_init(struct atu_softc *); static void atu_xfer_list_free(struct atu_softc *, struct atu_chain *, int); -#ifdef ATU_DEBUG -static void atu_debug_print(struct atu_softc *); -#endif - static void atu_task(void *); static int atu_newstate(struct ieee80211com *, enum ieee80211_state, int); static int atu_tx_start(struct atu_softc *, struct ieee80211_node *, @@ -2053,7 +2049,8 @@ atu_init(struct ifnet *ifp) return 0; } -#ifdef ATU_DEBUG +#if 0 && defined(ATU_DEBUG) /* XXX XXX XXX UNUSED */ +static void atu_debug_print(struct atu_softc *); static void atu_debug_print(struct atu_softc *sc) { diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 19964f28036b..e6f8b2d56c7a 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhid.c,v 1.109 2019/12/01 08:27:54 maxv Exp $ */ +/* $NetBSD: uhid.c,v 1.110 2019/12/01 12:47:10 maxv Exp $ */ /* * Copyright (c) 1998, 2004, 2008, 2012 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.109 2019/12/01 08:27:54 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.110 2019/12/01 12:47:10 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -385,7 +385,7 @@ uhidclose(dev_t dev, int flag, int mode, struct lwp *l) return 0; } -int +Static int uhid_do_read(struct uhid_softc *sc, struct uio *uio, int flag) { int error = 0; @@ -467,7 +467,7 @@ uhidread(dev_t dev, struct uio *uio, int flag) return error; } -static int +Static int uhid_do_write(struct uhid_softc *sc, struct uio *uio, int flag) { int error; diff --git a/sys/dev/usb/ustir.c b/sys/dev/usb/ustir.c index 38eafd620d33..f685ea324cf2 100644 --- a/sys/dev/usb/ustir.c +++ b/sys/dev/usb/ustir.c @@ -1,4 +1,4 @@ -/* $NetBSD: ustir.c,v 1.43 2019/12/01 08:27:54 maxv Exp $ */ +/* $NetBSD: ustir.c,v 1.44 2019/12/01 12:47:10 maxv Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.43 2019/12/01 08:27:54 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.44 2019/12/01 12:47:10 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -146,7 +146,6 @@ struct ustir_softc { #define USTIR_WR_TIMEOUT 200 -Static int ustir_activate(device_t, enum devact); Static int ustir_open(void *, int, int, struct lwp *); Static int ustir_close(void *, int, int, struct lwp *); Static int ustir_read(void *, struct uio *, int);