From patchwork Mon Jan 28 17:54:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 10784267 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 832356C2 for ; Mon, 28 Jan 2019 18:09:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 726AC2A445 for ; Mon, 28 Jan 2019 18:09:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6549C2B507; Mon, 28 Jan 2019 18:09:21 +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 2BFF82A445 for ; Mon, 28 Jan 2019 18:09:15 +0000 (UTC) Received: from localhost ([127.0.0.1]:36306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goBLO-00015E-BN for patchwork-qemu-devel@patchwork.kernel.org; Mon, 28 Jan 2019 13:09:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goBED-000396-Fa for qemu-devel@nongnu.org; Mon, 28 Jan 2019 13:01:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goB8V-0005ur-Me for qemu-devel@nongnu.org; Mon, 28 Jan 2019 12:56:04 -0500 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:43662) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1goB8V-0005Yl-El for qemu-devel@nongnu.org; Mon, 28 Jan 2019 12:55:55 -0500 Received: by mail-pl1-x644.google.com with SMTP id gn14so8050928plb.10 for ; Mon, 28 Jan 2019 09:55:20 -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=vbp+/Qv+tLwxfZll/uLeErLiVwmV9uwKl7ZD+rzM38yQD+BDnXvhsL96psjD8G+7cF V2lzuGoAo8CzcWHM/wTz+oU/VF82VJ+Iip5iIket4EFmx0cbs8ccLqv9gV3lnLeX56kh PjKfj5sVu2BScnKMicGkjCFIUYG/woMPU9nR50IV9RaLmzBPye/uId5KCHjYQojKemJg pZJnzvmf3pKyoxL7qoTgNrffC2uuBUvdep1n8zjzQMw3RPJZTcVzV6hEaOn4/lWzeOvN KebLi17oN5VLnUOEV/L+NK9CusZN/GXqE/g66kPeIQOYP77uvIY28EXHbCaWfApV7Aum WTEQ== 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=HAEjUD56jSd5WKOGp6loCOdzUzcWlV5gqdQ7OTloljnKfx00nqZf1gkbWdHN8cLzXr U1e2I6LFxv1IPHKu0Dgnv/7LZdkatEb6Lwu7UVWxx3Vfub5fb0vWXM6hlilC/TW6tKo/ G7C2HkfJGroRgvLUc9WzgnWQNtCe4PrB+mMZWID2QIWJ3kN6o6q7mGKSIUTKJ21RFMEt eAVLhqQWaKh7ESvHYjX4d5hZRDZzC7+AvVdrvr9nx3TBeV+fps1w2vemymnARKSt4Nl7 tp2xkgxHnHBa5QPZfLRzXyKO3MPFKMrnyO4WFW8l1p/fKSgnHG7LDZ7kK37Scuv1DT8p 2LrA== X-Gm-Message-State: AJcUukcEtQWhlesPMYZ/dnrVn4nZ/bN/Xzox98ETjhHBH8hrUu4N9C/p kNqS0vcO8MzF6rgWleKpRA== X-Google-Smtp-Source: ALg8bN6nCB2Pkd3XxAhFNIaXLmEWtWkYUUXL0rc/c/bVZPupI0+iGclf+Tqhe26c5mdR+yjacKPryQ== X-Received: by 2002:a17:902:2868:: with SMTP id e95mr22804057plb.317.1548698119219; Mon, 28 Jan 2019 09:55:19 -0800 (PST) Received: from serve.minyard.net (serve.minyard.net. [2001:470:b8f6:1b::1]) by smtp.gmail.com with ESMTPSA id b202sm50579825pfb.88.2019.01.28.09.55.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jan 2019 09:55:16 -0800 (PST) Received: from t430.minyard.net (unknown [IPv6:2001:470:b8f6:1b:c8f8:7971:e432:a838]) by serve.minyard.net (Postfix) with ESMTPA id 800D8EE6; Mon, 28 Jan 2019 11:55:12 -0600 (CST) Received: by t430.minyard.net (Postfix, from userid 1000) id B4D7030115B; Mon, 28 Jan 2019 11:55:06 -0600 (CST) From: minyard@acm.org To: qemu-devel@nongnu.org, "Dr . David Alan Gilbert" Date: Mon, 28 Jan 2019 11:54:42 -0600 Message-Id: <20190128175458.27255-4-minyard@acm.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190128175458.27255-1-minyard@acm.org> References: <20190128175458.27255-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::644 Subject: [Qemu-devel] [PATCH v4 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 , 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 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);