Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata De-__P and use ANSI-style function decls.
details: https://anonhg.NetBSD.org/src/rev/b6c6b1e5bb0d
branches: trunk
changeset: 556345:b6c6b1e5bb0d
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Dec 14 02:45:48 2003 +0000
description:
De-__P and use ANSI-style function decls.
diffstat:
sys/dev/ata/ata.c | 19 +++++---------
sys/dev/ata/ata_wdc.c | 66 +++++++++++++++++---------------------------------
sys/dev/ata/atavar.h | 12 +++-----
3 files changed, 35 insertions(+), 62 deletions(-)
diffs (268 lines):
diff -r 41ad4a39c7be -r b6c6b1e5bb0d sys/dev/ata/ata.c
--- a/sys/dev/ata/ata.c Sun Dec 14 01:40:12 2003 +0000
+++ b/sys/dev/ata/ata.c Sun Dec 14 02:45:48 2003 +0000
@@ -1,4 +1,5 @@
-/* $NetBSD: ata.c,v 1.20 2003/10/08 10:58:12 bouyer Exp $ */
+/* $NetBSD: ata.c,v 1.21 2003/12/14 02:45:48 thorpej Exp $ */
+
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
*
@@ -29,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.20 2003/10/08 10:58:12 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.21 2003/12/14 02:45:48 thorpej Exp $");
#ifndef WDCDEBUG
#define WDCDEBUG
@@ -65,10 +66,8 @@
/* Get the disk's parameters */
int
-ata_get_params(drvp, flags, prms)
- struct ata_drive_datas *drvp;
- u_int8_t flags;
- struct ataparams *prms;
+ata_get_params(struct ata_drive_datas *drvp, u_int8_t flags,
+ struct ataparams *prms)
{
char tb[DEV_BSIZE];
struct wdc_command wdc_c;
@@ -147,10 +146,7 @@
}
int
-ata_set_mode(drvp, mode, flags)
- struct ata_drive_datas *drvp;
- u_int8_t mode;
- u_int8_t flags;
+ata_set_mode(struct ata_drive_datas *drvp, u_int8_t mode, u_int8_t flags)
{
struct wdc_command wdc_c;
@@ -173,8 +169,7 @@
}
void
-ata_dmaerr(drvp, flags)
- struct ata_drive_datas *drvp;
+ata_dmaerr(struct ata_drive_datas *drvp, int flags)
{
/*
* Downgrade decision: if we get NERRS_MAX in NXFER.
diff -r 41ad4a39c7be -r b6c6b1e5bb0d sys/dev/ata/ata_wdc.c
--- a/sys/dev/ata/ata_wdc.c Sun Dec 14 01:40:12 2003 +0000
+++ b/sys/dev/ata/ata_wdc.c Sun Dec 14 02:45:48 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ata_wdc.c,v 1.43 2003/11/27 23:02:40 fvdl Exp $ */
+/* $NetBSD: ata_wdc.c,v 1.44 2003/12/14 02:45:48 thorpej Exp $ */
/*
* Copyright (c) 1998, 2001, 2003 Manuel Bouyer.
@@ -27,7 +27,6 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
*/
/*-
@@ -67,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.43 2003/11/27 23:02:40 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.44 2003/12/14 02:45:48 thorpej Exp $");
#ifndef WDCDEBUG
#define WDCDEBUG
@@ -116,19 +115,19 @@
#define ATA_DELAY 10000 /* 10s for a drive I/O */
-int wdc_ata_bio __P((struct ata_drive_datas*, struct ata_bio*));
-void wdc_ata_bio_start __P((struct channel_softc *,struct wdc_xfer *));
-void _wdc_ata_bio_start __P((struct channel_softc *,struct wdc_xfer *));
-int wdc_ata_bio_intr __P((struct channel_softc *, struct wdc_xfer *, int));
-void wdc_ata_bio_kill_xfer __P((struct channel_softc *,struct wdc_xfer *));
-void wdc_ata_bio_done __P((struct channel_softc *, struct wdc_xfer *));
-int wdc_ata_err __P((struct ata_drive_datas *, struct ata_bio *));
+int wdc_ata_bio(struct ata_drive_datas*, struct ata_bio*);
+void wdc_ata_bio_start(struct channel_softc *,struct wdc_xfer *);
+void _wdc_ata_bio_start(struct channel_softc *,struct wdc_xfer *);
+int wdc_ata_bio_intr(struct channel_softc *, struct wdc_xfer *, int);
+void wdc_ata_bio_kill_xfer(struct channel_softc *,struct wdc_xfer *);
+void wdc_ata_bio_done(struct channel_softc *, struct wdc_xfer *);
+int wdc_ata_err(struct ata_drive_datas *, struct ata_bio *);
#define WDC_ATA_NOERR 0x00 /* Drive doesn't report an error */
#define WDC_ATA_RECOV 0x01 /* There was a recovered error */
#define WDC_ATA_ERR 0x02 /* Drive reports an error */
-int wdc_ata_addref __P((struct ata_drive_datas *));
-void wdc_ata_delref __P((struct ata_drive_datas *));
-void wdc_ata_kill_pending __P((struct ata_drive_datas *));
+int wdc_ata_addref(struct ata_drive_datas *);
+void wdc_ata_delref(struct ata_drive_datas *);
+void wdc_ata_kill_pending(struct ata_drive_datas *);
const struct ata_bustype wdc_ata_bustype = {
SCSIPI_BUSTYPE_ATA,
@@ -141,11 +140,10 @@
wdc_ata_kill_pending,
};
-
/*
* Convert a 32 bit command to a 48 bit command.
*/
-static __inline__
+static __inline
int to48(int cmd32)
{
switch (cmd32) {
@@ -172,9 +170,7 @@
* WDC_TRY_AGAIN. Must be called at splbio().
*/
int
-wdc_ata_bio(drvp, ata_bio)
- struct ata_drive_datas *drvp;
- struct ata_bio *ata_bio;
+wdc_ata_bio(struct ata_drive_datas *drvp, struct ata_bio *ata_bio)
{
struct wdc_xfer *xfer;
struct channel_softc *chp = drvp->chnl_softc;
@@ -201,9 +197,7 @@
}
void
-wdc_ata_bio_start(chp, xfer)
- struct channel_softc *chp;
- struct wdc_xfer *xfer;
+wdc_ata_bio_start(struct channel_softc *chp, struct wdc_xfer *xfer)
{
struct ata_bio *ata_bio = xfer->cmd;
struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
@@ -335,9 +329,7 @@
}
void
-_wdc_ata_bio_start(chp, xfer)
- struct channel_softc *chp;
- struct wdc_xfer *xfer;
+_wdc_ata_bio_start(struct channel_softc *chp, struct wdc_xfer *xfer)
{
int wait_flags = (xfer->c_flags & C_POLL) ? AT_POLL : 0;
struct ata_bio *ata_bio = xfer->cmd;
@@ -578,10 +570,7 @@
}
int
-wdc_ata_bio_intr(chp, xfer, irq)
- struct channel_softc *chp;
- struct wdc_xfer *xfer;
- int irq;
+wdc_ata_bio_intr(struct channel_softc *chp, struct wdc_xfer *xfer, int irq)
{
struct ata_bio *ata_bio = xfer->cmd;
struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
@@ -738,8 +727,7 @@
}
void
-wdc_ata_kill_pending(drvp)
- struct ata_drive_datas *drvp;
+wdc_ata_kill_pending(struct ata_drive_datas *drvp)
{
struct channel_softc *chp = drvp->chnl_softc;
@@ -747,9 +735,7 @@
}
void
-wdc_ata_bio_kill_xfer(chp, xfer)
- struct channel_softc *chp;
- struct wdc_xfer *xfer;
+wdc_ata_bio_kill_xfer(struct channel_softc *chp, struct wdc_xfer *xfer)
{
struct ata_bio *ata_bio = xfer->cmd;
int drive = xfer->drive;
@@ -766,9 +752,7 @@
}
void
-wdc_ata_bio_done(chp, xfer)
- struct channel_softc *chp;
- struct wdc_xfer *xfer;
+wdc_ata_bio_done(struct channel_softc *chp, struct wdc_xfer *xfer)
{
struct ata_bio *ata_bio = xfer->cmd;
int drive = xfer->drive;
@@ -795,9 +779,7 @@
}
int
-wdc_ata_err(drvp, ata_bio)
- struct ata_drive_datas *drvp;
- struct ata_bio *ata_bio;
+wdc_ata_err(struct ata_drive_datas *drvp, struct ata_bio *ata_bio)
{
struct channel_softc *chp = drvp->chnl_softc;
ata_bio->error = 0;
@@ -834,8 +816,7 @@
}
int
-wdc_ata_addref(drvp)
- struct ata_drive_datas *drvp;
+wdc_ata_addref(struct ata_drive_datas *drvp)
{
struct channel_softc *chp = drvp->chnl_softc;
@@ -843,8 +824,7 @@
}
void
-wdc_ata_delref(drvp)
- struct ata_drive_datas *drvp;
+wdc_ata_delref(struct ata_drive_datas *drvp)
{
struct channel_softc *chp = drvp->chnl_softc;
diff -r 41ad4a39c7be -r b6c6b1e5bb0d sys/dev/ata/atavar.h
--- a/sys/dev/ata/atavar.h Sun Dec 14 01:40:12 2003 +0000
+++ b/sys/dev/ata/atavar.h Sun Dec 14 02:45:48 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atavar.h,v 1.29 2003/10/08 10:58:12 bouyer Exp $ */
+/* $NetBSD: atavar.h,v 1.30 2003/12/14 02:45:48 thorpej Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer.
@@ -27,7 +27,6 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
*/
/* Hight-level functions and structures used by both ATA and ATAPI devices */
@@ -183,15 +182,14 @@
int8_t checksum;
} __attribute__((packed));
-int wdc_downgrade_mode __P((struct ata_drive_datas *, int));
+int wdc_downgrade_mode(struct ata_drive_datas *, int);
struct ataparams;
-int ata_get_params __P((struct ata_drive_datas *, u_int8_t,
- struct ataparams *));
-int ata_set_mode __P((struct ata_drive_datas *, u_int8_t, u_int8_t));
+int ata_get_params(struct ata_drive_datas *, u_int8_t, struct ataparams *);
+int ata_set_mode(struct ata_drive_datas *, u_int8_t, u_int8_t);
/* return code for these cmds */
#define CMD_OK 0
#define CMD_ERR 1
#define CMD_AGAIN 2
-void ata_dmaerr __P((struct ata_drive_datas *, int));
+void ata_dmaerr(struct ata_drive_datas *, int);
Home |
Main Index |
Thread Index |
Old Index