From patchwork Sun Dec 29 20:13:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 3416851 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 61892C02DD for ; Sun, 29 Dec 2013 20:13:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8CA2C2010B for ; Sun, 29 Dec 2013 20:13:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A5F8C20107 for ; Sun, 29 Dec 2013 20:13:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752329Ab3L2UNh (ORCPT ); Sun, 29 Dec 2013 15:13:37 -0500 Received: from mail-pb0-f43.google.com ([209.85.160.43]:57388 "EHLO mail-pb0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752268Ab3L2UNY (ORCPT ); Sun, 29 Dec 2013 15:13:24 -0500 Received: by mail-pb0-f43.google.com with SMTP id rq2so10922043pbb.2 for ; Sun, 29 Dec 2013 12:13:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=/PEv5uY3aiZo0j3sWx1gQ3kF4CYdjUOEEwIBpsPXGnc=; b=QRBESWdtw74ERrldeFpC2UAJ7auIkWQHoHfEqY5muaWnyQ3T3agobNGWNb/y70mmww 5WvMKGv3wFTE5hjUhyA31OYDavczEmJvIhSdQEETtv3iilE+JrE6LzFH+KFRlo8aLw6R CxfZXUj/bZFW3anh/y/KZFUPdcahn3CEg79BbBOd0qu+AL5RrfvLt8wuyFbClxt0Btmi RGISdCyXxBavqK3KCqZHz5PRtnxL5ecTb60yxfjhOtF+a/9Jqmo9QlQo2m5Njl2WYpWh 5+wa+VhHknMFz3wJVbIz8t5QzdQO00FXskY1l1r31AakPRndifmiD89DFsOdF5M1c6dQ vBtg== X-Gm-Message-State: ALoCoQl3/07MFR4CDxkfWVSIyxeDfz8DJs6FrTVrJnaaK5xvdIiaujLuaiGR27x2KB8E8OMseurs X-Received: by 10.68.254.164 with SMTP id aj4mr26913pbd.161.1388348003484; Sun, 29 Dec 2013 12:13:23 -0800 (PST) Received: from nehalam.linuxnetplumber.net (static-50-53-83-51.bvtn.or.frontiernet.net. [50.53.83.51]) by mx.google.com with ESMTPSA id xn12sm100402919pac.12.2013.12.29.12.13.16 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 29 Dec 2013 12:13:23 -0800 (PST) Date: Sun, 29 Dec 2013 12:13:08 -0800 From: Stephen Hemminger To: Stephen Hemminger Cc: Gleb Natapov , Paolo Bonzini , kvm@vger.kernel.org Subject: [PATCH kvm-next 2/2] kvm: remove dead code Message-ID: <20131229121308.58f2a077@nehalam.linuxnetplumber.net> In-Reply-To: <20131229121229.19a97822@nehalam.linuxnetplumber.net> References: <20131229121229.19a97822@nehalam.linuxnetplumber.net> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The function kvm_io_bus_read_cookie is defined but never used in current in-tree code. Signed-off-by: Stephen Hemminger --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/include/linux/kvm_host.h 2013-12-27 13:12:19.409612858 -0800 +++ b/include/linux/kvm_host.h 2013-12-27 13:12:42.261259369 -0800 @@ -172,8 +172,6 @@ int kvm_io_bus_write_cookie(struct kvm * int len, const void *val, long cookie); int kvm_io_bus_read(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, int len, void *val); -int kvm_io_bus_read_cookie(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, - int len, void *val, long cookie); int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, int len, struct kvm_io_device *dev); int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, --- a/virt/kvm/kvm_main.c 2013-12-27 13:12:19.413612796 -0800 +++ b/virt/kvm/kvm_main.c 2013-12-27 13:12:42.261259369 -0800 @@ -2937,33 +2937,6 @@ int kvm_io_bus_read(struct kvm *kvm, enu return r < 0 ? r : 0; } -/* kvm_io_bus_read_cookie - called under kvm->slots_lock */ -int kvm_io_bus_read_cookie(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, - int len, void *val, long cookie) -{ - struct kvm_io_bus *bus; - struct kvm_io_range range; - - range = (struct kvm_io_range) { - .addr = addr, - .len = len, - }; - - bus = srcu_dereference(kvm->buses[bus_idx], &kvm->srcu); - - /* First try the device referenced by cookie. */ - if ((cookie >= 0) && (cookie < bus->dev_count) && - (kvm_io_bus_cmp(&range, &bus->range[cookie]) == 0)) - if (!kvm_iodevice_read(bus->range[cookie].dev, addr, len, - val)) - return cookie; - - /* - * cookie contained garbage; fall back to search and return the - * correct cookie value. - */ - return __kvm_io_bus_read(bus, &range, val); -} /* Caller must hold slots_lock. */ int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr,