- kill sprintf
- fix unused
This commit is contained in:
parent
43ebc39121
commit
42391ab57b
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mq200debug.c,v 1.5 2005/12/11 12:17:33 christos Exp $ */
|
||||
/* $NetBSD: mq200debug.c,v 1.6 2014/03/26 17:53:36 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 TAKEMURA Shin
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#ifdef _KERNEL
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mq200debug.c,v 1.5 2005/12/11 12:17:33 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mq200debug.c,v 1.6 2014/03/26 17:53:36 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -193,11 +193,11 @@ mq200_regname(struct mq200_softc *sc, int offset, char *buf, int bufsize)
|
||||
for (i = 0; i < sizeof(regs)/sizeof(*regs); i++)
|
||||
if (regs[i].base + regs[i].start * 4 <= offset &&
|
||||
offset <= regs[i].base + regs[i].end * 4) {
|
||||
sprintf(buf, "%s%02XR", regs[i].name,
|
||||
snprintf(buf, bufsize, "%s%02XR", regs[i].name,
|
||||
(offset - regs[i].base) / 4);
|
||||
return (buf);
|
||||
}
|
||||
sprintf(buf, "OFFSET %02X", offset);
|
||||
snprintf(buf, bufsize, "OFFSET %02X", offset);
|
||||
return (buf);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: plumpcmcia.c,v 1.26 2012/10/27 17:17:53 chs Exp $ */
|
||||
/* $NetBSD: plumpcmcia.c,v 1.27 2014/03/26 17:53:36 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000 UCHIYAMA Yasushi. All rights reserved.
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: plumpcmcia.c,v 1.26 2012/10/27 17:17:53 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: plumpcmcia.c,v 1.27 2014/03/26 17:53:36 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -213,7 +213,7 @@ plumpcmcia_attach(device_t parent, device_t self, void *aux)
|
||||
struct plum_attach_args *pa = aux;
|
||||
struct plumpcmcia_softc *sc = device_private(self);
|
||||
struct plumpcmcia_handle *ph;
|
||||
int error;
|
||||
int error __diagused;
|
||||
|
||||
sc->sc_dev = self;
|
||||
sc->sc_pc = pa->pa_pc;
|
||||
@ -844,7 +844,6 @@ plum_csc_intr_setup(struct plumpcmcia_softc *sc, struct plumpcmcia_handle *ph,
|
||||
bus_space_tag_t regt = ph->ph_regt;
|
||||
bus_space_handle_t regh = ph->ph_regh;
|
||||
plumreg_t reg;
|
||||
void *ih;
|
||||
|
||||
/* enable CARD DETECT ENABLE only */
|
||||
plum_conf_write(regt, regh, PLUM_PCMCIA_CSCINT,
|
||||
@ -856,7 +855,7 @@ plum_csc_intr_setup(struct plumpcmcia_softc *sc, struct plumpcmcia_handle *ph,
|
||||
plum_conf_write(regt, regh, PLUM_PCMCIA_GLOBALCTRL, reg);
|
||||
|
||||
/* install interrupt handler (don't fail) */
|
||||
ih = plum_intr_establish(sc->sc_pc, irq, IST_EDGE, IPL_TTY,
|
||||
plum_intr_establish(sc->sc_pc, irq, IST_EDGE, IPL_TTY,
|
||||
plum_csc_intr, ph);
|
||||
KASSERT(ih != 0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.118 2014/03/25 13:38:25 christos Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.119 2014/03/26 17:53:36 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 Shin Takemura, All rights reserved.
|
||||
@ -69,7 +69,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.118 2014/03/25 13:38:25 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.119 2014/03/26 17:53:36 christos Exp $");
|
||||
|
||||
#include "opt_vr41xx.h"
|
||||
#include "opt_tx39xx.h"
|
||||
@ -152,7 +152,7 @@ static int __bicons_enable;
|
||||
#endif
|
||||
|
||||
/* the following is used externally (sysctl_hw) */
|
||||
char hpcmips_cpuname[40]; /* set CPU depend xx_init() */
|
||||
static char hpcmips_cpuname[40]; /* set CPU depend xx_init() */
|
||||
|
||||
int cpuspeed = 1; /* approx # instr per usec. */
|
||||
|
||||
@ -458,6 +458,19 @@ mach_init(int argc, char *argv[], struct bootinfo *bi)
|
||||
mips_init_lwp0_uarea();
|
||||
}
|
||||
|
||||
int
|
||||
cpuname_printf(const char *fmt, ...)
|
||||
{
|
||||
int len;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
len = vsnprintf(hpcmips_cpuname, sizeof(hpcmips_cpuname), fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
/*
|
||||
* Machine-dependent startup code.
|
||||
* allocate memory for variable-sized tables, initialize CPU.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* $NetBSD: cpu.h,v 1.13 2010/01/21 01:23:15 pooka Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.14 2014/03/26 17:53:36 christos Exp $ */
|
||||
|
||||
#include <mips/cpu.h>
|
||||
#ifndef _LOCORE
|
||||
extern char hpcmips_cpuname[];
|
||||
int cpuname_printf(const char *, ...) __printflike(1, 2);
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tx39.c,v 1.44 2011/12/02 18:07:26 shattered Exp $ */
|
||||
/* $NetBSD: tx39.c,v 1.45 2014/03/26 17:53:36 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tx39.c,v 1.44 2011/12/02 18:07:26 shattered Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tx39.c,v 1.45 2014/03/26 17:53:36 christos Exp $");
|
||||
|
||||
#include "opt_vr41xx.h"
|
||||
#include "opt_tx39xx.h"
|
||||
@ -120,13 +120,12 @@ tx_init(void)
|
||||
switch (model) {
|
||||
default:
|
||||
/* Unknown TOSHIBA TX39-series */
|
||||
sprintf(hpcmips_cpuname,
|
||||
"Unknown TOSHIBA TX39-series %x", model);
|
||||
cpuname_printf("Unknown TOSHIBA TX39-series %x", model);
|
||||
break;
|
||||
case TMPR3912:
|
||||
tx39clock_cpuspeed(&cpuclock, &cpuspeed);
|
||||
|
||||
sprintf(hpcmips_cpuname, "TOSHIBA TMPR3912 %d.%02d MHz",
|
||||
cpuname_printf("TOSHIBA TMPR3912 %d.%02d MHz",
|
||||
cpuclock / 1000000, (cpuclock % 1000000) / 10000);
|
||||
tc->tc_chipset = __TX391X;
|
||||
break;
|
||||
@ -134,7 +133,7 @@ tx_init(void)
|
||||
tx39clock_cpuspeed(&cpuclock, &cpuspeed);
|
||||
rev = tx_conf_read(tc, TX3922_REVISION_REG);
|
||||
|
||||
sprintf(hpcmips_cpuname, "TOSHIBA TMPR3922 rev. %x.%x "
|
||||
cpuname_printf("TOSHIBA TMPR3922 rev. %x.%x "
|
||||
"%d.%02d MHz", (rev >> 4) & 0xf, rev & 0xf,
|
||||
cpuclock / 1000000, (cpuclock % 1000000) / 10000);
|
||||
tc->tc_chipset = __TX392X;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tx39icu.c,v 1.32 2012/10/27 17:17:54 chs Exp $ */
|
||||
/* $NetBSD: tx39icu.c,v 1.33 2014/03/26 17:53:36 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999-2001 The NetBSD Foundation, Inc.
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tx39icu.c,v 1.32 2012/10/27 17:17:54 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tx39icu.c,v 1.33 2014/03/26 17:53:36 christos Exp $");
|
||||
|
||||
#include "opt_vr41xx.h"
|
||||
#include "opt_tx39xx.h"
|
||||
@ -746,13 +746,13 @@ tx39_intr_dump(struct tx39icu_softc *sc)
|
||||
reg |= (1 << j);
|
||||
}
|
||||
}
|
||||
sprintf(msg, "%d high", i);
|
||||
snprintf(msg, sizeof(msg), "%d high", i);
|
||||
dbg_bit_print_msg(reg, msg);
|
||||
sprintf(msg, "%d status", i);
|
||||
snprintf(msg, sizeof(msg), "%d status", i);
|
||||
dbg_bit_print_msg(sc->sc_regs[i], msg);
|
||||
ofs = TX39_INTRENABLE_REG(i);
|
||||
reg = tx_conf_read(tc, ofs);
|
||||
sprintf(msg, "%d enable", i);
|
||||
snprintf(msg, sizeof(msg), "%d enable", i);
|
||||
dbg_bit_print_msg(reg, msg);
|
||||
}
|
||||
reg = sc->sc_regs[0];
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vr.c,v 1.64 2011/03/18 15:31:38 tsutsui Exp $ */
|
||||
/* $NetBSD: vr.c,v 1.65 2014/03/26 17:53:36 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999-2002
|
||||
@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vr.c,v 1.64 2011/03/18 15:31:38 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vr.c,v 1.65 2014/03/26 17:53:36 christos Exp $");
|
||||
|
||||
#include "opt_vr41xx.h"
|
||||
#include "opt_tx39xx.h"
|
||||
@ -303,14 +303,14 @@ vr_init(void)
|
||||
platform.reboot = vr_reboot;
|
||||
|
||||
#if NVRBCU > 0
|
||||
sprintf(hpcmips_cpuname, "NEC %s rev%d.%d %d.%03dMHz",
|
||||
cpuname_printf("NEC %s rev%d.%d %d.%03dMHz",
|
||||
vrbcu_vrip_getcpuname(),
|
||||
vrbcu_vrip_getcpumajor(),
|
||||
vrbcu_vrip_getcpuminor(),
|
||||
vrbcu_vrip_getcpuclock() / 1000000,
|
||||
(vrbcu_vrip_getcpuclock() % 1000000) / 1000);
|
||||
#else
|
||||
sprintf(hpcmips_cpuname, "NEC VR41xx");
|
||||
cpuname_printf("NEC VR41xx");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vrpmu.c,v 1.19 2012/10/27 17:17:56 chs Exp $ */
|
||||
/* $NetBSD: vrpmu.c,v 1.20 2014/03/26 17:53:36 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 M. Warner Losh. All rights reserved.
|
||||
@ -28,7 +28,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vrpmu.c,v 1.19 2012/10/27 17:17:56 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vrpmu.c,v 1.20 2014/03/26 17:53:36 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -219,14 +219,12 @@ void
|
||||
vrpmu_dump_regs(void *arg)
|
||||
{
|
||||
struct vrpmu_softc *sc = arg;
|
||||
unsigned int intstat1;
|
||||
unsigned int intstat2;
|
||||
unsigned int reg;
|
||||
#if NVRBCU > 0
|
||||
int cpuid;
|
||||
#endif
|
||||
intstat1 = vrpmu_read(sc, PMUINT_REG_W);
|
||||
intstat2 = vrpmu_read(sc, PMUINT2_REG_W);
|
||||
reg = vrpmu_read(sc, PMUINT_REG_W);
|
||||
reg = vrpmu_read(sc, PMUINT2_REG_W);
|
||||
|
||||
/* others? XXXX */
|
||||
reg = vrpmu_read(sc, PMUCNT_REG_W);
|
||||
|
Loading…
x
Reference in New Issue
Block a user