From: dlg Date: Wed, 7 Jan 2015 04:46:18 +0000 (+0000) Subject: i may as well turn bzero into memset while i am busy not having X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c631d104328af07ff3279796d6e998a1f7dad939;p=openbsd i may as well turn bzero into memset while i am busy not having luck finding my bug. --- diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c index c2319f23019..bdce08253d2 100644 --- a/sys/dev/pci/mfii.c +++ b/sys/dev/pci/mfii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfii.c,v 1.20 2015/01/05 23:18:36 dlg Exp $ */ +/* $OpenBSD: mfii.c,v 1.21 2015/01/07 04:46:18 dlg Exp $ */ /* * Copyright (c) 2012 David Gwynne @@ -487,7 +487,7 @@ mfii_attach(struct device *parent, struct device *self, void *aux) sc->sc_link.adapter_buswidth = sc->sc_info.mci_max_lds; sc->sc_link.pool = &sc->sc_iopool; - bzero(&saa, sizeof(saa)); + memset(&saa, 0, sizeof(saa)); saa.saa_sc_link = &sc->sc_link; config_found(&sc->sc_dev, &saa, scsiprint); @@ -573,7 +573,7 @@ mfii_syspd(struct mfii_softc *sc) link->openings = sc->sc_max_cmds - 1; link->pool = &sc->sc_iopool; - bzero(&saa, sizeof(saa)); + memset(&saa, 0, sizeof(saa)); saa.saa_sc_link = link; sc->sc_pd->pd_scsibus = (struct scsibus_softc *) @@ -1174,7 +1174,7 @@ mfii_initialise_firmware(struct mfii_softc *sc) return (1); iiq = MFII_DMA_KVA(m); - bzero(iiq, sizeof(*iiq)); + memset(iiq, 0, sizeof(*iiq)); iiq->function = MPII_FUNCTION_IOC_INIT; iiq->whoinit = MPII_WHOINIT_HOST_DRIVER; @@ -1600,7 +1600,7 @@ mfii_load_ccb(struct mfii_softc *sc, struct mfii_ccb *ccb, void *sglp, space--; ccb->ccb_sgl_len = (dmap->dm_nsegs - space) * sizeof(*nsge); - bzero(ccb->ccb_sgl, ccb->ccb_sgl_len); + memset(ccb->ccb_sgl, 0, ccb->ccb_sgl_len); ce = nsge + space; ce->sg_addr = htole64(ccb->ccb_sgl_dva); @@ -1663,8 +1663,8 @@ mfii_scrub_ccb(struct mfii_ccb *ccb) ccb->ccb_len = 0; ccb->ccb_sgl_len = 0; - bzero(&ccb->ccb_req, sizeof(ccb->ccb_req)); - bzero(ccb->ccb_request, MFII_REQUEST_SIZE); + memset(&ccb->ccb_req, 0, sizeof(ccb->ccb_req)); + memset(ccb->ccb_request, 0, MFII_REQUEST_SIZE); } void