From 69c5b21cf2da9c2ff6a2d3adf1f48f811feac372 Mon Sep 17 00:00:00 2001 From: Stuart Henderson Date: Sun, 29 Mar 2009 21:53:54 +0000 Subject: make various strings ("can't map mem space" and similar) more consistent between instances, saving space in the kernel. feedback from many (some incorporated, some left for future work). ok deraadt, kettenis, "why not" miod. --- sys/dev/pcmcia/if_cnw.c | 4 ++-- sys/dev/pcmcia/if_malo.c | 36 ++++++++++++++++++------------------ sys/dev/pcmcia/if_wi_pcmcia.c | 6 +++--- sys/dev/pcmcia/wdc_pcmcia.c | 6 +++--- 4 files changed, 26 insertions(+), 26 deletions(-) (limited to 'sys/dev/pcmcia') diff --git a/sys/dev/pcmcia/if_cnw.c b/sys/dev/pcmcia/if_cnw.c index 1589a32d75b..45c127c0782 100644 --- a/sys/dev/pcmcia/if_cnw.c +++ b/sys/dev/pcmcia/if_cnw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cnw.c,v 1.18 2008/10/03 01:41:40 brad Exp $ */ +/* $OpenBSD: if_cnw.c,v 1.19 2009/03/29 21:53:53 sthen Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -401,7 +401,7 @@ cnw_attach(parent, self, aux) if (pcmcia_mem_map(sc->sc_pf, PCMCIA_MEM_COMMON, CNW_MEM_ADDR, CNW_MEM_SIZE, &sc->sc_pcmemh, &sc->sc_memoff, &sc->sc_memwin) != 0) { - printf(": can't map memory\n"); + printf(": can't map mem space\n"); return; } sc->sc_memt = sc->sc_pcmemh.memt; diff --git a/sys/dev/pcmcia/if_malo.c b/sys/dev/pcmcia/if_malo.c index ba2395d7a66..276bbbcdee5 100644 --- a/sys/dev/pcmcia/if_malo.c +++ b/sys/dev/pcmcia/if_malo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_malo.c,v 1.64 2008/10/14 18:01:53 naddy Exp $ */ +/* $OpenBSD: if_malo.c,v 1.65 2009/03/29 21:53:53 sthen Exp $ */ /* * Copyright (c) 2007 Marcus Glocker @@ -169,14 +169,14 @@ malo_pcmcia_attach(struct device *parent, struct device *self, void *aux) /* enable card */ pcmcia_function_init(psc->sc_pf, cfe); if (pcmcia_function_enable(psc->sc_pf)) { - printf(": can't enable function!\n"); + printf(": can't enable function\n"); return; } /* allocate I/O space */ if (pcmcia_io_alloc(psc->sc_pf, 0, cfe->iospace[0].length, cfe->iospace[0].length, &psc->sc_pcioh)) { - printf(": can't allocate i/o space!\n"); + printf(": can't allocate i/o space\n"); pcmcia_function_disable(psc->sc_pf); return; } @@ -184,7 +184,7 @@ malo_pcmcia_attach(struct device *parent, struct device *self, void *aux) /* map I/O space */ if (pcmcia_io_map(psc->sc_pf, PCMCIA_WIDTH_IO16, 0, cfe->iospace[0].length, &psc->sc_pcioh, &psc->sc_io_window)) { - printf(": can't map i/o space!\n"); + printf(": can't map i/o space\n"); pcmcia_io_free(psc->sc_pf, &psc->sc_pcioh); pcmcia_function_disable(psc->sc_pf); return; @@ -198,7 +198,7 @@ malo_pcmcia_attach(struct device *parent, struct device *self, void *aux) psc->sc_ih = pcmcia_intr_establish(psc->sc_pf, IPL_NET, cmalo_intr, sc, sc->sc_dev.dv_xname); if (psc->sc_ih == NULL) { - printf(": can't establish interrupt!\n"); + printf(": can't establish interrupt\n"); return; } intrstr = pcmcia_intr_string(psc->sc_pf, psc->sc_ih); @@ -494,7 +494,7 @@ cmalo_fw_load_helper(struct malo_softc *sc) return (0); if (val8 != MALO_VAL_SCRATCH_READY) { /* bad register value */ - printf("%s: device not ready for FW download!\n", + printf("%s: device not ready for FW download\n", sc->sc_dev.dv_xname); return (EIO); } @@ -525,7 +525,7 @@ cmalo_fw_load_helper(struct malo_softc *sc) delay(1000); } if (i == 50) { - printf("%s: timeout while helper FW block download!\n", + printf("%s: timeout while helper FW block download\n", sc->sc_dev.dv_xname); return (EIO); } @@ -553,7 +553,7 @@ cmalo_fw_load_main(struct malo_softc *sc) delay(1000); } if (i == 10) { - printf("%s: helper FW not loaded!\n", sc->sc_dev.dv_xname); + printf("%s: helper FW not loaded\n", sc->sc_dev.dv_xname); return (EIO); } DPRINTF(1, "%s: helper FW loaded successfully\n", sc->sc_dev.dv_xname); @@ -568,7 +568,7 @@ cmalo_fw_load_main(struct malo_softc *sc) */ if (val16 & 0x0001) { if (retry > MALO_FW_MAIN_MAXRETRY) { - printf("%s: main FW download failed!\n", + printf("%s: main FW download failed\n", sc->sc_dev.dv_xname); return (EIO); } @@ -597,7 +597,7 @@ cmalo_fw_load_main(struct malo_softc *sc) break; } if (i == 5000) { - printf("%s: timeout while main FW block download!\n", + printf("%s: timeout while main FW block download\n", sc->sc_dev.dv_xname); return (EIO); } @@ -613,7 +613,7 @@ cmalo_fw_load_main(struct malo_softc *sc) delay(1000); } if (i == 500) { - printf("%s: main FW not loaded!\n", sc->sc_dev.dv_xname); + printf("%s: main FW not loaded\n", sc->sc_dev.dv_xname); return (EIO); } @@ -755,7 +755,7 @@ cmalo_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) cmalo_cmd_set_scan(sc); if (!sc->sc_net_num) { /* no networks found */ - DPRINTF(1, "%s: no networks found!\n", + DPRINTF(1, "%s: no networks found\n", sc->sc_dev.dv_xname); break; } @@ -930,7 +930,7 @@ cmalo_rx(struct malo_softc *sc) m = m_devget(sc->sc_data + rxdesc->pkgoffset, rxdesc->pkglen, ETHER_ALIGN, ifp, NULL); if (m == NULL) { - DPRINTF(1, "RX m_devget failed!\n"); + DPRINTF(1, "RX m_devget failed\n"); ifp->if_ierrors++; return; } @@ -1094,7 +1094,7 @@ cmalo_select_network(struct malo_softc *sc) } } DPRINTF(1, "%s: desired network not found in scan results " - "(%s)!\n", + "(%s)\n", sc->sc_dev.dv_xname, ic->ic_des_essid); } @@ -1833,7 +1833,7 @@ cmalo_cmd_rsp_assoc(struct malo_softc *sc) body = (struct malo_cmd_body_rsp_assoc *)(hdr + 1); if (body->status) { - DPRINTF(1, "%s: association failed (status %d)!\n", + DPRINTF(1, "%s: association failed (status %d)\n", sc->sc_dev.dv_xname, body->status); sc->sc_flags |= MALO_ASSOC_FAILED; } else @@ -2008,7 +2008,7 @@ cmalo_cmd_request(struct malo_softc *sc, uint16_t psize, int no_response) /* wait for the command response */ if (tsleep(sc, 0, "malocmd", 500)) { - printf("%s: timeout while waiting for cmd response!\n", + printf("%s: timeout while waiting for cmd response\n", sc->sc_dev.dv_xname); return (EIO); } @@ -2053,7 +2053,7 @@ cmalo_cmd_response(struct malo_softc *sc) /* check for a valid command response */ if (!(hdr->cmd & MALO_CMD_RESP)) { - printf("%s: got invalid command response (0x%04x)!\n", + printf("%s: got invalid command response (0x%04x)\n", sc->sc_dev.dv_xname, hdr->cmd); splx(s); return (EIO); @@ -2151,7 +2151,7 @@ cmalo_cmd_response(struct malo_softc *sc) sc->sc_dev.dv_xname); break; default: - printf("%s: got unknown cmd response (0x%04x)!\n", + printf("%s: got unknown cmd response (0x%04x)\n", sc->sc_dev.dv_xname, hdr->cmd); break; } diff --git a/sys/dev/pcmcia/if_wi_pcmcia.c b/sys/dev/pcmcia/if_wi_pcmcia.c index b06e43267b9..544d3c829ee 100644 --- a/sys/dev/pcmcia/if_wi_pcmcia.c +++ b/sys/dev/pcmcia/if_wi_pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi_pcmcia.c,v 1.66 2006/11/26 19:46:28 deraadt Exp $ */ +/* $OpenBSD: if_wi_pcmcia.c,v 1.67 2009/03/29 21:53:53 sthen Exp $ */ /* $NetBSD: if_wi_pcmcia.c,v 1.14 2001/11/26 04:34:56 ichiro Exp $ */ /* @@ -399,7 +399,7 @@ wi_pcmcia_attach(struct device *parent, struct device *self, void *aux) if (pcmcia_io_map(pf, PCMCIA_WIDTH_IO16, 0, WI_IOSIZ, &psc->sc_pcioh, &psc->sc_io_window)) { - printf(": can't map io space\n"); + printf(": can't map i/o space\n"); goto bad; } state++; @@ -420,7 +420,7 @@ wi_pcmcia_attach(struct device *parent, struct device *self, void *aux) sc->sc_ih = pcmcia_intr_establish(pa->pf, IPL_NET, wi_intr, psc, sc->sc_dev.dv_xname); if (sc->sc_ih == NULL) { - printf("%s: couldn't establish interrupt\n", + printf("%s: can't establish interrupt\n", sc->sc_dev.dv_xname); goto bad; } diff --git a/sys/dev/pcmcia/wdc_pcmcia.c b/sys/dev/pcmcia/wdc_pcmcia.c index 7ddc5b6deff..945c4953d98 100644 --- a/sys/dev/pcmcia/wdc_pcmcia.c +++ b/sys/dev/pcmcia/wdc_pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc_pcmcia.c,v 1.18 2008/06/26 05:42:17 ray Exp $ */ +/* $OpenBSD: wdc_pcmcia.c,v 1.19 2009/03/29 21:53:53 sthen Exp $ */ /* $NetBSD: wdc_pcmcia.c,v 1.19 1999/02/19 21:49:43 abs Exp $ */ /*- @@ -309,7 +309,7 @@ wdc_pcmcia_attach(parent, self, aux) if (pcmcia_io_map(pa->pf, quirks & WDC_PCMCIA_FORCE_16BIT_IO ? PCMCIA_WIDTH_IO16 : PCMCIA_WIDTH_AUTO, 0, sc->sc_pioh.size, &sc->sc_pioh, &sc->sc_iowindow)) { - printf(": can't map first I/O space\n"); + printf(": can't map first i/o space\n"); goto iomap_failed; } @@ -322,7 +322,7 @@ wdc_pcmcia_attach(parent, self, aux) sc->sc_auxiowindow = -1; else if (pcmcia_io_map(pa->pf, PCMCIA_WIDTH_AUTO, 0, sc->sc_auxpioh.size, &sc->sc_auxpioh, &sc->sc_auxiowindow)) { - printf(": can't map second I/O space\n"); + printf(": can't map second i/o space\n"); goto iomapaux_failed; } -- cgit v1.2.3