From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 01:58:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDFA2726 for ; Wed, 15 Oct 2014 01:58:39 +0000 (UTC) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB87F7E6 for ; Wed, 15 Oct 2014 01:58:39 +0000 (UTC) Received: by mail-pd0-f178.google.com with SMTP id y10so326306pdj.9 for ; Tue, 14 Oct 2014 18:58:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=ZVooe5aay+PYihIoy4gA6q2WlKwERd/t21LHi+IVPx4=; b=bK1K6LDrPYkfJ14m/n42kdDAxN/kC9Zae93Dt5iQUTHCiIVTzXcvPRjme4x7GKDDEu QzYA5xJoGWKUqjhGVuezi3AjhQhIbX5m1Dcg9UK0vIw2/3bjWwU+0uypkTwsWv1qRFjx 0EfQM8IxIxEKkprHF81HA9+6YpdzZxBW8OgCnwdE1qdLZrnMmvgtzKbLxVawN6KibU8v 8Eou71neyXH7DnWvP2vrCtPkybg0CiSAIL+B7Ue4ZHVFzd9ZvI5Ta7jwBdn0IAtH2kTY 40JxzFoCg49/+rjKK+V9JpbZZk3GrnqBaBT+8+6MONCMt5FYKdI7+HoDI3nUHo7D9dpO NNqA== X-Gm-Message-State: ALoCoQlRLgUdyK/Z3Zr4fLVqsLedRycDLHxX8LS9H2pg7DceYKRDhbRhMYVJrMfxTF40X8WRbDt2 X-Received: by 10.66.97.39 with SMTP id dx7mr8820023pab.65.1413338318934; Tue, 14 Oct 2014 18:58:38 -0700 (PDT) Received: from [10.64.26.87] (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id xr10sm15577520pab.35.2014.10.14.18.58.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Oct 2014 18:58:38 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_8EB53290-F0AB-4677-A179-00D8AD891ADC"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r273051 - head/sys/dev/isp From: Warner Losh In-Reply-To: <20141015015148.GB1852@funkthat.com> Date: Tue, 14 Oct 2014 19:58:35 -0600 Message-Id: References: <201410131623.s9DGNwj3032294@svn.freebsd.org> <20141015015148.GB1852@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.1878.6) 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 01:58:40 -0000 --Apple-Mail=_8EB53290-F0AB-4677-A179-00D8AD891ADC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 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 >>=20 >> 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. >=20 > Have you audited that there aren't any mallocs or anything else that > needs to be adjusted? i.e. old code that did: > var =3D malloc(sizeof(sns_screq_t) + sizeof(uint16_t) * (cnt - 1)); >=20 > 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=92s a fixed allocation size that=92s independent of the structure size. And they are used in like 3 or 4 places that I could find. Did I miss something? Warner --Apple-Mail=_8EB53290-F0AB-4677-A179-00D8AD891ADC Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUPdTLAAoJEGwc0Sh9sBEAlVsP/2hsYMhJ0F5uylCQYnQKLi0J 42MxyPMKEgWcD5779LIdekjSz7mzLXmJoxul87uwJ9wXYIKQO5gOFItv1eiJCOZn Jj6PHz6S+32IZ29K+LYgii4ujKQuhaVlmiFw1IBShtlTsBMrvbBBvXZR81EAUAFX vJlsKINe6zpVZ+ksLbjEocv2TANlIQqHWgCO+/9azrHd+cHwA1nHYU/3KUnFBrtF Hc2YV/irB2/QlVdSBfv5q/+GrgzL37TFnjIriug4uHpk47rGGaoHXgAbYrxHDRR4 2pLONS3mV4RvByBsOeBTSohLeV0aEFTPOBl7m+1mFFF9h0tWjw8Bdm9tUxvC46o3 79AkTeq3ztoRMVCRG2yxODQcOeHBRYDUGYmCa+G+lCsCpyKt8lNoyH2YOZJ2r0Ks RqSkxkIBZg5kZkrk1fXAfsumh5zpTfOZJT9wD4q4SE6IMVaiQB1LgLWpudS4pRyf W30OQlbdJ0A2ALMn22hVpaSXPt+14fJJBm4Vl0yLo6cw6Nek6VLFfOcFvN0wq3u5 094resIKK3WXEEhuNDg4lhSh+7W7a2whC6/vwTpzGKW09QY+2LF8/AYo7sOQKCGV BcOrEZpM5dwsqQxxAPl+91mDm7KUnSEmdpuSN0IJ24WEJ8NC9ZQNgZUXZN5E03dL 5MqECHAC0Ny1SG3BdWf4 =yy+p -----END PGP SIGNATURE----- --Apple-Mail=_8EB53290-F0AB-4677-A179-00D8AD891ADC--