- remove bogus casts

- add more const
This commit is contained in:
christos 2005-05-30 04:25:32 +00:00
parent a9cf21849d
commit a984bbf91a
8 changed files with 29 additions and 30 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ch.c,v 1.70 2005/04/25 17:52:30 drochner Exp $ */
/* $NetBSD: ch.c,v 1.71 2005/05/30 04:25:32 christos Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.70 2005/04/25 17:52:30 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.71 2005/05/30 04:25:32 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1236,13 +1236,12 @@ ch_get_params(struct ch_softc *sc, int scsiflags)
static void
ch_get_quirks(struct ch_softc *sc, struct scsipi_inquiry_pattern *inqbuf)
{
struct chquirk *match;
const struct chquirk *match;
int priority;
sc->sc_settledelay = 0;
match = (struct chquirk *)scsipi_inqmatch(inqbuf,
(caddr_t)chquirks,
match = scsipi_inqmatch(inqbuf, chquirks,
sizeof(chquirks) / sizeof(chquirks[0]),
sizeof(chquirks[0]), &priority);
if (priority != 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: scsiconf.c,v 1.229 2005/02/27 00:27:48 perry Exp $ */
/* $NetBSD: scsiconf.c,v 1.230 2005/05/30 04:25:32 christos Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.229 2005/02/27 00:27:48 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.230 2005/05/30 04:25:32 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -735,7 +735,7 @@ scsi_probe_device(struct scsibus_softc *sc, int target, int lun)
struct scsipi_channel *chan = sc->sc_channel;
struct scsipi_periph *periph;
struct scsipi_inquiry_data inqbuf;
struct scsi_quirk_inquiry_pattern *finger;
const struct scsi_quirk_inquiry_pattern *finger;
int checkdtype, priority, docontinue, quirks;
struct scsipibus_attach_args sa;
struct cfdata *cf;
@ -876,8 +876,8 @@ scsi_probe_device(struct scsibus_softc *sc, int target, int lun)
sa.scsipi_info.scsi_version = inqbuf.version;
sa.sa_inqptr = &inqbuf;
finger = (struct scsi_quirk_inquiry_pattern *)scsipi_inqmatch(
&sa.sa_inqbuf, (caddr_t)scsi_quirk_patterns,
finger = scsipi_inqmatch(
&sa.sa_inqbuf, scsi_quirk_patterns,
sizeof(scsi_quirk_patterns)/sizeof(scsi_quirk_patterns[0]),
sizeof(scsi_quirk_patterns[0]), &priority);

View File

@ -1,4 +1,4 @@
/* $NetBSD: scsipiconf.c,v 1.32 2005/05/29 22:00:50 christos Exp $ */
/* $NetBSD: scsipiconf.c,v 1.33 2005/05/30 04:25:32 christos Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: scsipiconf.c,v 1.32 2005/05/29 22:00:50 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: scsipiconf.c,v 1.33 2005/05/30 04:25:32 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -231,7 +231,7 @@ scsipi_dtype(int type)
}
void
scsipi_strvis(u_char *dst, int dlen, u_char *src, int slen)
scsipi_strvis(u_char *dst, int dlen, const u_char *src, int slen)
{
/* Trim leading and trailing blanks and NULs. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: scsipiconf.h,v 1.99 2005/05/29 22:00:50 christos Exp $ */
/* $NetBSD: scsipiconf.h,v 1.100 2005/05/30 04:25:32 christos Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2004 The NetBSD Foundation, Inc.
@ -636,7 +636,7 @@ void scsipi_create_completion_thread(void *);
const void *scsipi_inqmatch(struct scsipi_inquiry_pattern *, const void *,
size_t, size_t, int *);
const char *scsipi_dtype(int);
void scsipi_strvis(u_char *, int, u_char *, int);
void scsipi_strvis(u_char *, int, const u_char *, int);
int scsipi_execute_xs(struct scsipi_xfer *);
u_int64_t scsipi_size(struct scsipi_periph *, int);
int scsipi_test_unit_ready(struct scsipi_periph *, int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ses.c,v 1.30 2005/02/27 00:27:48 perry Exp $ */
/* $NetBSD: ses.c,v 1.31 2005/05/30 04:25:32 christos Exp $ */
/*
* Copyright (C) 2000 National Aeronautics & Space Administration
* All rights reserved.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ses.c,v 1.30 2005/02/27 00:27:48 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: ses.c,v 1.31 2005/05/30 04:25:32 christos Exp $");
#include "opt_scsi.h"
@ -214,7 +214,7 @@ ses_match(struct device *parent, struct cfdata *match, void *aux)
static void
ses_attach(struct device *parent, struct device *self, void *aux)
{
char *tname;
const char *tname;
struct ses_softc *softc = (void *)self;
struct scsipibus_attach_args *sa = aux;
struct scsipi_periph *periph = sa->sa_periph;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ss.c,v 1.60 2005/03/31 11:28:53 yamt Exp $ */
/* $NetBSD: ss.c,v 1.61 2005/05/30 04:25:32 christos Exp $ */
/*
* Copyright (c) 1995 Kenneth Stailey. All rights reserved.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ss.c,v 1.60 2005/03/31 11:28:53 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: ss.c,v 1.61 2005/05/30 04:25:32 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -129,7 +129,7 @@ ssmatch(struct device *parent, struct cfdata *match, void *aux)
int priority;
(void)scsipi_inqmatch(&sa->sa_inqbuf,
(caddr_t)ss_patterns, sizeof(ss_patterns) / sizeof(ss_patterns[0]),
ss_patterns, sizeof(ss_patterns) / sizeof(ss_patterns[0]),
sizeof(ss_patterns[0]), &priority);
return (priority);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ss_scanjet.c,v 1.41 2005/02/27 00:27:48 perry Exp $ */
/* $NetBSD: ss_scanjet.c,v 1.42 2005/05/30 04:25:32 christos Exp $ */
/*
* Copyright (c) 1995 Kenneth Stailey. All rights reserved.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ss_scanjet.c,v 1.41 2005/02/27 00:27:48 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: ss_scanjet.c,v 1.42 2005/05/30 04:25:32 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -315,7 +315,7 @@ scanjet_read(struct ss_softc *ss, struct buf *bp)
* Do a synchronous write. Used to send control messages.
*/
static int
scanjet_ctl_write(struct ss_softc *ss, char *buf, u_int size)
scanjet_ctl_write(struct ss_softc *ss, char *tbuf, u_int size)
{
struct scsi_rw_scanner cmd;
int flags;
@ -329,7 +329,7 @@ scanjet_ctl_write(struct ss_softc *ss, char *buf, u_int size)
_lto3b(size, cmd.len);
return (scsipi_command(ss->sc_periph,
(void *)&cmd, sizeof(cmd), (void *)buf, size, 0, 100000, NULL,
(void *)&cmd, sizeof(cmd), (void *)tbuf, size, 0, 100000, NULL,
flags | XS_CTL_DATA_OUT | XS_CTL_DATA_ONSTACK));
}
@ -338,7 +338,7 @@ scanjet_ctl_write(struct ss_softc *ss, char *buf, u_int size)
* Do a synchronous read. Used to read responses to control messages.
*/
static int
scanjet_ctl_read(struct ss_softc *ss, char *buf, u_int size)
scanjet_ctl_read(struct ss_softc *ss, char *tbuf, u_int size)
{
struct scsi_rw_scanner cmd;
int flags;
@ -352,7 +352,7 @@ scanjet_ctl_read(struct ss_softc *ss, char *buf, u_int size)
_lto3b(size, cmd.len);
return (scsipi_command(ss->sc_periph,
(void *)&cmd, sizeof(cmd), (void *)buf, size, 0, 100000, NULL,
(void *)&cmd, sizeof(cmd), (void *)tbuf, size, 0, 100000, NULL,
flags | XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK));
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: st_scsi.c,v 1.21 2005/02/27 00:27:48 perry Exp $ */
/* $NetBSD: st_scsi.c,v 1.22 2005/05/30 04:25:32 christos Exp $ */
/*-
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: st_scsi.c,v 1.21 2005/02/27 00:27:48 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: st_scsi.c,v 1.22 2005/05/30 04:25:32 christos Exp $");
#include "opt_scsi.h"
#include "rnd.h"
@ -100,7 +100,7 @@ st_scsibus_match(struct device *parent, struct cfdata *match, void *aux)
return (0);
(void)scsipi_inqmatch(&sa->sa_inqbuf,
(caddr_t)st_scsibus_patterns,
st_scsibus_patterns,
sizeof(st_scsibus_patterns)/sizeof(st_scsibus_patterns[0]),
sizeof(st_scsibus_patterns[0]), &priority);
return (priority);