Message ID | 20180924144751.164410-53-alexander.levin@microsoft.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp812378lji; Mon, 24 Sep 2018 07:49:11 -0700 (PDT) X-Google-Smtp-Source: ACcGV62jYjBVfaoCzejhb2ebOhfntSra9k3YvKOnuBxu30yGFhURxyWt3Xl30ooikAwMKsFkU8Vz X-Received: by 2002:a17:902:654b:: with SMTP id d11-v6mr11194440pln.8.1537800551828; Mon, 24 Sep 2018 07:49:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537800551; cv=none; d=google.com; s=arc-20160816; b=kCjC77FCL6Xw3lw8ZM0U+DyrELsp6Tpq8UpqIqrWAxG9OhUgQexgebSc64274qWVMi nfUweo2Xj1Qbzd3ODIJHoAiHFaWrv+ivdJUJYcRs6s+Zaxjq4NbILDpYA4k2J/Gt7fZJ A4lZxNTUQqReNWqbbS5BGOUY1TbukJATWOfvE1qREDxyyfonsTm4bJzc+ukbYck1I84O jM49C5T46rDc8BBfhemObqe5u2D/FkIQ4hUGhx4oGvtskyZ7vwLLEa2bdlGjN35QKd6h Osysmc4lm56lS7J3xXw0B+USNdyE1fy6X8Hy4mUBfPplrVg54v9QjVj+l3zfG7lHIL+N ZElw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=38ePBoYt0LmN1jhM9rv26rIrhCKdt3Ibrx2fumzgZUY=; b=uNPTDjXbncyz2AarRx4vGNHkh9JwRxZ2WZpZiXlfgwtmGqnyeklo5bWlc/3DbizO9u yTF4TIEhpVvcQJXH/1kzea88003TPKpTx16zn4wvFdlE1OLcS3Htd77gqe//wU5xXRHz g5XuTiv75ur19lCvv06tfQ7StJcICCnmpdWSmNtgyvMmTxKnrenn6RrmxV1kr9T40dr4 noBkVFhf1eTmlU0iEPt2VjzKvqPTk/46nHZdW/n4pcIg7T5hOWY4fYIKGe++JlNU/NMZ eJ+E1PEfKxBx/zO0H3RJ9qtzlxDJYdPdgz1rzzDQNRHaamZbdrIylhAqSVpq+UKE5rIc vBXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=QUJUSwgD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g22-v6si36586989pfb.136.2018.09.24.07.49.11; Mon, 24 Sep 2018 07:49:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=QUJUSwgD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733175AbeIXUvj (ORCPT <rfc822;igor.opaniuk@linaro.org> + 32 others); Mon, 24 Sep 2018 16:51:39 -0400 Received: from mail-eopbgr690129.outbound.protection.outlook.com ([40.107.69.129]:55616 "EHLO NAM04-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1733009AbeIXUvh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 24 Sep 2018 16:51:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=38ePBoYt0LmN1jhM9rv26rIrhCKdt3Ibrx2fumzgZUY=; b=QUJUSwgD90C3Qf4znP4gqgwp0lmBiFm9g2AmCcia07GLxMbzQkur5C313wrFAPoQrXNZeDdXOqSzmw4NUw4fpE4xZylT5F6pNEumrSVj45Ah0QCt86CtECf9ffpHWAc6SKnOndgVRWwMHjo3NDT7zr8A/4V22FMxJMm9yCp4EkI= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0744.namprd21.prod.outlook.com (10.173.189.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.2; Mon, 24 Sep 2018 14:49:00 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36%5]) with mapi id 15.20.1207.003; Mon, 24 Sep 2018 14:49:00 +0000 From: Sasha Levin <Alexander.Levin@microsoft.com> To: "stable@vger.kernel.org" <stable@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> CC: Masahiro Yamada <yamada.masahiro@socionext.com>, Wolfram Sang <wsa@the-dreams.de>, Sasha Levin <Alexander.Levin@microsoft.com> Subject: [PATCH AUTOSEL 4.18 54/76] i2c: uniphier-f: issue STOP only for last message or I2C_M_STOP Thread-Topic: [PATCH AUTOSEL 4.18 54/76] i2c: uniphier-f: issue STOP only for last message or I2C_M_STOP Thread-Index: AQHUVBWrJYaaelVMBE6nADoYOuhtRQ== Date: Mon, 24 Sep 2018 14:48:34 +0000 Message-ID: <20180924144751.164410-53-alexander.levin@microsoft.com> References: <20180924144751.164410-1-alexander.levin@microsoft.com> In-Reply-To: <20180924144751.164410-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0744; 6:M2uGOsMRJihf03R5QjzXAAeCALjs4xhVeBi3eOWX591b1BhpMAplO4gIZ/aS9hIM9inzTcJiOBSC6qt/olpAL6CpBvzOpQLKhbNki67pdxEyJEFUeGRnL5ulThpTIDSTmSga+ZoTZ9HX4p3ozz4ArD6Yv1ZE5jh+i7Gwf2iHxNI1/bVWDXGl3lQPqqnlpX8MWImDlc8w6SboLU0tMSs8tY7/QdMKrx2Asqp/mbFHf2ULDQOKyUI9c1i6YmfO9f4EeRSSdklbVYfFXBy6plLHgQjfFYzj4jOHtbAf6mHcX3gVqepVXPyHYNYWB9NplzDQ3a7x9/VzEjwzZje+dilXtr/bCH8vwU7FzbhCeTwQKjV0VYsNBOJGsKUpoCo4HZr5tKChb9uw2YSFGIaxOAcMwdWVS9lh7lcMk2aG5Z/Nrp1X/FsKOJI6kv9fwJHRaFswgOr43qOxH6pOXnQ+3zhL2Q==; 5:RfMG8Cmrq1WkPJ3+X4oVn03o9/P/BEDRKoCr/YIspevtBYZOKPlKl+9ZfoAgkn6zYyef9TGLhzvdkhz+oDY3ybY+qHjMbuUEK7CIhm5ckRaqjW2SbNHeMpTPjeRRUn20q32th5leH8LiDJy9+k37O1wLvLqXb6clV3sryndCCFM=; 7:sE4V9LsrPRSCNh8ol8cPVJ7uCxX3+wdkmAMkqPMtttxyz7UpSCJm1rGxQ4J8wZ/7R6cxba2tLy73abEAe1JpPNFe4NocK5dwlIe6DYyXA0EebE+opMUF+3gqUoBXKD/LWyoGOyNuz9gsEPdXgYikLaPAisnkwG84dszejyowPlN8KDv9k6mYL1xsQ/+/yd2ekP4woW59QIpE7CFNUf7j20trcV+bqG5Zjyfc6N8gc2D6se1BnogNNVwECK2qpIL4 x-ms-office365-filtering-correlation-id: ad711d66-3f7d-4fc5-59a9-08d6222cdd5f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0744; x-ms-traffictypediagnostic: CY4PR21MB0744: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: <CY4PR21MB0744AC44A81BDAE14483FA92FB170@CY4PR21MB0744.namprd21.prod.outlook.com> x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231355)(944501410)(52105095)(2018427008)(10201501046)(93006095)(93001095)(3002001)(6055026)(149066)(150027)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(201708071742011)(7699051)(76991041); SRVR:CY4PR21MB0744; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0744; x-forefront-prvs: 0805EC9467 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(136003)(346002)(39860400002)(376002)(366004)(189003)(199004)(11346002)(446003)(476003)(86362001)(575784001)(186003)(81166006)(6506007)(8676002)(81156014)(6666003)(5660300001)(486006)(99286004)(53936002)(305945005)(6512007)(6436002)(2616005)(71200400001)(71190400001)(68736007)(6486002)(102836004)(10090500001)(7736002)(36756003)(97736004)(86612001)(316002)(3846002)(6116002)(1076002)(217873002)(256004)(54906003)(110136005)(107886003)(10290500003)(4326008)(478600001)(22452003)(15650500001)(5250100002)(26005)(8936002)(2906002)(2501003)(2900100001)(66066001)(72206003)(105586002)(14454004)(76176011)(25786009)(106356001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0744; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: NjVwxmfDgFKvlBSdp1lcG6+2KeLxTarf1WYdROoPgXgMDqOyYWFFybo2pgogvBYAPVG8EAvbmUKk6n7UlppYFOIRgV3sHRuX7c+L/EdDuS8UmPAw7dX4n3DiYHeBlpfY2K+dLHFwvf7KByv8HiamIfZDzs3c7U1Fsj0oGM9lDSxsyqttACdnNv5RynlPYRadXugpEuViBlVIV8MladTZbTN1XkTaqWeGiSjkdYzlPKEiLRIr1nlSehZ+edkNnpI3nIxr7nPDwh1ucc3b8idWYK1HbtAcCzz12id0HNMvQuZhLZIGxaj8aV1F6428YVsZiCK+xsxgQJOf0unyF+raMRU1YGv+Kg8WmQNnnAjimFU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad711d66-3f7d-4fc5-59a9-08d6222cdd5f X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Sep 2018 14:48:34.6017 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0744 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/i2c/busses/i2c-uniphier-f.c b/drivers/i2c/busses/i2c-uniphier-f.c index 9918bdd81619..a403e8579b65 100644 --- a/drivers/i2c/busses/i2c-uniphier-f.c +++ b/drivers/i2c/busses/i2c-uniphier-f.c @@ -401,11 +401,8 @@ static int uniphier_fi2c_master_xfer(struct i2c_adapter *adap, return ret; for (msg = msgs; msg < emsg; msg++) { - /* If next message is read, skip the stop condition */ - bool stop = !(msg + 1 < emsg && msg[1].flags & I2C_M_RD); - /* but, force it if I2C_M_STOP is set */ - if (msg->flags & I2C_M_STOP) - stop = true; + /* Emit STOP if it is the last message or I2C_M_STOP is set. */ + bool stop = (msg + 1 == emsg) || (msg->flags & I2C_M_STOP); ret = uniphier_fi2c_master_xfer_one(adap, msg, stop); if (ret)