From: Gleb Natapov <gleb@minantech.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, Cornelia Huck <cornelia.huck@de.ibm.com>
Subject: Re: [PATCH kvm-next 2/2] kvm: remove dead code
Date: Mon, 30 Dec 2013 09:37:15 +0200 [thread overview]
Message-ID: <20131230073715.GB6244@minantech.com> (raw)
In-Reply-To: <20131229121308.58f2a077@nehalam.linuxnetplumber.net>
On Sun, Dec 29, 2013 at 12:13:08PM -0800, Stephen Hemminger wrote:
> The function kvm_io_bus_read_cookie is defined but never used
> in current in-tree code.
>
It was added recently by Cornelia (copied) with intention to be used in s390
code. I assume the intention is still there.
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>
>
> --- 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,
--
Gleb.
next prev parent reply other threads:[~2013-12-30 7:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-29 20:12 [PATCH kvm-next 1/2] kvm: make local functions static Stephen Hemminger
2013-12-29 20:13 ` [PATCH kvm-next 2/2] kvm: remove dead code Stephen Hemminger
2013-12-30 7:37 ` Gleb Natapov [this message]
2013-12-30 22:27 ` Stephen Hemminger
2013-12-31 15:18 ` Paolo Bonzini
2014-01-07 13:14 ` Cornelia Huck
2014-01-08 21:03 ` [PATCH kvm-next 1/2] kvm: make local functions static Marcelo Tosatti
2014-01-09 17:22 ` Hu Yaohui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131230073715.GB6244@minantech.com \
--to=gleb@minantech.com \
--cc=cornelia.huck@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox