Fixed warnings.

This commit is contained in:
Yoshihiro Takahashi 2000-10-15 04:54:17 +00:00
parent 54bb2a24af
commit 6bf6c91f5d
14 changed files with 70 additions and 51 deletions

View File

@ -631,7 +631,7 @@ bs_check_target(ti)
/* inquiry */
bzero(&scsi_cmd, sizeof(scsi_cmd));
scsi_cmd.opcode = INQUIRY;
scsi_cmd.length = sizeof(struct scsi_inquiry_data);
scsi_cmd.length = (u_int8_t) sizeof(struct scsi_inquiry_data);
cb = bs_make_internal_ccb(ti, 0,
(u_int8_t *) &scsi_cmd, sizeof(scsi_cmd),
(u_int8_t *) &scsi_inquiry_data,

View File

@ -1,3 +1,4 @@
/* $FreeBSD$ */
/* $NecBSD: bshw_dma.c,v 1.3 1997/07/26 06:03:16 honda Exp $ */
/* $NetBSD$ */
/*
@ -35,7 +36,7 @@
/*********************************************************
* static declare.
*********************************************************/
static BS_INLINE void bshw_dmastart __P((struct bs_softc *));
static void bshw_dmastart __P((struct bs_softc *));
static void bshw_dmadone __P((struct bs_softc *));
/**********************************************
@ -172,7 +173,7 @@ bs_dma_xfer_end(ti)
/**********************************************
* GENERIC DMA FUNCS
**********************************************/
static short dmapageport[4] = { 0x27, 0x21, 0x23, 0x25 };
static u_int8_t dmapageport[4] = { 0x27, 0x21, 0x23, 0x25 };
/* common dma settings */
#undef DMA1_SMSK
@ -186,7 +187,7 @@ static short dmapageport[4] = { 0x27, 0x21, 0x23, 0x25 };
#undef DMA1_CHN
#define DMA1_CHN(c) (0x01 + ((c) << 2))
static BS_INLINE void
static void
bshw_dmastart(bsc)
struct bs_softc *bsc;
{

View File

@ -1,3 +1,4 @@
/* $FreeBSD$ */
/* $NecBSD: bshw_pdma.c,v 1.4 1997/10/31 17:43:39 honda Exp $ */
/* $NetBSD$ */
/*
@ -36,7 +37,7 @@
static BS_INLINE void bshw_lc_smit_start __P((struct bs_softc *, int, u_int));
static int bshw_lc_smit_fstat __P((struct bs_softc *, int, int));
static BS_INLINE void bshw_lc_smit_stop __P((struct bs_softc *));
static void bshw_lc_smit_stop __P((struct bs_softc *));
/*********************************************************
* SM FIFO (GENERIC)
@ -115,7 +116,7 @@ bs_smit_xfer_end(ti)
#define LC_SFSZ 0x0c
#define LC_REST (LC_FSZ - LC_SFSZ)
static BS_INLINE void
static void
bshw_lc_smit_stop(bsc)
struct bs_softc *bsc;
{

View File

@ -105,7 +105,9 @@
#endif /* __NetBSD__ */
#ifdef __FreeBSD__
#include <sys/bus.h>
#include <sys/conf.h>
#include <sys/interrupt.h>
#include <sys/proc.h>
#include <vm/vm_extern.h>
#include <vm/vm_kern.h>

View File

@ -75,7 +75,6 @@ DEV##_get_ccb() \
register struct CCBTYPE *cb; \
int s = splcam(); \
\
again: \
if (CCBTYPE##que.count < CCBTYPE##que.maxccb) \
{ \
CCBTYPE##que.count ++; \

View File

@ -94,21 +94,28 @@
static void master_gdc_cmd(unsigned int);
static void master_gdc_prm(unsigned int);
static void master_gdc_word_prm(unsigned int);
#ifdef LINE30
static void master_gdc_fifo_empty(void);
#endif
static void master_gdc_wait_vsync(void);
static void gdc_cmd(unsigned int);
#ifdef LINE30
static void gdc_prm(unsigned int);
static void gdc_word_prm(unsigned int);
static void gdc_fifo_empty(void);
#endif
static void gdc_wait_vsync(void);
#ifdef LINE30
static int check_gdc_clock(void);
static int gdc_INFO = _25L;
#endif
static int gdc_FH = _24KHZ;
static void initialize_gdc(unsigned int, int);
#ifdef LINE30
static unsigned int master_param[2][2][8] = {
{{78, 8, 7, 9, 7, 7, 25, 400}, /* 400/24k */
{_CR-2, _VS, _HS-1, _HFP-1, _HBP-1, _VFP, _VBP, _LF}}, /* 480/24k */
@ -135,5 +142,6 @@ static unsigned int slave_param[2][6][8] = {
static int SlavePCH[2] = {40,80};
static int MasterPCH = 80;
static int SlaveScrlLF[3] = {400,400,_LF};
#endif
#endif /* __PC98_PC98_30LINE_H__ */

View File

@ -1129,6 +1129,8 @@ inittodr(time_t base)
second);
/* sec now contains the number of seconds, since Jan 1 1970,
in the local time zone */
s = splhigh();
#else /* IBM-PC */
/* Look if we have a RTC present and the time is valid */
if (!(rtcin(RTC_STATUSD) & RTCSD_PWR))

View File

@ -865,7 +865,11 @@ fdc_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
static int
fdc_probe(device_t dev)
{
#ifdef PC98
int error;
#else
int error, ic_type;
#endif
struct fdc_data *fdc;
fdc = device_get_softc(dev);
@ -1157,12 +1161,18 @@ DRIVER_MODULE(fdc, pccard, fdc_pccard_driver, fdc_devclass, 0, 0);
static int
fd_probe(device_t dev)
{
#ifdef PC98
u_int fdt;
#else
int i;
u_int fdt, st0, st3;
#endif
struct fd_data *fd;
struct fdc_data *fdc;
fdsu_t fdsu;
#ifndef PC98
static int fd_fifo = 0;
#endif
fdsu = *(int *)device_get_ivars(dev); /* xxx cheat a bit... */
fd = device_get_softc(dev);

View File

@ -37,10 +37,11 @@
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/fbio.h>
#include <vm/vm.h>
#include <vm/pmap.h>
#include <machine/console.h>
#include <machine/md_var.h>
#include <machine/pc/bios.h>
@ -287,7 +288,6 @@ static video_adapter_t biosadapter[1];
/* video driver declarations */
static int gdc_configure(int flags);
static int gdc_nop(void);
static int gdc_err(video_adapter_t *adp, ...);
static vi_probe_t gdc_probe;
static vi_init_t gdc_init;
@ -377,7 +377,6 @@ static int gdc_init_done = FALSE;
/* local functions */
static int map_gen_mode_num(int type, int color, int mode);
static int probe_adapters(void);
static void dump_buffer(u_char *buf, size_t len);
#define prologue(adp, flag, err) \
if (!gdc_init_done || !((adp)->va_flags & (flag))) \
@ -515,10 +514,12 @@ static void master_gdc_word_prm(unsigned int wpmtr)
master_gdc_prm((wpmtr >> 8) & 0x00ff);
}
#ifdef LINE30
static void master_gdc_fifo_empty(void)
{
while ( (inb(IO_GDC1) & 4) == 0);
}
#endif
static void master_gdc_wait_vsync(void)
{
@ -532,6 +533,7 @@ static void gdc_cmd(unsigned int cmd)
outb( IO_GDC2+2, cmd);
}
#ifdef LINE30
static void gdc_prm(unsigned int pmtr)
{
while ( (inb(IO_GDC2) & 2) != 0);
@ -548,6 +550,7 @@ static void gdc_fifo_empty(void)
{
while ( (inb(IO_GDC2) & 0x04) == 0);
}
#endif
static void gdc_wait_vsync(void)
{
@ -555,6 +558,7 @@ static void gdc_wait_vsync(void)
while ( (inb(IO_GDC2) & 0x20) == 0);
}
#ifdef LINE30
static int check_gdc_clock(void)
{
if ((inb(IO_SYSPORT) & 0x80) == 0){
@ -563,6 +567,7 @@ static int check_gdc_clock(void)
return _2_5MHZ;
}
}
#endif
static void initialize_gdc(unsigned int mode, int isGraph)
{
@ -767,12 +772,6 @@ gdc_set_origin(video_adapter_t *adp, off_t offset)
return 0;
}
static int
gdc_nop(void)
{
return 0;
}
/* entry points */
static int
@ -1244,18 +1243,6 @@ gdc_dev_ioctl(video_adapter_t *adp, u_long cmd, caddr_t arg)
}
}
static void
dump_buffer(u_char *buf, size_t len)
{
int i;
for(i = 0; i < len;) {
printf("%02x ", buf[i]);
if ((++i % 16) == 0)
printf("\n");
}
}
/*
* diag():
* Print some information about the video adapter and video modes,

View File

@ -1129,6 +1129,8 @@ inittodr(time_t base)
second);
/* sec now contains the number of seconds, since Jan 1 1970,
in the local time zone */
s = splhigh();
#else /* IBM-PC */
/* Look if we have a RTC present and the time is valid */
if (!(rtcin(RTC_STATUSD) & RTCSD_PWR))

View File

@ -94,21 +94,28 @@
static void master_gdc_cmd(unsigned int);
static void master_gdc_prm(unsigned int);
static void master_gdc_word_prm(unsigned int);
#ifdef LINE30
static void master_gdc_fifo_empty(void);
#endif
static void master_gdc_wait_vsync(void);
static void gdc_cmd(unsigned int);
#ifdef LINE30
static void gdc_prm(unsigned int);
static void gdc_word_prm(unsigned int);
static void gdc_fifo_empty(void);
#endif
static void gdc_wait_vsync(void);
#ifdef LINE30
static int check_gdc_clock(void);
static int gdc_INFO = _25L;
#endif
static int gdc_FH = _24KHZ;
static void initialize_gdc(unsigned int, int);
#ifdef LINE30
static unsigned int master_param[2][2][8] = {
{{78, 8, 7, 9, 7, 7, 25, 400}, /* 400/24k */
{_CR-2, _VS, _HS-1, _HFP-1, _HBP-1, _VFP, _VBP, _LF}}, /* 480/24k */
@ -135,5 +142,6 @@ static unsigned int slave_param[2][6][8] = {
static int SlavePCH[2] = {40,80};
static int MasterPCH = 80;
static int SlaveScrlLF[3] = {400,400,_LF};
#endif
#endif /* __PC98_PC98_30LINE_H__ */

View File

@ -1129,6 +1129,8 @@ inittodr(time_t base)
second);
/* sec now contains the number of seconds, since Jan 1 1970,
in the local time zone */
s = splhigh();
#else /* IBM-PC */
/* Look if we have a RTC present and the time is valid */
if (!(rtcin(RTC_STATUSD) & RTCSD_PWR))

View File

@ -865,7 +865,11 @@ fdc_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
static int
fdc_probe(device_t dev)
{
#ifdef PC98
int error;
#else
int error, ic_type;
#endif
struct fdc_data *fdc;
fdc = device_get_softc(dev);
@ -1157,12 +1161,18 @@ DRIVER_MODULE(fdc, pccard, fdc_pccard_driver, fdc_devclass, 0, 0);
static int
fd_probe(device_t dev)
{
#ifdef PC98
u_int fdt;
#else
int i;
u_int fdt, st0, st3;
#endif
struct fd_data *fd;
struct fdc_data *fdc;
fdsu_t fdsu;
#ifndef PC98
static int fd_fifo = 0;
#endif
fdsu = *(int *)device_get_ivars(dev); /* xxx cheat a bit... */
fd = device_get_softc(dev);

View File

@ -37,10 +37,11 @@
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/fbio.h>
#include <vm/vm.h>
#include <vm/pmap.h>
#include <machine/console.h>
#include <machine/md_var.h>
#include <machine/pc/bios.h>
@ -287,7 +288,6 @@ static video_adapter_t biosadapter[1];
/* video driver declarations */
static int gdc_configure(int flags);
static int gdc_nop(void);
static int gdc_err(video_adapter_t *adp, ...);
static vi_probe_t gdc_probe;
static vi_init_t gdc_init;
@ -377,7 +377,6 @@ static int gdc_init_done = FALSE;
/* local functions */
static int map_gen_mode_num(int type, int color, int mode);
static int probe_adapters(void);
static void dump_buffer(u_char *buf, size_t len);
#define prologue(adp, flag, err) \
if (!gdc_init_done || !((adp)->va_flags & (flag))) \
@ -515,10 +514,12 @@ static void master_gdc_word_prm(unsigned int wpmtr)
master_gdc_prm((wpmtr >> 8) & 0x00ff);
}
#ifdef LINE30
static void master_gdc_fifo_empty(void)
{
while ( (inb(IO_GDC1) & 4) == 0);
}
#endif
static void master_gdc_wait_vsync(void)
{
@ -532,6 +533,7 @@ static void gdc_cmd(unsigned int cmd)
outb( IO_GDC2+2, cmd);
}
#ifdef LINE30
static void gdc_prm(unsigned int pmtr)
{
while ( (inb(IO_GDC2) & 2) != 0);
@ -548,6 +550,7 @@ static void gdc_fifo_empty(void)
{
while ( (inb(IO_GDC2) & 0x04) == 0);
}
#endif
static void gdc_wait_vsync(void)
{
@ -555,6 +558,7 @@ static void gdc_wait_vsync(void)
while ( (inb(IO_GDC2) & 0x20) == 0);
}
#ifdef LINE30
static int check_gdc_clock(void)
{
if ((inb(IO_SYSPORT) & 0x80) == 0){
@ -563,6 +567,7 @@ static int check_gdc_clock(void)
return _2_5MHZ;
}
}
#endif
static void initialize_gdc(unsigned int mode, int isGraph)
{
@ -767,12 +772,6 @@ gdc_set_origin(video_adapter_t *adp, off_t offset)
return 0;
}
static int
gdc_nop(void)
{
return 0;
}
/* entry points */
static int
@ -1244,18 +1243,6 @@ gdc_dev_ioctl(video_adapter_t *adp, u_long cmd, caddr_t arg)
}
}
static void
dump_buffer(u_char *buf, size_t len)
{
int i;
for(i = 0; i < len;) {
printf("%02x ", buf[i]);
if ((++i % 16) == 0)
printf("\n");
}
}
/*
* diag():
* Print some information about the video adapter and video modes,