From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNdJQ-0007AH-0z for qemu-devel@nongnu.org; Tue, 17 Feb 2015 03:15:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNdJL-00027J-20 for qemu-devel@nongnu.org; Tue, 17 Feb 2015 03:15:19 -0500 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:51197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNdJK-000273-PU for qemu-devel@nongnu.org; Tue, 17 Feb 2015 03:15:14 -0500 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 17 Feb 2015 08:15:13 -0000 Date: Tue, 17 Feb 2015 09:15:05 +0100 From: Thomas Huth Message-ID: <20150217091505.0db4fab0@oc7435384737.ibm.com> In-Reply-To: <54E26EB0.70308@redhat.com> References: <1424122891-9390-1-git-send-email-thuth@linux.vnet.ibm.com> <1424122891-9390-5-git-send-email-thuth@linux.vnet.ibm.com> <54E26EB0.70308@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/4] block: Remove unused functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-trivial@nongnu.org, Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi , Paolo Bonzini Hi Max, On Mon, 16 Feb 2015 17:26:56 -0500 Max Reitz wrote: > On 2015-02-16 at 16:41, Thomas Huth wrote: > > qemu_try_blockalign0() and nbd_export_close_all() are not > > used anymore and thus can be removed. > > > > Signed-off-by: Thomas Huth > > Cc: Kevin Wolf > > Cc: Stefan Hajnoczi > > Cc: Paolo Bonzini > > --- > > block.c | 11 ----------- > > include/block/block.h | 1 - > > include/block/nbd.h | 1 - > > nbd.c | 9 --------- > > 4 files changed, 0 insertions(+), 22 deletions(-) > > NACK, I'm using nbd_export_close_all() in my "block: Rework > bdrv_close_all()" series. Alright, if it's going to be used again, then it must not be removed, of course. > I'm not so sure about qemu_try_blockalign0(); it has never been used, > but I introduced it because we have qemu_blockalign(), > qemu_try_blockalign(), and qemu_blockalign0() (the latter of which I > introduced along with qemu_try_blockalign0(), and this function is used). > > So I'd be fine with removing qemu_try_blockalign0() again, but I don't > really see the point in doing so. It is not a function that is per-se > deprecated or something, quite the opposite, actually. If people can > make use of that function, they should most certainly do so. I'm not a big fan of providing unused (and likely untested) functions just because they could be used somewhen in a distant future (unless they are part of a proper library) ... I'd rather add such functions again when they are really being used. Anyway, this is just a small, trivial function, and if you prefer to keep it, then please ignore this patch simply completely. There is certainly no urgent need for removing unused functions, I just wanted to make people aware that there are some. Thomas