From patchwork Mon Nov 26 20:04:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 10699111 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DAA2A14E2 for ; Mon, 26 Nov 2018 20:17:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC5FC29494 for ; Mon, 26 Nov 2018 20:17:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C07D629571; Mon, 26 Nov 2018 20:17:32 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 ED9A629494 for ; Mon, 26 Nov 2018 20:17:28 +0000 (UTC) Received: from localhost ([::1]:38619 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRNJw-0004fn-4C for patchwork-qemu-devel@patchwork.kernel.org; Mon, 26 Nov 2018 15:17:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRN81-0001lI-D5 for qemu-devel@nongnu.org; Mon, 26 Nov 2018 15:05:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRN7w-0001Jl-A0 for qemu-devel@nongnu.org; Mon, 26 Nov 2018 15:05:09 -0500 Received: from mail-ot1-x341.google.com ([2607:f8b0:4864:20::341]:41846) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gRN7u-0001Gk-Cb for qemu-devel@nongnu.org; Mon, 26 Nov 2018 15:05:02 -0500 Received: by mail-ot1-x341.google.com with SMTP id u16so17865205otk.8 for ; Mon, 26 Nov 2018 12:04:53 -0800 (PST) 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; bh=Qy2dkvms2JnxlfdXpmT3+RWuusrkXOhg8DXpx5tPams=; b=nZqcD4Dq5s9D9IHZeRy/Mo0z7NUkm6Q0TEyNHR9tzesvweyCJRTYN02FUMZTaqieBj lc/SVWiKRykwvF4yv7161c2og7YGB4UR5yVCsltnuUzuMr3OdggzF5AJzlvHkZEpHUFo eQf7g9o4Q4Fvh8uTFX5tr4fXdcG5YRwxQtuNjF0EE8U0Ss6tBLzHpA8/4KmFp7F/Bu3z INJJ13VSje4TftjUF97Kq2jTPgFQMtsKKYtdMN5QDnCMBlUU6Zpm2W913HiOwxoU6X+q LaYbg9m/heVkS3tcLbddXMKutbjWMO5E2swu7RCokAoRBfWPsmjhf5lwxzYj7QR+OWIz Ltzg== 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; bh=Qy2dkvms2JnxlfdXpmT3+RWuusrkXOhg8DXpx5tPams=; b=ewnYHMe6cFiqKdo81R/Mc6mT02nt+XUCkzXEJgAr2LMuK4dUMMo3VcLkFLg6ysxzsR 85sGyzoxTqKoXqmj56tACk7NBdSU0NjOQ3hSK0S4X4zreRhiSzCmVHcoS+162HPUSW6K 1gpWpM5Yy3i+N63SITjx9qafYz4wY21cidF4Q2gkwWo95JpGzQ2B7TFgmfzs8Kvey8Xk /jbBikwUiPvOZx49WtiVRnjPp3FC2jGlaO4PdaCBYk+fksZsVOwMmXanzzW4RhBUopWE ZOf00yt0tYdZVff3GwHnTLcIznCJzOFzaJnCW64VNZAqy9P75Va3bek5myx5cm9ngWLu y6Yw== X-Gm-Message-State: AA+aEWaMhFv/HeMFmFo25b3KCcrFUF3DuAh2SJO7EJYJzG/0GL7mymZp 8w0jZRtuhSHilx9h991GlQ== X-Google-Smtp-Source: AFSGD/V8zv+udGccTtrZZHGVga6J5KHE3TbekZBW/QMx+2PgenHCAYuHLVHCzXNqRdH0uHI6H+Yoww== X-Received: by 2002:a9d:5f13:: with SMTP id f19mr15454988oti.267.1543262693150; Mon, 26 Nov 2018 12:04:53 -0800 (PST) Received: from serve.minyard.net ([47.184.128.64]) by smtp.gmail.com with ESMTPSA id v20sm405007otp.10.2018.11.26.12.04.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 12:04:52 -0800 (PST) Received: from t430.minyard.net (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPA id F19D5F61; Mon, 26 Nov 2018 14:04:47 -0600 (CST) Received: by t430.minyard.net (Postfix, from userid 1000) id 3D9D6301466; Mon, 26 Nov 2018 14:04:46 -0600 (CST) From: minyard@acm.org To: qemu-devel@nongnu.org, "Dr . David Alan Gilbert" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell Date: Mon, 26 Nov 2018 14:04:22 -0600 Message-Id: <20181126200435.23408-4-minyard@acm.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181126200435.23408-1-minyard@acm.org> References: <20181126200435.23408-1-minyard@acm.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::341 Subject: [Qemu-devel] [PATCH v3 03/16] arm:i2c: Don't mask return from i2c_recv() 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: Paolo Bonzini , Corey Minyard , Corey Minyard , "Michael S . Tsirkin" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Corey Minyard It can't fail, and now that it returns a uint8_t a 0xff mask is unnecessary. Signed-off-by: Corey Minyard Suggested-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/arm/stellaris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index 6c69ce79b2..638b649911 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -811,7 +811,7 @@ static void stellaris_i2c_write(void *opaque, hwaddr offset, /* TODO: Handle errors. */ if (s->msa & 1) { /* Recv */ - s->mdr = i2c_recv(s->bus) & 0xff; + s->mdr = i2c_recv(s->bus); } else { /* Send */ i2c_send(s->bus, s->mdr);