Declared functions as static in their definitions as well as in their

prototypes.
This commit is contained in:
Bruce Evans 1995-12-14 19:38:40 +00:00
parent 2e5444fa24
commit 9bea3bb463
2 changed files with 17 additions and 20 deletions

View File

@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
* $Id: scsiconf.h,v 1.33 1995/12/10 10:58:27 julian Exp $
* $Id: scsiconf.h,v 1.34 1995/12/14 09:54:30 phk Exp $
*/
#ifndef SCSI_SCSICONF_H
#define SCSI_SCSICONF_H 1
@ -173,28 +173,26 @@ struct scsi_device
/* SCSI_DEVICE_ENTRIES: A macro to generate all the entry points from the
* name.
* XXX as usual, the extern prototypes belong in a header so that they are
* visible to callers.
*/
#define SCSI_DEVICE_ENTRIES(NAME) \
static errval NAME##attach(struct scsi_link *sc_link); \
extern struct scsi_device NAME##_switch; \
extern struct scsi_device NAME##_switch; /* XXX actually static */ \
void NAME##init(void) { \
scsi_device_register(&NAME##_switch); \
} \
int NAME##open(dev_t dev, int flags, int fmt, struct proc *p) { \
static int NAME##open(dev_t dev, int flags, int fmt, struct proc *p) { \
return scsi_open(dev, flags, fmt, p, &NAME##_switch); \
} \
int NAME##ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p) { \
static int NAME##ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p) { \
return scsi_ioctl(dev, cmd, addr, flag, p, &NAME##_switch); \
} \
int NAME##close(dev_t dev, int flag, int fmt, struct proc *p) { \
static int NAME##close(dev_t dev, int flag, int fmt, struct proc *p) { \
return scsi_close(dev, flag, fmt, p, &NAME##_switch); \
} \
static void NAME##minphys(struct buf *bp) { \
scsi_minphys(bp, &NAME##_switch); \
} \
void NAME##strategy(struct buf *bp) { \
static void NAME##strategy(struct buf *bp) { \
scsi_strategy(bp, &NAME##_switch); \
}
@ -467,7 +465,7 @@ void sc_print_addr __P((struct scsi_link *));
void sc_print_start __P((struct scsi_link *));
void sc_print_finish __P((void));
extern int scsi_externalize __P((struct scsi_link *, struct sysctl_req *));
int scsi_externalize __P((struct scsi_link *, struct sysctl_req *));
void scsi_device_register __P((struct scsi_device *sd));

View File

@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
*
* $Id: sd.c,v 1.80 1995/12/11 04:57:07 dyson Exp $
* $Id: sd.c,v 1.81 1995/12/11 05:02:52 dyson Exp $
*/
#define SPLSD splbio
@ -45,8 +45,6 @@
#include <machine/md_var.h>
#include <i386/i386/cons.h> /* XXX *//* for aborting dump */
extern int SCSI_DEVICE_ENTRIES __P((int sd));
static u_int32 sdstrats, sdqueues;
#define SECSIZE 512
@ -250,7 +248,7 @@ sdattach(struct scsi_link *sc_link)
/*
* open the device. Make sure the partition info is a up-to-date as can be.
*/
errval
static errval
sd_open(dev, mode, fmt, p, sc_link)
dev_t dev;
int mode;
@ -373,7 +371,7 @@ sd_open(dev, mode, fmt, p, sc_link)
* close the device.. only called if we are the LAST occurence of an open
* device. Convenient now but usually a pain.
*/
errval
static errval
sd_close(dev, fflag, fmt, p, sc_link)
dev_t dev;
int fflag;
@ -397,7 +395,7 @@ sd_close(dev, fflag, fmt, p, sc_link)
* can understand. The transfer is described by a buf and will include
* only one physical transfer.
*/
void
static void
sd_strategy(struct buf *bp, struct scsi_link *sc_link)
{
u_int32 opri;
@ -497,7 +495,7 @@ sdstrategy1(struct buf *bp)
* must be called at the correct (highish) spl level
* sdstart() is called at SPLSD from sdstrategy and scsi_done
*/
void
static void
sdstart(u_int32 unit, u_int32 flags)
{
register struct scsi_link *sc_link = SCSI_LINK(&sd_switch, unit);
@ -595,7 +593,7 @@ sdstart(u_int32 unit, u_int32 flags)
* Perform special action on behalf of the user
* Knows about the internals of this device
*/
errval
static errval
sd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p,
struct scsi_link *sc_link)
{
@ -810,7 +808,7 @@ sd_get_parms(unit, flags)
return 0;
}
int
static int
sdsize(dev_t dev)
{
struct scsi_data *sd;
@ -835,7 +833,8 @@ sdsize(dev_t dev)
* so many times) and it may save your butt.
*/
int sd_sense_handler(struct scsi_xfer *xs)
static int
sd_sense_handler(struct scsi_xfer *xs)
{
struct scsi_sense_data *sense;
struct scsi_inquiry_data *inqbuf;
@ -877,7 +876,7 @@ int sd_sense_handler(struct scsi_xfer *xs)
* dump all of physical memory into the partition specified, starting
* at offset 'dumplo' into the partition.
*/
errval
static errval
sddump(dev_t dev)
{ /* dump core after a system crash */
struct disklabel *lp;