From patchwork Thu Jun 2 15:28:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 9150887 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0736960467 for ; Thu, 2 Jun 2016 16:33:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECC40282ED for ; Thu, 2 Jun 2016 16:33:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E17B428310; Thu, 2 Jun 2016 16:33:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6ABC7282ED for ; Thu, 2 Jun 2016 16:33:21 +0000 (UTC) Received: from localhost ([::1]:48727 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8VYe-00015Y-EB for patchwork-qemu-devel@patchwork.kernel.org; Thu, 02 Jun 2016 12:33:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8UXj-0001Yb-JC for qemu-devel@nongnu.org; Thu, 02 Jun 2016 11:28:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8UXi-0002Hq-Lk for qemu-devel@nongnu.org; Thu, 02 Jun 2016 11:28:19 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:57477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8UXi-0002GW-D3; Thu, 02 Jun 2016 11:28:18 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1b8UXg-0008Jg-Q9; Thu, 02 Jun 2016 16:28:16 +0100 From: Peter Maydell To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Thu, 2 Jun 2016 16:28:16 +0100 Message-Id: <1464881296-9618-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH] thunk: Drop unused NO_THUNK_TYPE_SIZE guards X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: patches@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The thunk_type_size_array() and thunk_type_align_array() functions are only provided if NO_THUNK_TYPE_SIZE is not defined. However nothing in the codebase defines that, and so in fact these functions are always present. Drop the unnecessary #ifdefs. (Over a decade ago thunk.h used to be included by some softmmu files, which defined NO_THUNK_TYPE_SIZE, but these includes are long gone; see for instance commit f193c7979c2f7.) Signed-off-by: Peter Maydell --- include/exec/user/thunk.h | 3 --- thunk.c | 2 -- 2 files changed, 5 deletions(-) diff --git a/include/exec/user/thunk.h b/include/exec/user/thunk.h index ad1d602..57eb358 100644 --- a/include/exec/user/thunk.h +++ b/include/exec/user/thunk.h @@ -71,7 +71,6 @@ void thunk_register_struct_direct(int id, const char *name, const StructEntry *se1); const argtype *thunk_convert(void *dst, const void *src, const argtype *type_ptr, int to_host); -#ifndef NO_THUNK_TYPE_SIZE extern StructEntry *struct_entries; @@ -178,8 +177,6 @@ static inline int thunk_type_align(const argtype *type_ptr, int is_host) } } -#endif /* NO_THUNK_TYPE_SIZE */ - unsigned int target_to_host_bitmask(unsigned int x86_mask, const bitmask_transtbl * trans_tbl); unsigned int host_to_target_bitmask(unsigned int alpha_mask, diff --git a/thunk.c b/thunk.c index f057d86..8aee299 100644 --- a/thunk.c +++ b/thunk.c @@ -303,7 +303,6 @@ unsigned int host_to_target_bitmask(unsigned int alpha_mask, return(x86_mask); } -#ifndef NO_THUNK_TYPE_SIZE int thunk_type_size_array(const argtype *type_ptr, int is_host) { return thunk_type_size(type_ptr, is_host); @@ -313,7 +312,6 @@ int thunk_type_align_array(const argtype *type_ptr, int is_host) { return thunk_type_align(type_ptr, is_host); } -#endif /* ndef NO_THUNK_TYPE_SIZE */ void thunk_init(unsigned int max_structs) {