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: 10822395 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 4828C14E1 for ; Wed, 20 Feb 2019 15:39:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30A932D78F for ; Wed, 20 Feb 2019 15:39:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 221032D7CB; Wed, 20 Feb 2019 15:39:20 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 11B002D78F for ; Wed, 20 Feb 2019 15:39:15 +0000 (UTC) Received: from localhost ([127.0.0.1]:41046 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwTxq-0003lk-AH for patchwork-qemu-devel@patchwork.kernel.org; Wed, 20 Feb 2019 10:39:14 -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-Google-Smtp-Source: AHgI3IaL9Vdag1T8fYMTL3FkyaWZtvrdQgGo5ZqqjZH+bK5B4YPvcXtyJY73Z+EVek+S47Tue+10UA== 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+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 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);