From patchwork Mon May 14 14:53:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 10398625 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 63F2B601E7 for ; Mon, 14 May 2018 14:56:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52A551FF87 for ; Mon, 14 May 2018 14:56:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4742D2787C; Mon, 14 May 2018 14:56:03 +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.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9DA921FF87 for ; Mon, 14 May 2018 14:56:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GM2LM9j2zHONZr8KYQYohHk331/74xqxME/1T3rxFMI=; b=Pj/9OjR8ZA+m5d tme3pHlx9l0XKa8qty2XSPcnO6x+P5GQNF23AzLpEW7kibgS+YAWbn4/haYzS4YhUquuTNr9rtREL jct4wK6pSnHDRfKRPGlvst/i7jLuURQU9vtYZofcvcmmTGfuieH9v0UDQw1N0da/XLsGZVj7Mm8df hc5Vqnuq3808xS5e4UI14swClgfzIPfUNN8/5uPobxJYjIiQQ4QCueGHeUpbWArgyuuD5pUVkgVZs IY62/6pR05lWRpRMKA9qPASWv5hsF3PNQ6SexwV1Sjgr8KvdvVDb5RwpA3Ibma5BFzKHIgXlr4AYc TZo4RygevBLlCKG3K3qA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIEtE-0006DD-61; Mon, 14 May 2018 14:55:52 +0000 Received: from mail-eopbgr30134.outbound.protection.outlook.com ([40.107.3.134] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIEsB-0003KX-1A for linux-arm-kernel@lists.infradead.org; Mon, 14 May 2018 14:55:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentia.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jaLo4uMF+vNE0IbtlzldIm4j5w0JJdGkYSeCx+u8P8E=; b=oF8FbeIyyh7i291BJoI4chnruhoFIaRAoTM0tI1PUXUU7ySZqwMcNsd6+5EF2MdIyr00Ci/Dfrw3/usLVw3tTOdbW4yt+dCNU+f2rwYB0X7rybzFHb7IWZN8hftndSCC9vF8+HiQdWQ3onlQiN8JNGyyUyBdZSq3AHyh9ddd70M= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; Received: from orc.pedanet (85.226.244.23) by VI1PR0202MB2782.eurprd02.prod.outlook.com (2603:10a6:800:db::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Mon, 14 May 2018 14:54:16 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Subject: [PATCH 04/21] i2c: aspeed: make use of i2c_8bit_addr_from_msg Date: Mon, 14 May 2018 16:53:13 +0200 Message-Id: <20180514145330.4857-5-peda@axentia.se> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180514145330.4857-1-peda@axentia.se> References: <20180514145330.4857-1-peda@axentia.se> MIME-Version: 1.0 X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: HE1PR08CA0043.eurprd08.prod.outlook.com (2603:10a6:7:2a::14) To VI1PR0202MB2782.eurprd02.prod.outlook.com (2603:10a6:800:db::7) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(7021125)(5600026)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:VI1PR0202MB2782; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0202MB2782; 3:X7Z3sStox4t+sLTRxaJ6e9f4ZqMsFwN1aQmuRnx6L/d4/NgDUU7kYwcIrmdNL6Q7HidoPl7We09p7oDgn0lpn7uO+7/v5dVjLbTanPEUvnESt5HA32geX3vV4wh2mD9nyTjiztTz0KxuDzkRwGAcg8GxTc2MUlDWqSaMTK7dpIvN87wG67hvv4B0d1a95n70wziGvCq+DuFMtTXjj9X5POQTY3s57Nvjm23yOmLfPNEh6A9vsAdC0ysNKcqlyCdV; 25:YK6ULX0sECz6l0GLfEHRAKT/JrgOkndCawwzY9ZiYD9A6l/q95gwWrFDNi2uHfZk7l7abPrr495VkNBNgniQFNEDYf+hjV1OFNR40QX3EVIeGqTl6HQ1YvJD86NQTFsycII08znsMFeB27YpAb0YkbhHhsO2nHX567hHE2DWBYBKQ02XQD8Qnl0nLIheYUsXaD65rkKMmeDNrB8pFaFNhwjogolixp1VrFu/IAB+0ZPBkP6Aos+HLaMvu66I3ML48H64TzvcyKJVDqypzoXSEpLTrt2VrsDzBG5vyqluXfW6cNkNzoXpQzD4SmYQnAoMg/Q04tjTyITbqpyJC69hvw==; 31:uBQLLBIpqiw9xJZBISKkP7WK80E8lge/rvggMqQgg3Y4D3DaVeViLnJlcOI9ZIK/ysVcBp2GaV/L36vb6U8db2lEezuNqVlUj8iJl40BE+HYV2MXW4n+Y+LUG8TzMzoWJiJxQCW6CDLGqMhJnc+Zv2lNoaazO1SAZ0csgPAwZyBpqxVVNLrQ4Kw/sqkDGmcAmUWX+epgOMjS8WYDKDdOOOhffC1weVtjgR2Ab0DRMQw= X-MS-TrafficTypeDiagnostic: VI1PR0202MB2782: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(10201501046)(149027)(150027)(6041310)(2016111802025)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(6072148)(6043046)(201708071742011); SRVR:VI1PR0202MB2782; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0202MB2782; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0202MB2782; 4:i45CPtHY+YSjIzKRUVNWp3eA9QTL7P2ZUeAQkIkq4MZlzosKrfwcA3wLpmTlMH7s2GotdoAie0jGsnuzBOV9CXdLEmVnhRbYWJe2KtrYwkADWO/Ru/aHPpMgq80GNvdyW0JJmAl6byNPKndeiZm0yx1iVYkt02kW1Hm07Vi16oyVGVBnRTp7eOjiWxqypPHpjECraXuHPK8/aKpyAWXl5sK4loDnWqfCcPAQ3vlWM86jNNI6tX/dz9YkuvjwO3XTGqK46M7+GfVY6Ew2iDOGVA== X-Forefront-PRVS: 067270ECAF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(39380400002)(396003)(376002)(39830400003)(346002)(189003)(199004)(48376002)(6116002)(97736004)(68736007)(478600001)(4326008)(5660300001)(1076002)(6666003)(2906002)(53936002)(16586007)(3846002)(66066001)(6916009)(316002)(15760500003)(47776003)(50466002)(54906003)(6486002)(50226002)(7416002)(186003)(16526019)(476003)(81166006)(25786009)(6512007)(11346002)(446003)(105586002)(7736002)(956004)(106356001)(2616005)(6506007)(36756003)(76176011)(386003)(2351001)(305945005)(486006)(52116002)(51416003)(26005)(575784001)(8676002)(81156014)(74482002)(86362001)(2361001)(8936002)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0202MB2782; H:orc.pedanet; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0202MB2782; 23:Y2ds0rzHqTDfMjDkELPZzM63jkjxb6bU05X/1n+?= =?us-ascii?Q?l8MCs11LFzFdhideQ+HBs2QyOPxomuJVjZJbDjQzHbjwj0CovC3KaTJN/fKJ?= =?us-ascii?Q?VU+B9NFSh90mFZB5rWJFxaZ/3LTH61s1/1JtmrO6Sd5iv5EoPBSRcb0/eaKh?= =?us-ascii?Q?NoCQ2Agb55r7kO2w5kMt8q6i/befFudd+git7qHVGGeOt8qfm7gLJJDj61yQ?= =?us-ascii?Q?34uY8bFPrLSsUhHDSLaZMe70Bvu/68W1773mlc1dB3ssKy5qkpQc9rASs10K?= =?us-ascii?Q?IwgC5thfDNL1lwyE62VGuEuZiKiXqjIsqQp7KIweoGr2fknf66X+XCcflBLL?= =?us-ascii?Q?Gu+c3pwbBkumi3JJQ/7KsdXNXWEzFxMHbcHuFpeMrxN4RkuKLTaVMYc9ujp/?= =?us-ascii?Q?mZy1yNmm0OoZe6GOr2sg1i7ARCoFbKiMD1x2fZ7HtHcXqpvDFeukmNDshGI7?= =?us-ascii?Q?vULKN0W+9OC3Eifg+gxUyFoI6DgRcXR0jBG5JnFJOqEN0a8fGy+RvqABdznP?= =?us-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D?= X-Microsoft-Antispam-Message-Info: Gp7+xWoFn3hvEDjQy1UVxD9VsAXp4Ysv0iOmm6/1bceGkT9ckbx6WEYOpsS1cHf3e0VxoiDPDvnavq9RGWsklo29KlE7KSjLX3j8KEzv3NMh2REfkax+c8fWI3bsEFk3yaGXcrx0GD/L2rIUXtnupeWikq0TG88cpfwOOq4p2RX+ZsnCErIJ/KmpblHx0MA5 X-Microsoft-Exchange-Diagnostics: 1; VI1PR0202MB2782; 6:paLvJxlQ+hR/l+d2jcMfYzMfvCw7Jv++JzOKSElywFbj2x7lzYjdXrge7Io7cn1xhXr7SlJJhphesDbD4RhmP2yJV9DdlKfdaOiehgkNnYhy2he7zHTyJV0sm06Mm9LIq4ZtKkflJmsOGL1n+b9SuxXRkmNstaLEMlIfmUY69bk/ZYMYBShYfC0zJkmO4q1uSeLs+OsBtr996Xn7pkFFB6XQLXME83KUmnIqkKRSQ9bp/sn+51hLB9tsgzpZkmtyk6GIEcDski6H5Hr6cWsGaYd91waZIGVG0cHB59HjDRVHeJiUphug6vij/+6Qt9CFht7/OyzvTR+xtg5VmwUBKvSJYsd/cZ73hebYMOdwLZzG3sN9wMDRaVXKKbbdMu787PBCy+LXFexA6TbvARVXhX8ozeJ7+tMQRyoCeo0IZ+V4PerbOK6OVX1vpCxZgjJvVxiXYdJ4lundlQJ3D2/92A==; 5:u0NphFsBuDkbUsGjJLdiRrI29tTJWEuprvVH3nHP/l03GYfSa0tPpaSKxcuXlG26wDLr6xpNr6G4BP/aBMNsXZYoU2AsNeDn3wnivegpn7cz+2sOsh1VVbWNCxmsHbgy/BQ2EpMHp4CIW2NnDTFR1y9WhxhB9ji8XnUYZCIBZsI=; 24:JIH2j+f4g8vMrD5Sl/+VB3z54rRB75wdZS5DHZGvAnnQmlcfAic/rfRHu66UNKgDhbGAgMCunbW+YX38904MP9ub7AV1vDYs28bWTFt+qro= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0202MB2782; 7:KnSCTiMdDYtXxPdkxyD+HJHrMcYs+tWwy8mXacy/v1c5ix2+e0GYyVDe2P/U17yH4vxW9AgN91jTGbFBrhlJNkjR5ptvX9Nm9VKC7/7n9Qq9Zgmq3ZDQz2PcmmcekBVkDL0NtHajn6MJK0LyeY4ps/YvEn/dCpLfNEn4o4vzNs2JROm7Rx3Moo2bxOvGQtsM4bFSdzRyAmluwYUPjJjjxtTwLfoe/ZPF4OOJQkV99CWkKh8V9gmy9v5B7cT1dzHC X-MS-Office365-Filtering-Correlation-Id: 131a0c51-efa2-426c-3a13-08d5b9aa911a X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2018 14:54:16.4505 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 131a0c51-efa2-426c-3a13-08d5b9aa911a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0202MB2782 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180514_075447_138203_38AFDA12 X-CRM114-Status: GOOD ( 11.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aspeed@lists.ozlabs.org, Andrew Jeffery , Benjamin Herrenschmidt , openbmc@lists.ozlabs.org, Brendan Higgins , Wolfram Sang , linux-i2c@vger.kernel.org, Peter Rosin , linux-arm-kernel@lists.infradead.org, Joel Stanley Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Because it looks neater. Signed-off-by: Peter Rosin --- drivers/i2c/busses/i2c-aspeed.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c index 7d4aeb4465b3..60e4d0e939a3 100644 --- a/drivers/i2c/busses/i2c-aspeed.c +++ b/drivers/i2c/busses/i2c-aspeed.c @@ -335,13 +335,12 @@ static void aspeed_i2c_do_start(struct aspeed_i2c_bus *bus) { u32 command = ASPEED_I2CD_M_START_CMD | ASPEED_I2CD_M_TX_CMD; struct i2c_msg *msg = &bus->msgs[bus->msgs_index]; - u8 slave_addr = msg->addr << 1; + u8 slave_addr = i2c_8bit_addr_from_msg(msg); bus->master_state = ASPEED_I2C_MASTER_START; bus->buf_index = 0; if (msg->flags & I2C_M_RD) { - slave_addr |= 1; command |= ASPEED_I2CD_M_RX_CMD; /* Need to let the hardware know to NACK after RX. */ if (msg->len == 1 && !(msg->flags & I2C_M_RECV_LEN))