Subject: port-x68k/13051: vs driver code clean up
To: None <gnats-bugs@gnats.netbsd.org>
From: None <isaki@par.odn.ne.jp>
List: netbsd-bugs
Date: 05/27/2001 23:16:23
>Number: 13051
>Category: port-x68k
>Synopsis: vs driver code clean up
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-x68k-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun May 27 07:15:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Tetsuya Isaki
>Release: NetBSD current around 2001/05/27
>Organization:
>Environment:
NetBSD yuka.local 1.5V NetBSD 1.5V (YUKA-CURRENT) #4: Sun May 27 20:21:05 JST 2001 isaki@erika.local:/var/obj/current/x68k/sys/arch/x68k/compile/YUKA-CURRENT x68k
>Description:
vs driver has some obsolate code.
Most of them are prototype declarations, and no effect.
But one makes fail to compile the x68k kernel
when VS_DEBUG option is specified.
>How-To-Repeat:
compile the x68k kernel with VS_DEBUG option.
----------------
/usr/pkg/cross/bin/m68k-netbsd-gcc -O2 -m68020-60 -Wa,-m68030 -Wa,-m68851 -Werror -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-main -msoft-float -I. -I../../../../arch -I../../../.. -nostdinc -DMAXUSERS=8 -D_KERNEL -Dx68k -c ../../../../arch/x68k/dev/vs.c
../../../../arch/x68k/dev/vs.c: In function `vs_halt_output':
../../../../arch/x68k/dev/vs.c:568: `dmac' undeclared (first use in this function)
../../../../arch/x68k/dev/vs.c:568: (Each undeclared identifier is reported only once
../../../../arch/x68k/dev/vs.c:568: for each function it appears in.)
*** Error code 1
----------------
>Fix:
Apply this patch.
Index: vs.c
===================================================================
RCS file: /cvs/cvsroot/syssrc/sys/arch/x68k/dev/vs.c,v
retrieving revision 1.6
diff -u -r1.6 vs.c
--- vs.c 2001/05/27 05:30:02 1.6
+++ vs.c 2001/05/27 13:40:39
@@ -77,8 +77,6 @@
static int vs_query_encoding __P((void *, struct audio_encoding *));
static int vs_set_params __P((void *, int, int, struct audio_params *,
struct audio_params *));
-static int vs_init_output __P((void *, void *, int));
-static int vs_init_input __P((void *, void *, int));
static int vs_trigger_output __P((void *, void *, void *, int,
void (*)(void *), void *,
struct audio_params *));
@@ -103,12 +101,6 @@
static int vs_round_sr(u_long);
static void vs_set_sr(struct vs_softc *sc, int);
static inline void vs_set_po(struct vs_softc *sc, u_long);
-static int adpcm_estimindex[];
-static int adpcm_estim[];
-static u_char adpcm_estimindex_correct[];
-static inline u_char pcm2adpcm_step __P((short, short *, signed char *));
-static void vs_ulinear8_to_adpcm __P((void *, u_char *, int));
-static void vs_mulaw_to_adpcm __P((void *, u_char *, int));
extern struct cfdata vs_cd;
@@ -573,7 +565,6 @@
dmac_abort_xfer(sc->sc_dma_ch->ch_softc, sc->sc_current.xfer);
bus_space_write_1 (sc->sc_iot, sc->sc_ioh, MSM6258_STAT, 1);
- DPRINTF(("vs_halt_output: csr=%x,cer=%x\n", dmac->csr, dmac->cer));
return 0;
}
>Release-Note:
>Audit-Trail:
>Unformatted: