g/u_int[0-9]*_t/ s/u_int/uint/g

This commit is contained in:
matt 2014-09-10 07:04:48 +00:00
parent abd67352bb
commit 50ba60c0f2
6 changed files with 75 additions and 75 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ata.c,v 1.131 2014/07/25 08:10:36 dholland Exp $ */
/* $NetBSD: ata.c,v 1.132 2014/09/10 07:04:48 matt Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.131 2014/07/25 08:10:36 dholland Exp $");
__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.132 2014/09/10 07:04:48 matt Exp $");
#include "opt_ata.h"
@ -724,7 +724,7 @@ atabus_free_drives(struct ata_channel *chp)
/* Get the disk's parameters */
int
ata_get_params(struct ata_drive_datas *drvp, u_int8_t flags,
ata_get_params(struct ata_drive_datas *drvp, uint8_t flags,
struct ataparams *prms)
{
struct ata_command ata_c;
@ -732,7 +732,7 @@ ata_get_params(struct ata_drive_datas *drvp, u_int8_t flags,
struct atac_softc *atac = chp->ch_atac;
char *tb;
int i, rv;
u_int16_t *p;
uint16_t *p;
ATADEBUG_PRINT(("%s\n", __func__), DEBUG_FUNCS);
@ -806,15 +806,15 @@ ata_get_params(struct ata_drive_datas *drvp, u_int8_t flags,
}
#undef M
for (i = 0; i < sizeof(prms->atap_model); i += 2) {
p = (u_int16_t *)(prms->atap_model + i);
p = (uint16_t *)(prms->atap_model + i);
*p = bswap16(*p);
}
for (i = 0; i < sizeof(prms->atap_serial); i += 2) {
p = (u_int16_t *)(prms->atap_serial + i);
p = (uint16_t *)(prms->atap_serial + i);
*p = bswap16(*p);
}
for (i = 0; i < sizeof(prms->atap_revision); i += 2) {
p = (u_int16_t *)(prms->atap_revision + i);
p = (uint16_t *)(prms->atap_revision + i);
*p = bswap16(*p);
}
@ -825,7 +825,7 @@ ata_get_params(struct ata_drive_datas *drvp, u_int8_t flags,
}
int
ata_set_mode(struct ata_drive_datas *drvp, u_int8_t mode, u_int8_t flags)
ata_set_mode(struct ata_drive_datas *drvp, uint8_t mode, uint8_t flags)
{
struct ata_command ata_c;
struct ata_channel *chp = drvp->chnl_softc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ata_raidreg.h,v 1.8 2008/09/11 11:08:50 tron Exp $ */
/* $NetBSD: ata_raidreg.h,v 1.9 2014/09/10 07:04:48 matt Exp $ */
/*-
* Copyright (c) 2000,2001,2002 Søren Schmidt <sos@FreeBSD.org>
@ -207,30 +207,30 @@ struct via_raid_conf {
#define NVIDIA_LBA(wd) ((wd)->sc_capacity - 2)
struct nvidia_raid_conf {
u_int8_t nvidia_id[8];
uint8_t nvidia_id[8];
#define NV_MAGIC "NVIDIA "
u_int32_t config_size;
u_int32_t checksum;
u_int16_t version;
u_int8_t disk_number;
u_int8_t dummy_0;
u_int32_t total_sectors;
u_int32_t sector_size;
u_int8_t serial[16];
u_int8_t revision[4];
u_int32_t dummy_1;
uint32_t config_size;
uint32_t checksum;
uint16_t version;
uint8_t disk_number;
uint8_t dummy_0;
uint32_t total_sectors;
uint32_t sector_size;
uint8_t serial[16];
uint8_t revision[4];
uint32_t dummy_1;
u_int32_t magic_0;
uint32_t magic_0;
#define NV_MAGIC0 0x00640044
u_int64_t magic_1;
u_int64_t magic_2;
u_int8_t flags;
u_int8_t array_width;
u_int8_t total_disks;
u_int8_t dummy_2;
u_int16_t type;
uint64_t magic_1;
uint64_t magic_2;
uint8_t flags;
uint8_t array_width;
uint8_t total_disks;
uint8_t dummy_2;
uint16_t type;
#define NV_T_RAID0 0x00000080
#define NV_T_RAID1 0x00000081
#define NV_T_RAID3 0x00000083
@ -238,21 +238,21 @@ struct nvidia_raid_conf {
#define NV_T_RAID01 0x00008180
#define NV_T_SPAN 0x000000ff
u_int16_t dummy_3;
u_int32_t stripe_sectors;
u_int32_t stripe_bytes;
u_int32_t stripe_shift;
u_int32_t stripe_mask;
u_int32_t stripe_sizesectors;
u_int32_t stripe_sizebytes;
u_int32_t rebuild_lba;
u_int32_t dummy_4;
u_int32_t dummy_5;
u_int32_t status;
uint16_t dummy_3;
uint32_t stripe_sectors;
uint32_t stripe_bytes;
uint32_t stripe_shift;
uint32_t stripe_mask;
uint32_t stripe_sizesectors;
uint32_t stripe_sizebytes;
uint32_t rebuild_lba;
uint32_t dummy_4;
uint32_t dummy_5;
uint32_t status;
#define NV_S_BOOTABLE 0x00000001
#define NV_S_DEGRADED 0x00000002
u_int32_t filler[98];
uint32_t filler[98];
} __packed;
/* JMicron Technology Corp Metadata */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ata_wdc.c,v 1.103 2013/02/03 20:13:27 jakllsch Exp $ */
/* $NetBSD: ata_wdc.c,v 1.104 2014/09/10 07:04:48 matt Exp $ */
/*
* Copyright (c) 1998, 2001, 2003 Manuel Bouyer.
@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.103 2013/02/03 20:13:27 jakllsch Exp $");
__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.104 2014/09/10 07:04:48 matt Exp $");
#include "opt_ata.h"
#include "opt_wdc.h"
@ -335,8 +335,8 @@ _wdc_ata_bio_start(struct ata_channel *chp, struct ata_xfer *xfer)
struct ata_bio *ata_bio = xfer->c_cmd;
struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive];
int wait_flags = (xfer->c_flags & C_POLL) ? AT_POLL : 0;
u_int16_t cyl;
u_int8_t head, sect, cmd = 0;
uint16_t cyl;
uint8_t head, sect, cmd = 0;
int nblks;
#if NATA_DMA || NATA_PIOBM
int error, dma_flags = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: atavar.h,v 1.91 2013/04/03 17:15:07 bouyer Exp $ */
/* $NetBSD: atavar.h,v 1.92 2014/09/10 07:04:48 matt Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer.
@ -108,9 +108,9 @@ struct ataparams;
/* Datas common to drives and controller drivers */
struct ata_drive_datas {
u_int8_t drive; /* drive number */
uint8_t drive; /* drive number */
int8_t ata_vers; /* ATA version supported */
u_int16_t drive_flags; /* bitmask for drives present/absent and cap */
uint16_t drive_flags; /* bitmask for drives present/absent and cap */
#define ATA_DRIVE_CAP32 0x0001
#define ATA_DRIVE_DMA 0x0002
#define ATA_DRIVE_UDMA 0x0004
@ -132,20 +132,20 @@ struct ata_drive_datas {
* Is initialised by the disks drivers at attach time, and may be
* changed later by the controller's code if needed
*/
u_int8_t PIO_mode; /* Current setting of drive's PIO mode */
uint8_t PIO_mode; /* Current setting of drive's PIO mode */
#if NATA_DMA
u_int8_t DMA_mode; /* Current setting of drive's DMA mode */
uint8_t DMA_mode; /* Current setting of drive's DMA mode */
#if NATA_UDMA
u_int8_t UDMA_mode; /* Current setting of drive's UDMA mode */
uint8_t UDMA_mode; /* Current setting of drive's UDMA mode */
#endif
#endif
/* Supported modes for this drive */
u_int8_t PIO_cap; /* supported drive's PIO mode */
uint8_t PIO_cap; /* supported drive's PIO mode */
#if NATA_DMA
u_int8_t DMA_cap; /* supported drive's DMA mode */
uint8_t DMA_cap; /* supported drive's DMA mode */
#if NATA_UDMA
u_int8_t UDMA_cap; /* supported drive's UDMA mode */
uint8_t UDMA_cap; /* supported drive's UDMA mode */
#endif
#endif
@ -153,15 +153,15 @@ struct ata_drive_datas {
* Drive state.
* This is reset to 0 after a channel reset.
*/
u_int8_t state;
uint8_t state;
#define RESET 0
#define READY 1
#if NATA_DMA
/* numbers of xfers and DMA errs. Used by ata_dmaerr() */
u_int8_t n_dmaerrs;
u_int32_t n_xfers;
uint8_t n_dmaerrs;
uint32_t n_xfers;
/* Downgrade after NERRS_MAX errors in at most NXFER xfers */
#define NERRS_MAX 4
@ -192,7 +192,7 @@ struct ata_drive_datas {
* Parameters/state needed by the controller to perform an ATA bio.
*/
struct ata_bio {
volatile u_int16_t flags;/* cmd flags */
volatile uint16_t flags;/* cmd flags */
/* 0x0001 free, was ATA_NOSLEEP */
#define ATA_POLL 0x0002 /* poll for completion */
#define ATA_ITSDONE 0x0004 /* the transfer is as done as it gets */
@ -217,7 +217,7 @@ struct ata_bio {
#define TIMEOUT 4 /* device timed out */
#define ERR_NODEV 5 /* device has been gone */
#define ERR_RESET 6 /* command was terminated by channel reset */
u_int8_t r_error;/* copy of error register */
uint8_t r_error;/* copy of error register */
daddr_t badsect[127];/* 126 plus trailing -1 marker */
};
@ -296,7 +296,7 @@ struct ata_bustype {
#define ATACMD_QUEUED 0x02
#define ATACMD_TRY_AGAIN 0x03
int (*ata_get_params)(struct ata_drive_datas *, u_int8_t,
int (*ata_get_params)(struct ata_drive_datas *, uint8_t,
struct ataparams *);
int (*ata_addref)(struct ata_drive_datas *);
void (*ata_delref)(struct ata_drive_datas *);
@ -337,8 +337,8 @@ struct ata_channel {
#define ATACH_TH_RUN 0x100 /* the kernel thread is working */
#define ATACH_TH_RESET 0x200 /* someone ask the thread to reset */
#define ATACH_TH_RESCAN 0x400 /* rescan requested */
u_int8_t ch_status; /* copy of status register */
u_int8_t ch_error; /* copy of error register */
uint8_t ch_status; /* copy of status register */
uint8_t ch_error; /* copy of error register */
/* for the reset callback */
int ch_reset_flags;
@ -435,8 +435,8 @@ int atabus_alloc_drives(struct ata_channel *, int);
void atabus_free_drives(struct ata_channel *);
struct ataparams;
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);
int ata_get_params(struct ata_drive_datas *, uint8_t, struct ataparams *);
int ata_set_mode(struct ata_drive_datas *, uint8_t, uint8_t);
/* return code for these cmds */
#define CMD_OK 0
#define CMD_ERR 1

View File

@ -1,4 +1,4 @@
/* $NetBSD: wd.c,v 1.412 2014/08/10 16:44:35 tls Exp $ */
/* $NetBSD: wd.c,v 1.413 2014/09/10 07:04:48 matt Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.412 2014/08/10 16:44:35 tls Exp $");
__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.413 2014/09/10 07:04:48 matt Exp $");
#include "opt_ata.h"
@ -194,7 +194,7 @@ void wdstart(void *);
void wdstart1(struct wd_softc*, struct buf *);
void wdrestart(void *);
void wddone(void *);
int wd_get_params(struct wd_softc *, u_int8_t, struct ataparams *);
int wd_get_params(struct wd_softc *, uint8_t, struct ataparams *);
int wd_flushcache(struct wd_softc *, int);
int wd_trim(struct wd_softc *, int, daddr_t, long);
bool wd_shutdown(device_t, int);
@ -368,10 +368,10 @@ wdattach(device_t parent, device_t self, void *aux)
if ((wd->sc_flags & WDF_LBA48) != 0) {
aprint_verbose(" LBA48 addressing\n");
wd->sc_capacity =
((u_int64_t) wd->sc_params.atap_max_lba[3] << 48) |
((u_int64_t) wd->sc_params.atap_max_lba[2] << 32) |
((u_int64_t) wd->sc_params.atap_max_lba[1] << 16) |
((u_int64_t) wd->sc_params.atap_max_lba[0] << 0);
((uint64_t) wd->sc_params.atap_max_lba[3] << 48) |
((uint64_t) wd->sc_params.atap_max_lba[2] << 32) |
((uint64_t) wd->sc_params.atap_max_lba[1] << 16) |
((uint64_t) wd->sc_params.atap_max_lba[0] << 0);
wd->sc_capacity28 =
(wd->sc_params.atap_capacity[1] << 16) |
wd->sc_params.atap_capacity[0];
@ -1221,7 +1221,7 @@ wdioctl(dev_t dev, u_long xfer, void *addr, int flag, struct lwp *l)
#ifdef WD_SOFTBADSECT
case DIOCBSLIST :
{
u_int32_t count, missing, skip;
uint32_t count, missing, skip;
struct disk_badsecinfo dbsi;
struct disk_badsectors *dbs;
size_t available;
@ -1798,7 +1798,7 @@ wd_params_to_properties(struct wd_softc *wd, struct ataparams *params)
}
int
wd_get_params(struct wd_softc *wd, u_int8_t flags, struct ataparams *params)
wd_get_params(struct wd_softc *wd, uint8_t flags, struct ataparams *params)
{
switch (wd->atabus->ata_get_params(wd->drvp, flags, params)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: wdvar.h,v 1.40 2012/02/02 19:43:02 tls Exp $ */
/* $NetBSD: wdvar.h,v 1.41 2014/09/10 07:04:48 matt Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer.
@ -59,8 +59,8 @@ struct wd_softc {
#define WDF_LBA 0x040 /* using LBA mode */
#define WDF_KLABEL 0x080 /* retain label after 'full' close */
#define WDF_LBA48 0x100 /* using 48-bit LBA mode */
u_int64_t sc_capacity; /* full capacity of the device */
u_int32_t sc_capacity28; /* capacity accessible with LBA28 commands */
uint64_t sc_capacity; /* full capacity of the device */
uint32_t sc_capacity28; /* capacity accessible with LBA28 commands */
int retries; /* number of xfer retry */