cvs commit: src/sys/i386/i386 busdma_machdep.c

Stefan Farfeleder stefan at fafoe.narf.at
Thu Jul 31 02:45:08 PDT 2003


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


More information about the cvs-src mailing list