From patchwork Sun Jun 24 04:06:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 933842 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tV5T+H4D"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41CzcG2RxHz9s19 for ; Sun, 24 Jun 2018 14:20:14 +1000 (AEST) Received: from localhost ([::1]:40577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWwVX-0005ho-Vr for incoming@patchwork.ozlabs.org; Sun, 24 Jun 2018 00:20:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWwIX-0003w4-TS for qemu-devel@nongnu.org; Sun, 24 Jun 2018 00:06:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWwIW-0003uK-T3 for qemu-devel@nongnu.org; Sun, 24 Jun 2018 00:06:45 -0400 Received: from mail-qk0-x22b.google.com ([2607:f8b0:400d:c09::22b]:33965) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWwIW-0003tt-Ow; Sun, 24 Jun 2018 00:06:44 -0400 Received: by mail-qk0-x22b.google.com with SMTP id b66-v6so348569qkj.1; Sat, 23 Jun 2018 21:06:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zGB87WBZUxSYqYPuFSOnGGcEOOn/B+mDAgxK88CRyao=; b=tV5T+H4Dj8ANICMMuoasIMIFnuyPUBVIcbpjZLIpYM13neWGIp7M2mZO4zaRsSGFK/ FHDHvVfvUz5faegE9Endy5Fc/rdo0fIcpmwPdwkkhTLKlCWpHIsW3TLdzwLDTe8wfbum WJUwfZcxYtkg5T76VRwxjiMELYi4MMkhzgWwqhZzIndwk7Be7AT5Rg4peefl8UVURFfO sGhsqfzc0HU34O+eyY15M48dLeYjGF7R3ofCHxpfYdZ2KMEpcCpBqk2CYm5U74VVuVEO qh6bMonvxSMi7w2kLZHq98DIqMhV9ujgCSX+yB3QSGupalVW1WMJT4nA5LMaoP+PdmCB ZbFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=zGB87WBZUxSYqYPuFSOnGGcEOOn/B+mDAgxK88CRyao=; b=QGbbvNFyOr8mVLig30QvEQKUL41KE7sWBXWkhNXL3TK2FJNFM2EBeWt8DYYdu4YAkR IvemWGLIhcCQCArshFechU0+4/67PxAWCBfw58lnhuZ/TStF4rgKX19aLA5vTqAK2B/b hlA4x7KtIm7CPKEDJ4PCKjplLTAJd+URCzRLn8T8qF2TIVoI6U7E+qSzN8RsfKzqoea/ TBctpM0V96TpVhxzUbKiMimugSedCJ/4LvTnt8m7iPocsfc2biEk6SiCnIDgMBuDfMVg /BjYJkK1BK6WheDTskSUtjJ2FxJc3DzP9xqzC6/fC+jMk45QCvEx1nZ31Rswyl5mC8zk lQMA== X-Gm-Message-State: APt69E2zFagdMlJqddrB/4dX19wP3MVOxo4QkZt305wNgv4/H+T7ewY9 8McA4feFagBetymCSGFxkOk= X-Google-Smtp-Source: AAOMgpdOSd/j5HLUqaaAv8eNLPPl91LORHLwmOEcpmMlaziqSt+3jvdxnLB/OnxzI3fUL0SfvwLz/A== X-Received: by 2002:a37:9286:: with SMTP id u128-v6mr6189282qkd.29.1529813204279; Sat, 23 Jun 2018 21:06:44 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id d14-v6sm7145313qtn.90.2018.06.23.21.06.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Jun 2018 21:06:43 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Thomas Huth Date: Sun, 24 Jun 2018 01:06:00 -0300 Message-Id: <20180624040609.17572-8-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180624040609.17572-1-f4bug@amsat.org> References: <20180624040609.17572-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::22b Subject: [Qemu-devel] [PATCH v3 07/16] hw/i2c/omap_i2c: Use qemu_log_mask(UNIMP) instead of fprintf 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: qemu-trivial@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathi?= =?utf-8?b?ZXUtRGF1ZMOp?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- Thomas: I used 4 for 1 to keep checkpatch happy. hw/i2c/omap_i2c.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/i2c/omap_i2c.c b/hw/i2c/omap_i2c.c index 26e3e5ebf6..cabd348b45 100644 --- a/hw/i2c/omap_i2c.c +++ b/hw/i2c/omap_i2c.c @@ -17,6 +17,7 @@ * with this program; if not, see . */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "hw/hw.h" #include "hw/i2c/i2c.h" #include "hw/arm/omap.h" @@ -339,14 +340,15 @@ static void omap_i2c_write(void *opaque, hwaddr addr, } break; } - if ((value & (1 << 15)) && !(value & (1 << 10))) { /* MST */ - fprintf(stderr, "%s: I^2C slave mode not supported\n", - __func__); + if ((value & (1 << 15)) && !(value & (1 << 10))) { /* MST */ + qemu_log_mask(LOG_UNIMP, "%s: I^2C slave mode not supported\n", + __func__); break; } - if ((value & (1 << 15)) && value & (1 << 8)) { /* XA */ - fprintf(stderr, "%s: 10-bit addressing mode not supported\n", - __func__); + if ((value & (1 << 15)) && value & (1 << 8)) { /* XA */ + qemu_log_mask(LOG_UNIMP, + "%s: 10-bit addressing mode not supported\n", + __func__); break; } if ((value & (1 << 15)) && value & (1 << 0)) { /* STT */ @@ -392,8 +394,10 @@ static void omap_i2c_write(void *opaque, hwaddr addr, s->stat |= 0x3f; omap_i2c_interrupts_update(s); } - if (value & (1 << 15)) /* ST_EN */ - fprintf(stderr, "%s: System Test not supported\n", __func__); + if (value & (1 << 15)) { /* ST_EN */ + qemu_log_mask(LOG_UNIMP, + "%s: System Test not supported\n", __func__); + } break; default: