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: 156836 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3725470jaa; Mon, 28 Jan 2019 10:10:36 -0800 (PST) X-Google-Smtp-Source: AHgI3IbbpKkRJZvB/fJCBMRuagIjGoOyP2MK4+9P1PQ31tTQcQDYemc5gJ6VOdDgSv+nsFbXDwyE X-Received: by 2002:a1c:e10a:: with SMTP id y10mr8517674wmg.73.1548699036168; Mon, 28 Jan 2019 10:10:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548699036; cv=none; d=google.com; s=arc-20160816; b=sFOEA+sPPPnknwzXtSPGWz0jv8ixMiYkuUdOlApXF8RJDAbzMsREwQGQ+iimrKhdjl JZNzjB70QON9cHfrIKncJ7zphubUjTgU45Hfxxk84fo9htsQjSFzeCeVjCxfazcB8I9f Au+JL9iWDQWCG25TPu/+R/Wlo5gJ26H7l8vmIjfInMxk+49R8P1yoWtFn40RH4qh1VLX nnr2jExei8sKpF9L1ugHFqLgYRYKVEn0dvrePw/dUqa3y17rZ8AHZIgmJidkQe40c9dy qth7pufQfd0yPnPHacC5XD39ofYYBtEBxW66ro3q/jQzC+W+YhFelj2KcKpRGwuwDR8n dyzg== 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=CahfqUNRtQ0ioayZ4sVxn3y0cMHXeN6cMSkJSyfMvrsRIKXnqR4dC7iAEk/WZ9N7Tq wi1Dd/iT3i4/eLnMe1JZF2NHwcbq6c4LAuWQ56oyNK8BmhcUUjLzhlXfcqknMRZFlCen X+lFnWswgnBLVbpgGujJcqU63iYbhDEGsWns2giSvcU+p+sUowH2K5Sx0wB2ywHJ2LED X6OeTQQThE7eNWjxJrnrex375k3r9Q/kQau1AQYN7YfsC1RlWTW+ZKPxxJCxD8S8pFDX ESeYelzP6CeF5MN6nxF0KJ4OYa24iqk1tE0WH5xOdFAw3jyKvuF5fG9Qv+wbp+AyCIFa gwwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="vbp+/Qv+"; 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 l1si85809wmg.90.2019.01.28.10.10.35 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:10:36 -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="vbp+/Qv+"; 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]:36306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goBMh-00015E-1s for patch@linaro.org; Mon, 28 Jan 2019 13:10:35 -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-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+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);