From patchwork Thu Feb 28 18:16:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 159408 Delivered-To: patch@linaro.org Received: by 2002:ac9:18c7:0:0:0:0:0 with SMTP id i7csp977546oce; Thu, 28 Feb 2019 10:21:55 -0800 (PST) X-Google-Smtp-Source: APXvYqwV8sm44ds9VnbR0O3Ef/hsOGpddjp+sl9FFb+OMnqZO96EZx8wFss1W3lHqRuo4SCvTLbY X-Received: by 2002:a5b:9:: with SMTP id a9mr709488ybp.321.1551378115798; Thu, 28 Feb 2019 10:21:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551378115; cv=none; d=google.com; s=arc-20160816; b=LTX535iQOSB3ohkX1p78KxRx0Oy7+0awnYKeFDiir9SceoBU3tioHxm9E//pPea/Ur tztTBw1j8lGTRYbjbl+8pK38E2O4hg8AvziadG+vUfWRi4NCg1MAKcoGYOxDttNxeRFw y7OURnCWjawfZIG7R3UFo5x6JVmBpBg/VsdRU7ow00LGHMuOFd8LLYVrgK1ZabbVK0Ev spuLo4s9xdGVVndQzTPA7u+8D7ORcfbFeovS0j/FIsuc+blieb1IorSoagIa2dRvP889 2prQb/KJMwzNumOdLutcI87vtASZ/tnXzqrazSEp2djvJSHNrG9YdLZL0vobRU99eO/6 CNVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=QtEwVgsVkNKo8P3JnAy466q1OLHvwt1fGAGtvogK55Q=; b=0yjB3QdHX49Kde4QDFPGcm0FCQIvIOFU2r2QtIZgtcxMcTYsVgOB8UV0MpWCwnaqJw F0IZmtZHKxNTbfkQ7f+GTVo9sXZEKS4Ipgnx7Net1H3YSiLgQ/B0KmNdh4iIODdGiEMX LGk8RAxGtltD8PrFA+i9tIOtJ8qNKxFAwJkV4S6w1ubv2bZ/0dW0y96nZKNxz8v48iS8 Nq9jbe8VnYML5XNvLCQ14b1tBtQwOh8/ps4pxk8wg0SsRfc6NoDzzqscxnf3EGt6EY0t 3qPjDmnrQx8IivzetTg6cY53mFYdpCqgNuTSGSowaCHVTn1VEntwKd9zFRkyFwlqYWDT Uzjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=BPMVSU0y; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j128si10722775ywb.125.2019.02.28.10.21.55 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 28 Feb 2019 10:21:55 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=BPMVSU0y; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([127.0.0.1]:44547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzQJf-0003E2-7n for patch@linaro.org; Thu, 28 Feb 2019 13:21:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzQFg-0000WW-GZ for qemu-devel@nongnu.org; Thu, 28 Feb 2019 13:17:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzQFV-0002HH-9w for qemu-devel@nongnu.org; Thu, 28 Feb 2019 13:17:48 -0500 Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]:43703) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gzQFV-00029d-3f for qemu-devel@nongnu.org; Thu, 28 Feb 2019 13:17:37 -0500 Received: by mail-ot1-x331.google.com with SMTP id n71so18527736ota.10 for ; Thu, 28 Feb 2019 10:17:17 -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 :mime-version:content-transfer-encoding; bh=QtEwVgsVkNKo8P3JnAy466q1OLHvwt1fGAGtvogK55Q=; b=BPMVSU0ycOUe6Eq3Gtq7rbak0wkoU5g2gdoSymnY8zlz8ohFXykwtHSH07yUBVVwrW x+JoMTVD9HY0F/rNHDtyFvvte2zL18nxp5nZyMEoEGpGqbr2fG1p4geDlSL6ZcAXz1Z6 nzDRRAiC1KukZYqkeGk8s2HK2ykt8FecCNFJPq9u6b8uEVYN6px17S0jy1ah4XJhmd1y hB//tcyGPAwr9AmCNSCLJ0vDrp9miXQnQ2d0a5SRt0drpbd6Y6pSzXz3XZTpua1E9LTR ZmS2y5QdBONgOEwa6VVedti0EPilGZ6aKGpDCRRGtrdr0xMZ5Nmofqo+03DEuJa/sQtk b8xg== 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=QtEwVgsVkNKo8P3JnAy466q1OLHvwt1fGAGtvogK55Q=; b=U1uHJgB/e0eGgl9Y5gqVv1LPUwq9AYcAr7eexZlFs+NsyM6+GusE9iR+inXakVhhTj mGdjbebaD1SBCp0Nv/IGdI3y3TcZTck1dlORWzze9B6D+SH4+Nq2y+5VOygomQg+HL2n 96bSgcLwsK/YQrBIqwLT2USaElZ+Wmh5u7Sc7pZvCgD0JYr9ExayE0JCPV+EtBEKgfgN WgVWIqEzvH0w3xm10SVddnM1sIz4P9hHS8Ha4MeEl09zn1HuYA1tgIm/tQfKHpHfwtB1 nlZV3Ig5GtJ81JrUgRE7b1gdiHCwUKFnamkKDQmw4dPDqdwCMseQBM0cyYMd4Pb9lNbU 56FQ== X-Gm-Message-State: APjAAAWfc5SuydIT8dwqGFMsP65i3WSYkOQOctgn3p0KtBpXxzXRoL4Q xXXspN7rlr363vaX6myUsQ== X-Received: by 2002:a9d:6f0e:: with SMTP id n14mr614342otq.156.1551377836661; Thu, 28 Feb 2019 10:17:16 -0800 (PST) Received: from serve.minyard.net (serve.minyard.net. [2001:470:b8f6:1b::1]) by smtp.gmail.com with ESMTPSA id q67sm8432861oif.40.2019.02.28.10.17.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Feb 2019 10:17:15 -0800 (PST) Received: from t430.minyard.net (unknown [IPv6:2001:470:b8f6:1b:b89e:c7bf:12ab:ad14]) by serve.minyard.net (Postfix) with ESMTPA id BB0971808F4; Thu, 28 Feb 2019 18:17:13 +0000 (UTC) Received: by t430.minyard.net (Postfix, from userid 1000) id 5D4B0302AF5; Thu, 28 Feb 2019 12:17:13 -0600 (CST) From: minyard@acm.org To: Peter Maydell Date: Thu, 28 Feb 2019 12:16:54 -0600 Message-Id: <20190228181710.2477-4-minyard@acm.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190228181710.2477-1-minyard@acm.org> References: <20190228181710.2477-1-minyard@acm.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::331 Subject: [Qemu-devel] [PULL 03/19] 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: Corey Minyard , QEMU Developers , minyard@acm.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) -- 2.17.1 diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index 442529cc65..7b45fe3ccf 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);