From patchwork Fri Jun 30 10:00:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 9819323 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 7B1DC6035F for ; Fri, 30 Jun 2017 11:29:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6997D285DA for ; Fri, 30 Jun 2017 11:29:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C4172861B; Fri, 30 Jun 2017 11:29:42 +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 vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F057328607 for ; Fri, 30 Jun 2017 11:29:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752076AbdF3KBh (ORCPT ); Fri, 30 Jun 2017 06:01:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30852 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751784AbdF3KAi (ORCPT ); Fri, 30 Jun 2017 06:00:38 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0622761BBB for ; Fri, 30 Jun 2017 10:00:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0622761BBB Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=thuth@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0622761BBB Received: from thh440s.redhat.com (ovpn-116-66.ams2.redhat.com [10.36.116.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8C1E27E681; Fri, 30 Jun 2017 10:00:33 +0000 (UTC) From: Thomas Huth To: kvm@vger.kernel.org, Paolo Bonzini Cc: David Hildenbrand , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Laurent Vivier , Drew Jones Subject: [kvm-unit-tests v3 PATCH 3/3] Mark some local functions as "static" Date: Fri, 30 Jun 2017 12:00:19 +0200 Message-Id: <1498816819-32666-4-git-send-email-thuth@redhat.com> In-Reply-To: <1498816819-32666-1-git-send-email-thuth@redhat.com> References: <1498816819-32666-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 30 Jun 2017 10:00:38 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Discovered while compiling kvm-unit-tests with the "-Wmissing-prototypes" parameter of GCC. Signed-off-by: Thomas Huth --- NB: There's more to do to make the whole code compilable with "-Wmissing-prototypes" ... not sure whether we really want all that, but at least these spots in this patch here seemed to make sense to me. arm/pmu.c | 2 +- lib/pci-testdev.c | 4 ++-- lib/printf.c | 8 ++++---- lib/x86/fwcfg.c | 2 +- s390x/intercept.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arm/pmu.c b/arm/pmu.c index 1ac6920..1de7d77 100644 --- a/arm/pmu.c +++ b/arm/pmu.c @@ -276,7 +276,7 @@ static void pmccntr64_test(void) } /* Return FALSE if no PMU found, otherwise return TRUE */ -bool pmu_probe(void) +static bool pmu_probe(void) { pmu_version = get_pmu_version(); report_info("PMU version: %d", pmu_version); diff --git a/lib/pci-testdev.c b/lib/pci-testdev.c index 7d298e6..039bb44 100644 --- a/lib/pci-testdev.c +++ b/lib/pci-testdev.c @@ -131,8 +131,8 @@ static bool pci_testdev_one(struct pci_test_dev_hdr *test, return (int)count == nr_writes; } -void pci_testdev_print(struct pci_test_dev_hdr *test, - struct pci_testdev_ops *ops) +static void pci_testdev_print(struct pci_test_dev_hdr *test, + struct pci_testdev_ops *ops) { bool io = (ops == &pci_testdev_io_ops); int i; diff --git a/lib/printf.c b/lib/printf.c index bfe05f5..1269723 100644 --- a/lib/printf.c +++ b/lib/printf.c @@ -30,7 +30,7 @@ static void addchar(pstream_t *p, char c) ++p->added; } -void print_str(pstream_t *p, const char *s, strprops_t props) +static void print_str(pstream_t *p, const char *s, strprops_t props) { const char *s_orig = s; int npad = props.npad; @@ -58,7 +58,7 @@ void print_str(pstream_t *p, const char *s, strprops_t props) static char digits[16] = "0123456789abcdef"; -void print_int(pstream_t *ps, long long n, int base, strprops_t props) +static void print_int(pstream_t *ps, long long n, int base, strprops_t props) { char buf[sizeof(long) * 3 + 2], *p = buf; int s = 0, i; @@ -92,8 +92,8 @@ void print_int(pstream_t *ps, long long n, int base, strprops_t props) print_str(ps, buf, props); } -void print_unsigned(pstream_t *ps, unsigned long long n, int base, - strprops_t props) +static void print_unsigned(pstream_t *ps, unsigned long long n, int base, + strprops_t props) { char buf[sizeof(long) * 3 + 3], *p = buf; int i; diff --git a/lib/x86/fwcfg.c b/lib/x86/fwcfg.c index e2cdd15..c52b445 100644 --- a/lib/x86/fwcfg.c +++ b/lib/x86/fwcfg.c @@ -3,7 +3,7 @@ static struct spinlock lock; -uint64_t fwcfg_get_u(uint16_t index, int bytes) +static uint64_t fwcfg_get_u(uint16_t index, int bytes) { uint64_t r = 0; uint8_t b; diff --git a/s390x/intercept.c b/s390x/intercept.c index 9766289..59e5fca 100644 --- a/s390x/intercept.c +++ b/s390x/intercept.c @@ -182,7 +182,7 @@ struct { { NULL, NULL, false } }; -void parse_intercept_test_args(int argc, char **argv) +static void parse_intercept_test_args(int argc, char **argv) { int i, ti; bool run_all = true;