From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSBD6-000278-TS for qemu-devel@nongnu.org; Thu, 11 Sep 2014 16:43:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSBD2-0004mP-D2 for qemu-devel@nongnu.org; Thu, 11 Sep 2014 16:43:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48456) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSBD2-0004mL-5r for qemu-devel@nongnu.org; Thu, 11 Sep 2014 16:43:16 -0400 Message-ID: <54120960.1060701@redhat.com> Date: Thu, 11 Sep 2014 14:43:12 -0600 From: Eric Blake MIME-Version: 1.0 References: <1410336832-22160-1-git-send-email-armbru@redhat.com> <1410336832-22160-5-git-send-email-armbru@redhat.com> <20140910130803.GE22376@irqsave.net> <87bnqmavbv.fsf@blackfin.pond.sub.org> In-Reply-To: <87bnqmavbv.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="j8XODoxMfNCAGoeQRx96XOtC3g5lmeovD" Subject: Re: [Qemu-devel] [PATCH 04/23] block: Connect BlockBackend and DriveInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , =?UTF-8?B?QmVub8OudCBDYW5ldA==?= Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --j8XODoxMfNCAGoeQRx96XOtC3g5lmeovD Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/11/2014 12:03 PM, Markus Armbruster wrote: > Beno=C3=AEt Canet writes: >=20 >> The Wednesday 10 Sep 2014 =C3=A0 10:13:33 (+0200), Markus Armbruster w= rote : >>> Make the BlockBackend own the DriveInfo. Change blockdev_init() to >>> return the BlockBackend instead of the DriveInfo. >>> >>> Signed-off-by: Markus Armbruster >>> --- >>> +static void drive_info_del(DriveInfo *dinfo); >> >> Is there any technical reason not to just put the >> drive_info_del above the blk_delete function ? >> I don't see any possible circular references between the two. >> >> Some people like Eric frown upon static function prototypes >> in final code that's why I am asking. I dislike it in code I write, and so I point it out in reviews, but I also concede that it is a style, not technical issue, so I will never reject a patch that uses forward declarations if the author thinks that makes the presentation of the overall file easier to follow. >=20 > Placing functions before their callers makes the program easier to read= > when you need to see the functions definition before you can understand= > their use. >=20 > Placing the functions after callers makes the program easier to read > when the gist of what they do is obvious from the call. You're omittin= g > unnecessary detail there, to be flesh it own further down. Saving a > function declaration is immaterial compared to that. >=20 > Before I put the function where I don't want it, I'd inline it :) Then I won't try to convince you to paint the bikeshed any other color. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --j8XODoxMfNCAGoeQRx96XOtC3g5lmeovD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUEglgAAoJEKeha0olJ0Nq1C0H/i32cKKtbwnKND8MVeul9ABM bAuGHJZfRFSSLJgWtJ3O10nBKK6gqw9t569B/8+Wu1EERbyVpEPMqCy/dgnHA9mY 8/XTU4qJNTxbIWLpjzONH50wveeWgtqSrbdtj9YxiKteyhHvoXR4R0CNrj5YEbmL ISdL1I3QM2+OD7UCGJ+92zliOAcycfYSPPWpuKR3OoQ02CIsVMQIlCUJLSPEkvpj ZZq5i+VuK7NvHbuZA5hUPi+uYpaNVwtgnnsJpyT7UHPucfM6iAPGWdhtupqc2Of2 UEBFqPXhAggQHXm9ccdtIu6wwzyyIp51y8wkheTHw7cVyBqiUeZycUiS7q+x0pQ= =TaG6 -----END PGP SIGNATURE----- --j8XODoxMfNCAGoeQRx96XOtC3g5lmeovD--