From patchwork Mon Jul 29 12:16:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 18632 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f199.google.com (mail-qc0-f199.google.com [209.85.216.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 56D662486F for ; Mon, 29 Jul 2013 12:16:49 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id j10sf926586qcx.10 for ; Mon, 29 Jul 2013 05:16:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=HUclqHp9eCbyqshN710DZEC9uC7EKJr8VpTrBY6EQqk=; b=ocYBOkthlx2/D2POEO1i5LDNncn1nju4IEbdiS6noK18Y34diEXzHCmd8OuqvyjN+6 KY0J20xAb9npVBvfZqLPE6Fi76mGSz3L3gXivJW99in6Ngj5BG8dZwIN0Lo05cRYgc6H LLiD/RJMEf+ye+BQpTuFnx623l10mSaf7QW+NDP18NgmwiUzN+2PeyI8ATYP9IrosqRF nr4TrVaopCu2rzv7prrS9d3tOzu6L3UEYTQd0riGon1KO7GLPhWuTen0g428AC/G2tVo 9kOaexFDl+rJIwFkmEKZfXeaHiF5zoAywoQOVfsBxOnIRk1ecFc5JllVfI7rcVPUkr3H 2WJw== X-Received: by 10.224.169.1 with SMTP id w1mr36049050qay.4.1375100209129; Mon, 29 Jul 2013 05:16:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.106.195 with SMTP id gw3ls1863726qeb.64.gmail; Mon, 29 Jul 2013 05:16:49 -0700 (PDT) X-Received: by 10.52.52.132 with SMTP id t4mr9715573vdo.65.1375100208891; Mon, 29 Jul 2013 05:16:48 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id x9si17561624vec.80.2013.07.29.05.16.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Jul 2013 05:16:48 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id ib11so2031168vcb.0 for ; Mon, 29 Jul 2013 05:16:48 -0700 (PDT) X-Received: by 10.220.164.138 with SMTP id e10mr8422179vcy.27.1375100208793; Mon, 29 Jul 2013 05:16:48 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.11.8 with SMTP id pc8csp113248vcb; Mon, 29 Jul 2013 05:16:48 -0700 (PDT) X-Received: by 10.204.184.199 with SMTP id cl7mr8635461bkb.77.1375100205230; Mon, 29 Jul 2013 05:16:45 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id kj3si7914778bkb.311.2013.07.29.05.16.44 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 29 Jul 2013 05:16:44 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1V3mNT-0003dL-Ay; Mon, 29 Jul 2013 13:16:39 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Anthony Liguori , Alexander Graf , Kevin Wolf , Stefan Hajnoczi , Richard Henderson , Paolo Bonzini , qemu-ppc@nongnu.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [PATCH 2/4] s390x: Rename 'dprintf' to 'DPRINTF' Date: Mon, 29 Jul 2013 13:16:37 +0100 Message-Id: <1375100199-13934-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1375100199-13934-1-git-send-email-peter.maydell@linaro.org> References: <1375100199-13934-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQlXyRmqQMtBp5LzJZI2niC24EDk0r7ZDN524Hha/HOgaL/VsOOO2eW34Uoj13EkW8ZYCY5K X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 'dprintf' is the name of a POSIX standard function so we should not be stealing it for our debug macro. Rename to 'DPRINTF' (in line with a number of other source files.) Signed-off-by: Peter Maydell --- hw/s390x/s390-virtio-bus.c | 4 ++-- hw/s390x/s390-virtio.c | 4 ++-- target-s390x/kvm.c | 19 ++++++++++--------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c index 207eb82..f0aa941 100644 --- a/hw/s390x/s390-virtio-bus.c +++ b/hw/s390x/s390-virtio-bus.c @@ -38,10 +38,10 @@ /* #define DEBUG_S390 */ #ifdef DEBUG_S390 -#define dprintf(fmt, ...) \ +#define DPRINTF(fmt, ...) \ do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0) #else -#define dprintf(fmt, ...) \ +#define DPRINTF(fmt, ...) \ do { } while (0) #endif diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c index edbde00..439d732 100644 --- a/hw/s390x/s390-virtio.c +++ b/hw/s390x/s390-virtio.c @@ -41,10 +41,10 @@ //#define DEBUG_S390 #ifdef DEBUG_S390 -#define dprintf(fmt, ...) \ +#define DPRINTF(fmt, ...) \ do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0) #else -#define dprintf(fmt, ...) \ +#define DPRINTF(fmt, ...) \ do { } while (0) #endif diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 60e94f8..3ed5855 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -40,10 +40,10 @@ /* #define DEBUG_KVM */ #ifdef DEBUG_KVM -#define dprintf(fmt, ...) \ +#define DPRINTF(fmt, ...) \ do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0) #else -#define dprintf(fmt, ...) \ +#define DPRINTF(fmt, ...) \ do { } while (0) #endif @@ -585,7 +585,7 @@ static int handle_priv(S390CPU *cpu, struct kvm_run *run, uint16_t ipbh0 = (run->s390_sieic.ipb & 0xffff0000) >> 16; uint8_t ipb = run->s390_sieic.ipb & 0xff; - dprintf("KVM: PRIV: %d\n", ipa1); + DPRINTF("KVM: PRIV: %d\n", ipa1); switch (ipa1) { case PRIV_SCLP_CALL: r = kvm_sclp_service_call(cpu, run, ipbh0); @@ -598,7 +598,7 @@ static int handle_priv(S390CPU *cpu, struct kvm_run *run, r = 0; } } else { - dprintf("KVM: unknown PRIV: 0x%x\n", ipa1); + DPRINTF("KVM: unknown PRIV: 0x%x\n", ipa1); r = -1; } break; @@ -631,7 +631,7 @@ static int handle_diag(S390CPU *cpu, struct kvm_run *run, int ipb_code) sleep(10); break; default: - dprintf("KVM: unknown DIAG: 0x%x\n", ipb_code); + DPRINTF("KVM: unknown DIAG: 0x%x\n", ipb_code); r = -1; break; } @@ -644,7 +644,7 @@ static int s390_cpu_restart(S390CPU *cpu) kvm_s390_interrupt(cpu, KVM_S390_RESTART, 0); s390_add_running_cpu(cpu); qemu_cpu_kick(CPU(cpu)); - dprintf("DONE: SIGP cpu restart: %p\n", &cpu->env); + DPRINTF("DONE: SIGP cpu restart: %p\n", &cpu->env); return 0; } @@ -672,7 +672,7 @@ static int s390_cpu_initial_reset(S390CPU *cpu) env->regs[i] = 0; } - dprintf("DONE: SIGP initial reset: %p\n", env); + DPRINTF("DONE: SIGP initial reset: %p\n", env); return 0; } @@ -741,7 +741,8 @@ static int handle_instruction(S390CPU *cpu, struct kvm_run *run) int ipb_code = (run->s390_sieic.ipb & 0x0fff0000) >> 16; int r = -1; - dprintf("handle_instruction 0x%x 0x%x\n", run->s390_sieic.ipa, run->s390_sieic.ipb); + DPRINTF("handle_instruction 0x%x 0x%x\n", + run->s390_sieic.ipa, run->s390_sieic.ipb); switch (ipa0) { case IPA0_B2: case IPA0_B9: @@ -775,7 +776,7 @@ static int handle_intercept(S390CPU *cpu) int icpt_code = run->s390_sieic.icptcode; int r = 0; - dprintf("intercept: 0x%x (at 0x%lx)\n", icpt_code, + DPRINTF("intercept: 0x%x (at 0x%lx)\n", icpt_code, (long)cs->kvm_run->psw_addr); switch (icpt_code) { case ICPT_INSTRUCTION: