From patchwork Wed Feb 20 13:59:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 158824 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp5067684jaa; Wed, 20 Feb 2019 07:40:57 -0800 (PST) X-Google-Smtp-Source: AHgI3IY7nskJcMeXieInqvKzHeadj0yzuF1ys46mb4fC20E9oPoM6yvs8wlNwhV83wnkXauR2cUo X-Received: by 2002:a81:7155:: with SMTP id m82mr28246818ywc.505.1550677257886; Wed, 20 Feb 2019 07:40:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550677257; cv=none; d=google.com; s=arc-20160816; b=MIyTqML1sc0/NiCiR7lE1K8sF1G44fytckjht9tiLA8P+jZnzu3mBDkIe7KVc6JAi8 iKv0vlJHNX85ZOQbsU7qaojCaI5AYkFmwFRWgWNDf+hdmhQEXs2ze/4nfSEfV5axJyVz d0bP0/ISMSu80J1zv8NyEpKgtwh96tGGNjN7DQES717iPP5HNgQeD4Exm/h4x2Dm1i1i H7cGLeeeu5ogqDmljzbVnyEflXW/ZWbHUC1U/UuhIoZDUrufRhnUENFGsB1q71CRGPhU wKxIDyl7EjqLTuQ54fpG+xokfSR8IBMnn5J4DBYJQ6ixs7jj3ANYo/C089QOCOVR2cPW 55sg== 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=OJ4GGY8FTOkUvpjFZSKWZCNEj7f60DpY1TGZMSvKpSq19vbjAxJjMp/DA5XNqGhWN6 RVJPRVb8PbyehgKbi41DPrb0XI+zyErorI8k5gZWgNaSJBr7GiELiOSLPnlUU57NKQkE cNqQfh/jhVEFjNj3IFXb6b234jOU32dQmyjUG91r+fs6myN1ZjQ1Ce9fiAK8OB86mbfn y2Ci0MDflD0wx650dyqSyILEPvh8C0q9DesJXqYBkTlEvtDtz9Ov0pD3hkFJbChSj7af 1D4H123fQ0q0zfgVLTZBWEindjLuQbcVNx0L5raAL3Dea3TkAk7k4Rro2GNuBwtazpac WZtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="C/8hX8gP"; 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 j191si10905501ywa.144.2019.02.20.07.40.57 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 20 Feb 2019 07:40:57 -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="C/8hX8gP"; 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]:41046 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwTzV-0003lk-AI for patch@linaro.org; Wed, 20 Feb 2019 10:40:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwTo6-0003fD-9y for qemu-devel@nongnu.org; Wed, 20 Feb 2019 10:29:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwTo5-00014P-Cy for qemu-devel@nongnu.org; Wed, 20 Feb 2019 10:29:10 -0500 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]:38165) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gwTo3-00012u-AX for qemu-devel@nongnu.org; Wed, 20 Feb 2019 10:29:09 -0500 Received: by mail-ot1-x342.google.com with SMTP id m1so40791131otf.5 for ; Wed, 20 Feb 2019 07:29:04 -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=C/8hX8gPzswRFARF/uvb/rH2U7Xy6TAIUKEwl1W/fenwwQbLoL1cX6fGEoMf5mXOob F6hXc+dcBYPN3L6kUViRS/q+d75Xc5rW6Noyi2GOgTELzOHAlyR9ZHdrbFbrOGSiqZY8 4II6SW1I3grF1DsVUUVsoDnfDujs3opEQr8uSgqiCL1nDSaxFMR+zZzsVYhfoAytl4C1 2YdjROVc/KgKl/AKDuMn1/IsZUaBJOpt6wkt4Hgn3X9lRXJ54T39NBg82je+RDaDVwDi curkUwv6y+OlK778dAetBFeWrppQBBxkCKn4W7v6FSffykbQX8kiGTsU8mxkXpHQ43+c 2/0Q== 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=pIlxZbXwTqQbX0mqhXejbiYe33CUwS2ukTGeYlwLfiwGiD0d1dIjnLZMAiJSiIqrgx yHdZv+F2sOGQDDKHhZZ5gxMERoLRUAaOfYwDcdgecZO1qTBsRu3eLKxhj58B0U2kZo17 WNsz2AWEKVLgM/aZKyJsmaFeSkj5Pp07dI7ySwUTIbh95PqDKrgysshiES09s2PJqfn+ dphFsScHRPlKn8WhmY+JJc7EcqUV1I6+5lBbnyDt1ApIipYdcbpsbpcMF8QsFhSXclDm 0Ql4yAbpOXKJQsRQWxNI1HYuH8ePgbXZH/gmeuusRln2m51ypaKf/uqscqSjbfc2yfuX cstg== X-Gm-Message-State: AHQUAubHlt8vYF/MfLRVn60ISGKvcGmonm6ZoaLFs0acFU5mFJS6Uib9 3RdMXvfSeZURPdGrQf2CVUuwqYQbrg== X-Received: by 2002:aca:4c58:: with SMTP id z85mr5789698oia.140.1550671211523; Wed, 20 Feb 2019 06:00:11 -0800 (PST) Received: from serve.minyard.net (serve.minyard.net. [2001:470:b8f6:1b::1]) by smtp.gmail.com with ESMTPSA id b4sm8936790oti.71.2019.02.20.06.00.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Feb 2019 06:00:09 -0800 (PST) Received: from t430.minyard.net (unknown [IPv6:2001:470:b8f6:1b:d1f6:7172:48bb:512b]) by serve.minyard.net (Postfix) with ESMTPA id 8EA531808F1; Wed, 20 Feb 2019 14:00:08 +0000 (UTC) Received: by t430.minyard.net (Postfix, from userid 1000) id 165E6302A62; Wed, 20 Feb 2019 08:00:07 -0600 (CST) From: minyard@acm.org To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 07:59:40 -0600 Message-Id: <20190220135956.22589-4-minyard@acm.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190220135956.22589-1-minyard@acm.org> References: <20190220135956.22589-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::342 Subject: [Qemu-devel] [PATCH 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: Peter Maydell , Corey Minyard , Corey Minyard , "Michael S . Tsirkin" , "Dr . David Alan Gilbert" , Paolo Bonzini 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);