From patchwork Thu Jul 21 01:27:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 105886 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 72E97B6F64 for ; Thu, 21 Jul 2011 13:36:38 +1000 (EST) Received: from localhost ([::1]:42632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qji4A-0002nn-9m for incoming@patchwork.ozlabs.org; Wed, 20 Jul 2011 21:28:42 -0400 Received: from eggs.gnu.org ([140.186.70.92]:52188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qji3I-0002Cf-Gk for qemu-devel@nongnu.org; Wed, 20 Jul 2011 21:27:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qji39-0003r6-SL for qemu-devel@nongnu.org; Wed, 20 Jul 2011 21:27:47 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58006 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qji39-0003qd-15 for qemu-devel@nongnu.org; Wed, 20 Jul 2011 21:27:39 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 999C88EFD4; Thu, 21 Jul 2011 03:27:36 +0200 (CEST) From: Alexander Graf To: QEMU-devel Developers Date: Thu, 21 Jul 2011 03:27:29 +0200 Message-Id: <1311211654-14326-19-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1311211654-14326-1-git-send-email-agraf@suse.de> References: <1311211654-14326-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: Scott Wood Subject: [Qemu-devel] [PATCH 18/23] PPC: KVM: Remove kvmppc_read_host_property X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We just got rid of the last user of kvmppc_read_host_property, so we can now safely remove it. Signed-off-by: Alexander Graf --- target-ppc/kvm_ppc.c | 35 ----------------------------------- target-ppc/kvm_ppc.h | 11 ----------- 2 files changed, 0 insertions(+), 46 deletions(-) diff --git a/target-ppc/kvm_ppc.c b/target-ppc/kvm_ppc.c index 7cc522a..0c9b530 100644 --- a/target-ppc/kvm_ppc.c +++ b/target-ppc/kvm_ppc.c @@ -21,41 +21,6 @@ static QEMUTimer *kvmppc_timer; static unsigned int kvmppc_timer_rate; -#ifdef CONFIG_FDT -int kvmppc_read_host_property(const char *node_path, const char *prop, - void *val, size_t len) -{ - char *path; - FILE *f; - int ret = 0; - int pathlen; - - pathlen = snprintf(NULL, 0, "%s/%s/%s", PROC_DEVTREE_PATH, node_path, prop) - + 1; - path = qemu_malloc(pathlen); - - snprintf(path, pathlen, "%s/%s/%s", PROC_DEVTREE_PATH, node_path, prop); - - f = fopen(path, "rb"); - if (f == NULL) { - ret = errno; - goto free; - } - - len = fread(val, len, 1, f); - if (len != 1) { - ret = ferror(f); - goto close; - } - -close: - fclose(f); -free: - free(path); - return ret; -} -#endif - static void kvmppc_timer_hack(void *opaque) { qemu_service_io(); diff --git a/target-ppc/kvm_ppc.h b/target-ppc/kvm_ppc.h index 1827a13..523825d 100644 --- a/target-ppc/kvm_ppc.h +++ b/target-ppc/kvm_ppc.h @@ -10,17 +10,6 @@ #define __KVM_PPC_H__ void kvmppc_init(void); -#ifndef CONFIG_KVM -static inline int kvmppc_read_host_property(const char *node_path, const char *prop, - void *val, size_t len) -{ - assert(0); - return -ENOSYS; -} -#else -int kvmppc_read_host_property(const char *node_path, const char *prop, - void *val, size_t len); -#endif uint32_t kvmppc_get_tbfreq(void); uint32_t kvmppc_get_clockfreq(void);