Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Dec 2019 09:19:24 +0000 (UTC)
From:      Ryan Libby <rlibby@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r355704 - stable/12/sys/mips/mips
Message-ID:  <201912130919.xBD9JORN098981@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rlibby
Date: Fri Dec 13 09:19:24 2019
New Revision: 355704
URL: https://svnweb.freebsd.org/changeset/base/355704

Log:
  MFC r355343:
  
    mips busdma: bzero map on alloc

Modified:
  stable/12/sys/mips/mips/busdma_machdep.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/mips/mips/busdma_machdep.c
==============================================================================
--- stable/12/sys/mips/mips/busdma_machdep.c	Fri Dec 13 08:41:37 2019	(r355703)
+++ stable/12/sys/mips/mips/busdma_machdep.c	Fri Dec 13 09:19:24 2019	(r355704)
@@ -155,8 +155,6 @@ struct bus_dmamap {
 	bus_dma_tag_t	dmat;
 	struct memdesc	mem;
 	int		flags;
-	void		*origbuffer;
-	void		*allocbuffer;
 	TAILQ_ENTRY(bus_dmamap)	freelist;
 	STAILQ_ENTRY(bus_dmamap) links;
 	bus_dmamap_callback_t *callback;
@@ -204,11 +202,8 @@ dmamap_ctor(void *mem, int size, void *arg, int flags)
 
 	dmat->map_count++;
 
+	bzero(map, sizeof(*map));
 	map->dmat = dmat;
-	map->flags = 0;
-	map->slist = NULL;
-	map->allocbuffer = NULL;
-	map->sync_count = 0;
 	STAILQ_INIT(&map->bpages);
 
 	return (0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912130919.xBD9JORN098981>