KNF patrol && De-__P().

This commit is contained in:
pk 2000-11-30 23:06:44 +00:00
parent 03903e1da8
commit 58b6f2ef7d

View File

@ -1,4 +1,4 @@
/* $NetBSD: ncr53c9xvar.h,v 1.26 2000/11/30 00:19:25 eeh Exp $ */ /* $NetBSD: ncr53c9xvar.h,v 1.27 2000/11/30 23:06:44 pk Exp $ */
/*- /*-
* Copyright (c) 1997 The NetBSD Foundation, Inc. * Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -184,10 +184,11 @@ struct ncr53c9x_tinfo {
}; };
/* Look up a lun in a tinfo */ /* Look up a lun in a tinfo */
#define TINFO_LUN(t, l) ( \
#define TINFO_LUN(t, l) ((((l) < NCR_NLUN) && (((t)->lun[(l)]) != NULL)) ? \ (((l) < NCR_NLUN) && (((t)->lun[(l)]) != NULL)) \
((t)->lun[(l)]) : \ ? ((t)->lun[(l)]) \
ncr53c9x_lunsearch((t), (int64_t)(l))) : ncr53c9x_lunsearch((t), (int64_t)(l)) \
)
/* Register a linenumber (for debugging) */ /* Register a linenumber (for debugging) */
#define LOGLINE(p) #define LOGLINE(p)
@ -244,19 +245,19 @@ struct ncr53c9x_softc;
*/ */
struct ncr53c9x_glue { struct ncr53c9x_glue {
/* Mandatory entry points. */ /* Mandatory entry points. */
u_char (*gl_read_reg) __P((struct ncr53c9x_softc *, int)); u_char (*gl_read_reg)(struct ncr53c9x_softc *, int);
void (*gl_write_reg) __P((struct ncr53c9x_softc *, int, u_char)); void (*gl_write_reg)(struct ncr53c9x_softc *, int, u_char);
int (*gl_dma_isintr) __P((struct ncr53c9x_softc *)); int (*gl_dma_isintr)(struct ncr53c9x_softc *);
void (*gl_dma_reset) __P((struct ncr53c9x_softc *)); void (*gl_dma_reset)(struct ncr53c9x_softc *);
int (*gl_dma_intr) __P((struct ncr53c9x_softc *)); int (*gl_dma_intr)(struct ncr53c9x_softc *);
int (*gl_dma_setup) __P((struct ncr53c9x_softc *, int (*gl_dma_setup)(struct ncr53c9x_softc *,
caddr_t *, size_t *, int, size_t *)); caddr_t *, size_t *, int, size_t *);
void (*gl_dma_go) __P((struct ncr53c9x_softc *)); void (*gl_dma_go)(struct ncr53c9x_softc *);
void (*gl_dma_stop) __P((struct ncr53c9x_softc *)); void (*gl_dma_stop)(struct ncr53c9x_softc *);
int (*gl_dma_isactive) __P((struct ncr53c9x_softc *)); int (*gl_dma_isactive)(struct ncr53c9x_softc *);
/* Optional entry points. */ /* Optional entry points. */
void (*gl_clear_latched_intr) __P((struct ncr53c9x_softc *)); void (*gl_clear_latched_intr)(struct ncr53c9x_softc *);
}; };
struct ncr53c9x_softc { struct ncr53c9x_softc {
@ -394,16 +395,16 @@ struct ncr53c9x_softc {
* Macros to read and write the chip's registers. * Macros to read and write the chip's registers.
*/ */
#define NCR_READ_REG(sc, reg) \ #define NCR_READ_REG(sc, reg) \
(*(sc)->sc_glue->gl_read_reg)((sc), (reg)) (*(sc)->sc_glue->gl_read_reg)((sc), (reg))
#define NCR_WRITE_REG(sc, reg, val) \ #define NCR_WRITE_REG(sc, reg, val) \
(*(sc)->sc_glue->gl_write_reg)((sc), (reg), (val)) (*(sc)->sc_glue->gl_write_reg)((sc), (reg), (val))
#ifdef NCR53C9X_DEBUG #ifdef NCR53C9X_DEBUG
#define NCRCMD(sc, cmd) do { \ #define NCRCMD(sc, cmd) do { \
if (ncr53c9x_debug & NCR_SHOWCCMDS) \ if ((ncr53c9x_debug & NCR_SHOWCCMDS) != 0) \
printf("<cmd:0x%x %d>", (unsigned)cmd, __LINE__); \ printf("<cmd:0x%x %d>", (unsigned)cmd, __LINE__); \
sc->sc_lastcmd = cmd; \ sc->sc_lastcmd = cmd; \
NCR_WRITE_REG(sc, NCR_CMD, cmd); \ NCR_WRITE_REG(sc, NCR_CMD, cmd); \
} while (0) } while (0)
#else #else
#define NCRCMD(sc, cmd) NCR_WRITE_REG(sc, NCR_CMD, cmd) #define NCRCMD(sc, cmd) NCR_WRITE_REG(sc, NCR_CMD, cmd)
@ -427,12 +428,12 @@ struct ncr53c9x_softc {
#define ncr53c9x_cpb2stp(sc, cpb) \ #define ncr53c9x_cpb2stp(sc, cpb) \
((250 * (cpb)) / (sc)->sc_freq) ((250 * (cpb)) / (sc)->sc_freq)
void ncr53c9x_attach __P((struct ncr53c9x_softc *, void ncr53c9x_attach(struct ncr53c9x_softc *,
struct scsipi_adapter *, struct scsipi_device *)); struct scsipi_adapter *, struct scsipi_device *);
int ncr53c9x_detach __P((struct ncr53c9x_softc *, int)); int ncr53c9x_detach(struct ncr53c9x_softc *, int);
int ncr53c9x_scsi_cmd __P((struct scsipi_xfer *)); int ncr53c9x_scsi_cmd(struct scsipi_xfer *);
void ncr53c9x_reset __P((struct ncr53c9x_softc *)); void ncr53c9x_reset(struct ncr53c9x_softc *);
int ncr53c9x_intr __P((void *)); int ncr53c9x_intr(void *);
void ncr53c9x_init __P((struct ncr53c9x_softc *, int)); void ncr53c9x_init(struct ncr53c9x_softc *, int);
extern int ncr53c9x_dmaselect; extern int ncr53c9x_dmaselect;