From patchwork Mon May 14 14:53:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 10398667 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 93E5460216 for ; Mon, 14 May 2018 15:03:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BB2027FA3 for ; Mon, 14 May 2018 15:03:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 60A5227FA5; Mon, 14 May 2018 15:03:26 +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 B88C227F82 for ; Mon, 14 May 2018 15:03:25 +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=IBfT8APaQP8QbtYE/mCD/0ZpJjf66PObGNMCZJvDFsQ=; b=f0eAEh7JW286Jf g1HVhLhbyJI5935iYiBPD6jGuH1zb4XTopYywS4sj/x8gwKfmeRw2wCzJHN0kz2LGFgj4KBYRYOtN M4ycDn0WcW0SmQs1TbWah/lKY/FjAETUTRwh9sPolzgp3UIcISFrVnuyHB4VPsal3pC972jYJsfxu 0KJFWzpEqi3g226r1Kx90asITxWIBDi2jrmI+iBYs0khXCxUGajLg7+I0Nj00g9fmfgG/AchE++qt ROijEUeBwNjUWONt7ALX6llzzhOt/Hq8VB2X7hN0CHp3+nn7pbwWhFGcPK9ukp3j/XVOQvZjS9P32 w+s1yB/KvGtYRgcrcxZQ==; 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 1fIF0L-0003aG-7V; Mon, 14 May 2018 15:03:13 +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 1fIEsX-0003KX-UR for linux-arm-kernel@lists.infradead.org; Mon, 14 May 2018 14:55:13 +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=0vmbbgCdp6wwXq+acbrc6IQ4HS0dNKVUn7WP4Qo4J0c=; b=uHn0LB5RvWj34n/MXS57dN+wZpnv20QUES5i9oUXGFns05lQByrZwwTE/RuQyX1rK4V1KlYFdt4mOgC04cOXp7bzr3s//4PvMvJb6hekxXXg/n8evFzVAgZAOz88WvP35a2XOXViRUQP+zlMZdxzjr7uz9YkYS2XKAAB0ZxXOyI= 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:25 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Subject: [PATCH 07/21] i2c: efm32: make use of i2c_8bit_addr_from_msg Date: Mon, 14 May 2018 16:53:16 +0200 Message-Id: <20180514145330.4857-8-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:qw9zN3uG/6lOvtIEKT1aXWmKoyAiNQXRI59fHNK6mJmPuGjyO2MBJRVzLHK1BXeJS0D+dj1TnEs9hlsNNn99WcA1lRsolAzPyp2XWPoNP6ZBaS03RzvdWo9c+LDhSnBNIlqxNLDPOyp7bOpqQjoWKPbRBDTchltAn6eyztvtdSBZOy6qh+/Ok11qryNN3MenpaS7/8v0sDSl9LZ+Bp61c/Bh+mjud8suelFzET9Fr33AriOzbwdgXtFMJzRN/WGN; 25:gcf9sL8uj2UqpBrbkO0eMJVkTarhm1UAptDDeCtA0HJMu7u20MyD0ZJmw9i0Y6ZZDVo3ugQm7YvVrXVTThR+cgg64uNkPGw0nr/EeTf6XRwJvcVo1sfb6qcvck1/8oTyRgKHEayh0R2PVthS6mnOdCAZvEbRUfu8UJO130VfguDN+Mqv5nbudgMduDN5tXiaFzGCT3dEknxTHtu9v7bryPPTxXnqv1fFea9gkMpkasiWkWmtQXmEkve6D3Azs47yLdeuNaiNeMuNEbukqSWd39NGdoaNgnX44LkEgIFJQ0zvo3ylw9NJrlRpkGt2XhCRSCsCN5OzAIpjWidRe5zsew==; 31:OHoLPv7IcZCPs4v+k52BYutYYa/RUSkj6IaQfVEHe7+y9fZpp8vne61NO/wyzrmaKqYJxn00KdweGywDa+1SHEvVDOCqRX2mq6HpvFPlRqAcqk5RsJwNkuY/h/ZxDuUkvMbCXQVLHYBiWvKO00kuPPwaSdjg9Fk4YcPibaZHC1zGnavDybmsgTb8dXDth+LoQqo4JQE2mQwiiRc2sjkG3dwuuad75d/GKWRBM4GjR7c= 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:Zs0IgjazGSgAnw1QfQBJNspLgO6HKTQsO22M/JUTOivh3wXpbbIHT1KMrWIp/oOTD/0NmArws2DDy0573xh7aEkTyka3UwNl/Dob8td8hjePczlIV471N+IJvdwlYhU2KqWuuWY1lDg/TxFGpyoWK483ZhHuOcXWHOPSgJN7d8wJYCOU4b62RiW9+rchSr04dvc1XGMnYaH/v0TbEwr9Cgisp/eZ2LxVgYEYdpAHCEPlegi6lyimXp1NzTiKUrRgpkuk2B8heJDdwzXSE5lxJQ== X-Forefront-PRVS: 067270ECAF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(39380400002)(396003)(376002)(39840400004)(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)(186003)(16526019)(476003)(81166006)(25786009)(6512007)(11346002)(446003)(105586002)(7736002)(956004)(106356001)(2616005)(6506007)(36756003)(76176011)(386003)(2351001)(305945005)(486006)(52116002)(51416003)(26005)(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:yTilnvqr68a3w7ayI6091srFI7Q7tJ/ZbFAa/aK?= =?us-ascii?Q?VFs9bEBmVD/2yPuRuEA8Ha/1gWwoMeDixZDXOBC9Sm0nnL8Attix49NmtHYG?= =?us-ascii?Q?by32+zVM4wTidf9Of4hBM5WB80SdxSmBvLNYrlp42+QJSweM6opooD2aj5EJ?= =?us-ascii?Q?hf9BNNMmuYpWW/yjODpdH3hdUnigx9rvfY7su2LBIz5yXGACsXA3uCY+wtlD?= =?us-ascii?Q?Sza9CnJjKIhWGDjM+v/NqigZZoryIwbdZe03kbk5g0BzOEysE/Wo/ZkFKN/U?= =?us-ascii?Q?mCczh2pG1BpWnqYyFE/Y2PKINbhBUHbCbvOjNbND+o3waoDcvheptKNi7GhF?= =?us-ascii?Q?K9YWsyeKuOkr4Vr6PXr1nCML5dW7D30/spXjaiffq2t+mYoWEe9wl7cuCIg7?= =?us-ascii?Q?ctzVdMtJ1nBdxvD7PeTzTtkkLJxZyrYI/D/96D2jqUB7jkBPkKBPFDIFqRev?= =?us-ascii?Q?pjQbPRWL1w+ZGaS/Odz0uZXAM237/twHHHhfxwtC2ncNlW5kNQfjMBLdhGWJ?= =?us-ascii?Q?hLLE+SxCo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j6pW0pt2zQmv8kjROBeFiDeImiBa2kSI/8HgRniCZW4SIigdBb8VulPpKJIH1lHVyEtm7Et7DENzCwqxeGBOve5FBu/suoqkwifkRa9rhl+6i0NTRRlk+PeZ+R0dgFCit0D4b4F6XizFGiT X-Microsoft-Exchange-Diagnostics: 1; VI1PR0202MB2782; 6:ys0IApEbhwoZr2FtCmbJTJYbfG0isEE/CiAAdAZ9V7/+eqHC6xVl2XqAxiQVPy0hUuaQlO8rmrLZT5x0iW0jcsqlmUGqPbBQsfy1k6ZWt3pT5TgwGitPhhV6sxZJn7RcHPvQDCYCjhfys2BwSZQQAC4SuBtOp9uQT/BvEH7oOmIdLsRq/szdB8iHj8vV8KHGjrGr2BixpQNOPYvE4zC68w3LhkqIsI4fmsO3mOUXEaI7HquOsYbq8MXWBpvSKZ8p+r3cWRDeMPWdoDNGBxTukZEtGR8GWbw4Imefb2ua8ysDcwyzVxnkKNqR3JXnxwXQT059T+F4yOqpSeOm0evZNxgsWFTNGZ5PqJX7OvXDrsvKvRpxQ8ekUV3+62soxeXKEtz6VLTd4IZ3sryazj6h7AJEyknIeZTavvL/XZiEG2JlTyP5UeXnZLbI1JUjKCporg7mkywg7VbsnJzlWTmNsQ==; 5:l8eswdc0LrRfdcDaXYboCpXvNoKMhfac+65ELGeTj6I8nit5CDaHvn6z9SLqbAavlntHb2anRdPR+LtNdKnFhQP0xXPEclKJuLO9l/QMap/sEj+VdcmXwhJd19t5I8Q8CaMwaBcnK66lrtQHJXpS9YXHL7JAvMGslsU008FMHS8=; 24:AdnI6tPxyHFk66ADEi8Pl3nJyVfaTRetFPIzrVudF4d+x0zb4stxSoDfaKiVOxwV8L7CPOzg2c9EmCDtwLv4WiXDB35bWbj2I809LUtHi5g= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0202MB2782; 7:yluhiEPZJwK/Iv2zGGgInoX6/zxaXmFslf780wwU3S+5a0ewSE8LrEeeGUm8aPPyZTLszP8YJgGTKBGtgGd7RxwusWH0/JHBreP4D4dSlCkMFRBd5+eWZzc0rWV8+fwLdgJ9BK+kQfX31jBECZ9H18jvsCxFYfhDDQ1l+3MiLA6ARnptEE7pzuL9vacqgDY+rZ3kTgTTrgfdHTkL5gr4MV5GV9mkHD+vFpINThi0pl6Omt729nFWovCJBAeeLLDr X-MS-Office365-Filtering-Correlation-Id: e189116c-8f41-49d8-6260-08d5b9aa9632 X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2018 14:54:25.2787 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e189116c-8f41-49d8-6260-08d5b9aa9632 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_075510_087209_EA92ADF5 X-CRM114-Status: GOOD ( 11.10 ) 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: Wolfram Sang , linux-i2c@vger.kernel.org, Pengutronix Kernel Team , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Peter Rosin , linux-arm-kernel@lists.infradead.org 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 Acked-by: Uwe Kleine-König --- drivers/i2c/busses/i2c-efm32.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-efm32.c b/drivers/i2c/busses/i2c-efm32.c index aa336ba89aa3..5f2bab878b2c 100644 --- a/drivers/i2c/busses/i2c-efm32.c +++ b/drivers/i2c/busses/i2c-efm32.c @@ -144,8 +144,7 @@ static void efm32_i2c_send_next_msg(struct efm32_i2c_ddata *ddata) struct i2c_msg *cur_msg = &ddata->msgs[ddata->current_msg]; efm32_i2c_write32(ddata, REG_CMD, REG_CMD_START); - efm32_i2c_write32(ddata, REG_TXDATA, cur_msg->addr << 1 | - (cur_msg->flags & I2C_M_RD ? 1 : 0)); + efm32_i2c_write32(ddata, REG_TXDATA, i2c_8bit_addr_from_msg(cur_msg)); } static void efm32_i2c_send_next_byte(struct efm32_i2c_ddata *ddata)