From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 02:00:17 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7BF8872; Wed, 15 Oct 2014 02:00:17 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 96EA07F2; Wed, 15 Oct 2014 02:00:17 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s9F20FGo038048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Oct 2014 19:00:15 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s9F20FSp038047; Tue, 14 Oct 2014 19:00:15 -0700 (PDT) (envelope-from jmg) Date: Tue, 14 Oct 2014 19:00:15 -0700 From: John-Mark Gurney To: Warner Losh Subject: Re: svn commit: r273051 - head/sys/dev/isp Message-ID: <20141015020015.GC1852@funkthat.com> References: <201410131623.s9DGNwj3032294@svn.freebsd.org> <20141015015148.GB1852@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Tue, 14 Oct 2014 19:00:15 -0700 (PDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Oct 2014 02:00:18 -0000 Warner Losh wrote this message on Tue, Oct 14, 2014 at 19:58 -0600: > On Oct 14, 2014, at 7:51 PM, John-Mark Gurney wrote: > > > Warner Losh wrote this message on Mon, Oct 13, 2014 at 16:23 +0000: > >> Author: imp > >> Date: Mon Oct 13 16:23:58 2014 > >> New Revision: 273051 > >> URL: https://svnweb.freebsd.org/changeset/base/273051 > >> > >> Log: > >> Use the C99 flexible array construct to denote a variable amount of > >> data rather than the old-school [1] construct. We have required c99 > >> compilers for some time. > > > > Have you audited that there aren't any mallocs or anything else that > > needs to be adjusted? i.e. old code that did: > > var = malloc(sizeof(sns_screq_t) + sizeof(uint16_t) * (cnt - 1)); > > > > Will now allocate too few bytes... > > I audited it. These structures are never malloced and only used to > describe structures that are passed back and forth to the firmware. > When used in host memory, there?s a fixed allocation size that?s > independent of the structure size. And they are used in like 3 or 4 > places that I could find. > > Did I miss something? I looked briefly, but didn't see anything... I just wanted to make sure since it wasn't mentioned in the commit message... Thanks. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."