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: 152066 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp322032ljp; Mon, 26 Nov 2018 12:19:05 -0800 (PST) X-Google-Smtp-Source: AFSGD/U3ITsCQ9q6IZ26T/ZM2wPWi7psxTCt14xbZuMrEWC4iiMbZCtHaScRTTQPdE9SU8kl5QVb X-Received: by 2002:a81:b653:: with SMTP id h19mr20997351ywk.170.1543263545721; Mon, 26 Nov 2018 12:19:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543263545; cv=none; d=google.com; s=arc-20160816; b=Hm+wKr2PEjsZ852XMedwx+23wy8Hc+4WSsLoTJnK6pGnVcRRzk1egZlRmm2m2zL24Q 2+EmpD8lNphLNG+jA0e7f1kThJdtF91+28hT+J/+azFKtTAyy5FbjdyHKl3/Xe/yPC8f ORqEexB068sE5w8WO+yvI44qynmS0qyk6QuNAxK0HVkUz+z8d6o+IHy8maU5NEVw6n+T YppvJUa6s7fRJnK013kc0stTdmjrbQV9tlvy90qH9W0nUcCATOQJqCvt02/BAlyowkHv jDuyxsRsBTmB4klE6vtXJ9B2itxyb0phV4/D5U2NvdHAiP92BxT4h7nMaR53AxjIMWGT L7/A== 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:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=Qy2dkvms2JnxlfdXpmT3+RWuusrkXOhg8DXpx5tPams=; b=EF637w4I0mp9aRDdU57Qk1pDOcGGIXPiWANnx7+Z3PQ2/6YVAqq3LtypnBpKHz16ZV 3cHY3bk/sBlBU2DDNqK3cWzPQUdYUd/rMUxxlfQtsq7ZA38FySqVbvCWKOZz0QIX7YFp oaTDIFx9EcPSrHp7nMG3FVVNzL6KcKWvgAY/Z2abQES5wfjHlh82fFiSFOrfbBF3oE8i yfvEZ/eGMCqTZ0x8fcvD3sI9NK7vlH7mHSw65Zqi2sG+pRKsJw/38UKd4ZR/KttsbXJi 0puB4YgiX7k/k4qduuZPInI/3xPSK1G+wAvY1gatyF+sawMBXvf6oojSWG1Y97gQPnUF CuxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=nZqcD4Dq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id j126-v6si1041910ywd.129.2018.11.26.12.19.05 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 26 Nov 2018 12:19:05 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=nZqcD4Dq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:38619 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRNLU-0004fn-TI for patch@linaro.org; Mon, 26 Nov 2018 15:19:04 -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-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+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 --- hw/arm/stellaris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell 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);