Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jul 2003 11:45:03 +0200
From:      Stefan Farfeleder <stefan@fafoe.narf.at>
To:        Scott Long <scottl@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/i386/i386 busdma_machdep.c
Message-ID:  <20030731094503.GQ563@wombat.fafoe.narf.at>
In-Reply-To: <200307310534.h6V5YK4B017415@repoman.freebsd.org>
References:  <200307310534.h6V5YK4B017415@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 30, 2003 at 10:34:20PM -0700, Scott Long wrote:

>   Fixing this bug means that s/g lists can be arbitrarily long in length, and
>   also removes an ugly GNU-ism from the code.  No API or ABI change is
>   incurred.  Similar changes for other platforms is forthcoming.

@@ -683,11 +694,6 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, 
 		    int flags)
 {
 	bus_addr_t lastaddr;
-#ifdef __GNUC__
-	bus_dma_segment_t dm_segments[dmat->nsegments];
-#else
-	bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS];
-#endif
 	int nsegs, error, first, i;
 	bus_size_t resid;
 	struct iovec *iov;

This ugly GNU-ism is called a variable length array and was standardised
in C99 (this is just FYI, no objections to the changes).

Regards,
Stefan Farfeleder



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