Module Name:    src
Committed By:   tsutsui
Date:           Tue Dec 29 17:17:14 UTC 2020

Modified Files:
        src/sys/arch/luna68k/dev: lcd.c siotty.c xp.c

Log Message:
Make local functions static.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/luna68k/dev/lcd.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/luna68k/dev/siotty.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/luna68k/dev/xp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/luna68k/dev/lcd.c
diff -u src/sys/arch/luna68k/dev/lcd.c:1.11 src/sys/arch/luna68k/dev/lcd.c:1.12
--- src/sys/arch/luna68k/dev/lcd.c:1.11	Sun Jun 30 05:04:48 2019
+++ src/sys/arch/luna68k/dev/lcd.c	Tue Dec 29 17:17:14 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: lcd.c,v 1.11 2019/06/30 05:04:48 tsutsui Exp $ */
+/* $NetBSD: lcd.c,v 1.12 2020/12/29 17:17:14 tsutsui Exp $ */
 /* $OpenBSD: lcd.c,v 1.7 2015/02/10 22:42:35 miod Exp $ */
 
 /*-
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>		/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: lcd.c,v 1.11 2019/06/30 05:04:48 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lcd.c,v 1.12 2020/12/29 17:17:14 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -82,10 +82,10 @@ struct pio {
 static int  lcd_match(device_t, cfdata_t, void *);
 static void lcd_attach(device_t, device_t, void *);
 
-dev_type_open(lcdopen);
-dev_type_close(lcdclose);
-dev_type_write(lcdwrite);
-dev_type_ioctl(lcdioctl);
+static dev_type_open(lcdopen);
+static dev_type_close(lcdclose);
+static dev_type_write(lcdwrite);
+static dev_type_ioctl(lcdioctl);
 
 const struct cdevsw lcd_cdevsw = {
 	.d_open     = lcdopen,
@@ -111,11 +111,11 @@ struct lcd_softc {
 CFATTACH_DECL_NEW(lcd, sizeof(struct lcd_softc),
     lcd_match, lcd_attach, NULL, NULL);
 
-void lcdbusywait(void);
-void lcdput(int);
-void lcdctrl(int);
-void lcdshow(char *);
-void greeting(void);
+static void lcdbusywait(void);
+static void lcdput(int);
+static void lcdctrl(int);
+static void lcdshow(char *);
+static void greeting(void);
 			       /* "1234567890123456" */
 static char lcd_boot_message1[] = " NetBSD/luna68k ";
 static char lcd_boot_message2[] = "   SX-9100/DT   ";
@@ -148,7 +148,7 @@ lcd_attach(device_t parent, device_t sel
 /*
  * open/close/write/ioctl
  */
-int
+static int
 lcdopen(dev_t dev, int flags, int fmt, struct lwp *l)
 {
 	int unit;
@@ -165,7 +165,7 @@ lcdopen(dev_t dev, int flags, int fmt, s
 	return 0;
 }
 
-int
+static int
 lcdclose(dev_t dev, int flags, int fmt, struct lwp *l)
 {
 	int unit;
@@ -178,7 +178,7 @@ lcdclose(dev_t dev, int flags, int fmt, 
 	return 0;
 }
 
-int
+static int
 lcdwrite(dev_t dev, struct uio *uio, int flag)
 {
 	int error;
@@ -201,7 +201,7 @@ lcdwrite(dev_t dev, struct uio *uio, int
 	return 0;
 }
 
-int
+static int
 lcdioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
 {
 	int val;
@@ -278,7 +278,7 @@ lcdioctl(dev_t dev, u_long cmd, void *ad
 	return EPASSTHROUGH;
 }
 
-void
+static void
 lcdbusywait(void)
 {
 	struct pio *p1 = (struct pio *)OBIO_PIO1_BASE;
@@ -299,7 +299,7 @@ lcdbusywait(void)
 	splx(s);
 }	
 
-void
+static void
 lcdput(int cc)
 {
 	struct pio *p1 = (struct pio *)OBIO_PIO1_BASE;
@@ -316,7 +316,7 @@ lcdput(int cc)
 	splx(s);
 }
 
-void
+static void
 lcdctrl(int cc)
 {
 	struct pio *p1 = (struct pio *)OBIO_PIO1_BASE;
@@ -333,7 +333,7 @@ lcdctrl(int cc)
 	splx(s);
 }
 
-void
+static void
 lcdshow(char *s)
 {
 	int cc;
@@ -342,7 +342,7 @@ lcdshow(char *s)
 		lcdput(cc);
 }
 
-void
+static void
 greeting(void)
 {
 

Index: src/sys/arch/luna68k/dev/siotty.c
diff -u src/sys/arch/luna68k/dev/siotty.c:1.46 src/sys/arch/luna68k/dev/siotty.c:1.47
--- src/sys/arch/luna68k/dev/siotty.c:1.46	Tue Oct  1 18:00:07 2019
+++ src/sys/arch/luna68k/dev/siotty.c	Tue Dec 29 17:17:14 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: siotty.c,v 1.46 2019/10/01 18:00:07 chs Exp $ */
+/* $NetBSD: siotty.c,v 1.47 2020/12/29 17:17:14 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: siotty.c,v 1.46 2019/10/01 18:00:07 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siotty.c,v 1.47 2020/12/29 17:17:14 tsutsui Exp $");
 
 #include "opt_ddb.h"
 
@@ -119,14 +119,14 @@ static void siotty_attach(device_t, devi
 CFATTACH_DECL_NEW(siotty, sizeof(struct siotty_softc),
     siotty_match, siotty_attach, NULL, NULL);
 
-dev_type_open(sioopen);
-dev_type_close(sioclose);
-dev_type_read(sioread);
-dev_type_write(siowrite);
-dev_type_ioctl(sioioctl);
-dev_type_stop(siostop);
-dev_type_tty(siotty);
-dev_type_poll(siopoll);
+static dev_type_open(sioopen);
+static dev_type_close(sioclose);
+static dev_type_read(sioread);
+static dev_type_write(siowrite);
+static dev_type_ioctl(sioioctl);
+static dev_type_stop(siostop);
+static dev_type_tty(siotty);
+static dev_type_poll(siopoll);
 
 const struct cdevsw siotty_cdevsw = {
 	.d_open = sioopen,
@@ -367,7 +367,7 @@ out:
 	splx(s);
 }
 
-void
+static void
 siostop(struct tty *tp, int flag)
 {
 	int s;
@@ -490,7 +490,7 @@ siomctl(struct siotty_softc *sc, int con
 
 /*--------------------  cdevsw[] interface --------------------*/
 
-int
+static int
 sioopen(dev_t dev, int flag, int mode, struct lwp *l)
 {
 	struct siotty_softc *sc;
@@ -545,7 +545,7 @@ sioopen(dev_t dev, int flag, int mode, s
 	return (*tp->t_linesw->l_open)(dev, tp);
 }
 
-int
+static int
 sioclose(dev_t dev, int flag, int mode, struct lwp *l)
 {
 	struct siotty_softc *sc = device_lookup_private(&siotty_cd,minor(dev));
@@ -568,7 +568,7 @@ sioclose(dev_t dev, int flag, int mode, 
 	return ttyclose(tp);
 }
 
-int
+static int
 sioread(dev_t dev, struct uio *uio, int flag)
 {
 	struct siotty_softc *sc;
@@ -579,7 +579,7 @@ sioread(dev_t dev, struct uio *uio, int 
 	return (*tp->t_linesw->l_read)(tp, uio, flag);
 }
 
-int
+static int
 siowrite(dev_t dev, struct uio *uio, int flag)
 {
 	struct siotty_softc *sc;
@@ -590,7 +590,7 @@ siowrite(dev_t dev, struct uio *uio, int
 	return (*tp->t_linesw->l_write)(tp, uio, flag);
 }
 
-int
+static int
 siopoll(dev_t dev, int events, struct lwp *l)
 {
 	struct siotty_softc *sc;
@@ -601,7 +601,7 @@ siopoll(dev_t dev, int events, struct lw
 	return (*tp->t_linesw->l_poll)(tp, events, l);
 }
 
-int
+static int
 sioioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
 {
 	struct siotty_softc *sc;
@@ -657,7 +657,7 @@ sioioctl(dev_t dev, u_long cmd, void *da
 }
 
 /* ARSGUSED */
-struct tty *
+static struct tty *
 siotty(dev_t dev)
 {
 	struct siotty_softc *sc;

Index: src/sys/arch/luna68k/dev/xp.c
diff -u src/sys/arch/luna68k/dev/xp.c:1.5 src/sys/arch/luna68k/dev/xp.c:1.6
--- src/sys/arch/luna68k/dev/xp.c:1.5	Sun Jun 30 05:04:48 2019
+++ src/sys/arch/luna68k/dev/xp.c	Tue Dec 29 17:17:14 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: xp.c,v 1.5 2019/06/30 05:04:48 tsutsui Exp $ */
+/* $NetBSD: xp.c,v 1.6 2020/12/29 17:17:14 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2016 Izumi Tsutsui.  All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xp.c,v 1.5 2019/06/30 05:04:48 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xp.c,v 1.6 2020/12/29 17:17:14 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -66,12 +66,12 @@ struct xp_softc {
 static int xp_match(device_t, cfdata_t, void *);
 static void xp_attach(device_t, device_t, void *);
 
-dev_type_open(xp_open);
-dev_type_close(xp_close);
-dev_type_read(xp_read);
-dev_type_write(xp_write);
-dev_type_ioctl(xp_ioctl);
-dev_type_mmap(xp_mmap);
+static dev_type_open(xp_open);
+static dev_type_close(xp_close);
+static dev_type_read(xp_read);
+static dev_type_write(xp_write);
+static dev_type_ioctl(xp_ioctl);
+static dev_type_mmap(xp_mmap);
 
 const struct cdevsw xp_cdevsw = {
 	.d_open     = xp_open,
@@ -170,7 +170,7 @@ xp_attach(device_t parent, device_t self
 	sc->sc_tas      = XP_TAS_ADDR;
 }
 
-int
+static int
 xp_open(dev_t dev, int flags, int devtype, struct lwp *l)
 {
 	struct xp_softc *sc;
@@ -190,7 +190,7 @@ xp_open(dev_t dev, int flags, int devtyp
 	return 0;
 }
 
-int
+static int
 xp_close(dev_t dev, int flags, int mode, struct lwp *l)
 {
 	struct xp_softc *sc;
@@ -205,7 +205,7 @@ xp_close(dev_t dev, int flags, int mode,
 	return 0;
 }
 
-int
+static int
 xp_ioctl(dev_t dev, u_long cmd, void *addr, int flags, struct lwp *l)
 {
 	struct xp_softc *sc;
@@ -250,7 +250,7 @@ xp_ioctl(dev_t dev, u_long cmd, void *ad
 	panic("%s: cmd (%ld) is not handled", device_xname(sc->sc_dev), cmd);
 }
 
-paddr_t
+static paddr_t
 xp_mmap(dev_t dev, off_t offset, int prot)
 {
 	struct xp_softc *sc;
@@ -270,14 +270,14 @@ xp_mmap(dev_t dev, off_t offset, int pro
 	return pa;
 }
 
-int
+static int
 xp_read(dev_t dev, struct uio *uio, int flags)
 {
 
 	return ENODEV;
 }
 
-int
+static int
 xp_write(dev_t dev, struct uio *uio, int flags)
 {
 

Reply via email to