From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38DA44E1C8 for ; Mon, 8 Apr 2024 09:14:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712567668; cv=none; b=Edgty0xOouPw//8C8Dzt65PqS6/GS+9L8YZPFURCdJH/vr3v40aBLfcRNViNfKtoQQxYnxy/QIX/wlczqxH3GMvH+BnzWQjW7RpmwPZ53tvIKqtbRKHcVLXQKvFRvChtN3Lal+fjByQBP3SrAD4aXCgmsfPbke1aoz2whCT2r7w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712567668; c=relaxed/simple; bh=z4CDEMFIMTjvOLif5sUmisJHGO9R4pf0qmsvsjOnpUs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CK/W+nuUnSncJFwTUqUpyhFyewkHOW78oM//WNEQWuNOhMT56T0Cla0EzGI02X08ttpemCO7BmBXxVlbtITSG5A0QC0dJMVeMs+ADbfuf+OfTNJ3swu1dwIOguoo1ouyWXDZ2ozVozPxmcnEKcMnJxFQEEE1PjK67Vi4F1mhzgA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=D7b7JHh1; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="D7b7JHh1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=k1; bh=B1xU GkiU6dmYPsBjCTtb6mRNv0nuvWzUMFCwA7SNs6U=; b=D7b7JHh1oY0gpZfVrcWm bVLPU9k9q3DbofnpH/OfhR3aO1Pu7vm5BC95ccqnukqiFFrq8C8rPxn+wKmX3yhe BeF1G4lEhOejWaSv785LLOpfbA2CXkv1tFklvdZHYUEIBrQu1f4Ov4LfTvbfJ8FQ srPASuPZeYyzeQCSkLa4XimHy9jV7libC24ca6Cm23+2VCkgt5bO/P6hWlEPimz2 kB3OLKKsljxZDx4L5vzs51QWIhBGtq16LdG5EmnAQf8bwUuO/BWDKyrP3N7GQHUL ShiqM5VjAaxQdgLg/BpK6XAgAO/ji5/Ms71bCFHMNseI49LHGHg5d8N/hxz4Dxk3 /g== Received: (qmail 716288 invoked from network); 8 Apr 2024 11:14:24 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 8 Apr 2024 11:14:24 +0200 X-UD-Smtp-Session: l3s3148p1@3RREO5IVVpwgAwDPXwE9APSWg5D5lDs4 Date: Mon, 8 Apr 2024 11:14:23 +0200 From: Wolfram Sang To: Easwar Hariharan Cc: linux-i2c@vger.kernel.org, Patrice Chotard , Andi Shyti , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 53/64] i2c: st: reword according to newest specification Message-ID: Mail-Followup-To: Wolfram Sang , Easwar Hariharan , linux-i2c@vger.kernel.org, Patrice Chotard , Andi Shyti , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> <20240322132619.6389-54-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zc6r4szvuyukhmxj" Content-Disposition: inline In-Reply-To: --zc6r4szvuyukhmxj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > - unsigned long timeout; > > + unsigned long time_left; >=20 > Thanks for doing this. Is the timeout v/s time_left language also due to = the specification change? > A link to the specification(s) in the commit message would be nice to have I admit it is probably a seperate change... > > - if (!timeout) { > > - dev_err(i2c_dev->dev, "Write to slave 0x%x timed out\n", > > - c->addr); =2E.. motivated by this "if (!timeout) dev_err("timeout!")" which is super confusing to read because the logic is paradox. > > + if (!time_left) > > ret =3D -ETIMEDOUT; > > - } >=20 > Why did we lost the dev_err() here? Agreed. Another seperate change. A timeout is not something the user need to be aware of. It can regularly happen while an EEPROM is erasing a page. The client driver will probably handle it correctly by trying again. Only if the client driver sees a problem, then the user should be notified. But not in the controller driver. --zc6r4szvuyukhmxj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmYTtW8ACgkQFA3kzBSg KbaxqxAAqwfl+isJvw+Tbn4zWASNYgUCF88fdAOUyScMYpiIlRk2c7CR4M4BipLs ppKwIrsKht9D++ljltU34nnMNsirMRI+QBRVrOubmvln130b6d5PzLvw0LmL92BR 9sBawa9Ow1y14b6htJXMB0fjmbUtubcB4vn0vgPNl9DwOyZXGawSQbEDW7eB9Dag FePIO6KW1d01J54d3B0R+nBdbhB4Lr23Q99EEiO2N/f/Oa7cb6wc7nuqUkg1ymgG 4sTRUK95w+FQd2DhaAsXhjzRy1AqCCaW8O6RVDDhR71q808K+L+R4G/Ip/OvuPKS nEd1r9HEG4jOVhNNbjtE8vILhIYU0bwdHR45YNCUQDXWNdfvkXa5A3THpfpE0iF/ D1dsp030Ogwex0OFYtEcUOT9nMeE1Io46sTIwfhO/kmAx5zaZqNB/u0Duv5i6zPA vbG5yO6VEOU5wiJR97RTu1kzCs+UenOXSQ3mRjT3MJM5X8XvS/jQR6SSJflUsc7e E1tj9COegSg9APc+i0kMeJdqk6wV6JGS3XzYI5fOwaHaEK8eDORj/Al95Y/g1F3W yIYZbkL/TAV60Y4Z/VHYqblRa/eFvgzvyrkmZ3jjsTi7Zsh/2r8Dknx5l/tRiN6I Vi+ogc1ZQL8awmqdG2FR8V3hrTEQNp/QxphmSJ5M79Dv8t7iIcU= =4MpW -----END PGP SIGNATURE----- --zc6r4szvuyukhmxj-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DAF03C67861 for ; Mon, 8 Apr 2024 09:14:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gZyIDirrp22z7RLKPRBx3FydE3sBfenbuQeNivxZUWc=; b=r/JjNxhqWObMY41ik2/APtB5Rt aR3g22yiIquDcqMPTvIWyJlcHs6vkAFQMHbl1gfk5H2LCEEyS49hRkGi722T/NkTV+9f37TuVWs04 TG3qlALv7QE0VgJlhnHUtTgdeOGxm4E0mCm1mb6I6Wz59nLqiTvcppruGi0MZl6bqyGRdYA4LrxqN wakFZUjfMyUi1BLGSClkECY7bk6kTTi1eGbNnhGlfEzNxAmGWi08THpDK4wKjzlIGZd9jbY6odTsk 5hNThlWkEFneDfmrJt1QdUqpvdliX6bc0sQn+7R0o8SW0KKjjqwmGH7UZD4gZuiDxZ1FiHrODNr9H jjqUU4Og==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtl5B-0000000F320-3EAB; Mon, 08 Apr 2024 09:14:29 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtl58-0000000F306-1Dpo for linux-arm-kernel@lists.infradead.org; Mon, 08 Apr 2024 09:14:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=k1; bh=B1xU GkiU6dmYPsBjCTtb6mRNv0nuvWzUMFCwA7SNs6U=; b=D7b7JHh1oY0gpZfVrcWm bVLPU9k9q3DbofnpH/OfhR3aO1Pu7vm5BC95ccqnukqiFFrq8C8rPxn+wKmX3yhe BeF1G4lEhOejWaSv785LLOpfbA2CXkv1tFklvdZHYUEIBrQu1f4Ov4LfTvbfJ8FQ srPASuPZeYyzeQCSkLa4XimHy9jV7libC24ca6Cm23+2VCkgt5bO/P6hWlEPimz2 kB3OLKKsljxZDx4L5vzs51QWIhBGtq16LdG5EmnAQf8bwUuO/BWDKyrP3N7GQHUL ShiqM5VjAaxQdgLg/BpK6XAgAO/ji5/Ms71bCFHMNseI49LHGHg5d8N/hxz4Dxk3 /g== Received: (qmail 716288 invoked from network); 8 Apr 2024 11:14:24 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 8 Apr 2024 11:14:24 +0200 X-UD-Smtp-Session: l3s3148p1@3RREO5IVVpwgAwDPXwE9APSWg5D5lDs4 Date: Mon, 8 Apr 2024 11:14:23 +0200 From: Wolfram Sang To: Easwar Hariharan Cc: linux-i2c@vger.kernel.org, Patrice Chotard , Andi Shyti , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 53/64] i2c: st: reword according to newest specification Message-ID: Mail-Followup-To: Wolfram Sang , Easwar Hariharan , linux-i2c@vger.kernel.org, Patrice Chotard , Andi Shyti , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> <20240322132619.6389-54-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240408_021426_630865_1C03E0FB X-CRM114-Status: GOOD ( 15.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============3712759860515710049==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============3712759860515710049== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zc6r4szvuyukhmxj" Content-Disposition: inline --zc6r4szvuyukhmxj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > - unsigned long timeout; > > + unsigned long time_left; >=20 > Thanks for doing this. Is the timeout v/s time_left language also due to = the specification change? > A link to the specification(s) in the commit message would be nice to have I admit it is probably a seperate change... > > - if (!timeout) { > > - dev_err(i2c_dev->dev, "Write to slave 0x%x timed out\n", > > - c->addr); =2E.. motivated by this "if (!timeout) dev_err("timeout!")" which is super confusing to read because the logic is paradox. > > + if (!time_left) > > ret =3D -ETIMEDOUT; > > - } >=20 > Why did we lost the dev_err() here? Agreed. Another seperate change. A timeout is not something the user need to be aware of. It can regularly happen while an EEPROM is erasing a page. The client driver will probably handle it correctly by trying again. Only if the client driver sees a problem, then the user should be notified. But not in the controller driver. --zc6r4szvuyukhmxj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmYTtW8ACgkQFA3kzBSg KbaxqxAAqwfl+isJvw+Tbn4zWASNYgUCF88fdAOUyScMYpiIlRk2c7CR4M4BipLs ppKwIrsKht9D++ljltU34nnMNsirMRI+QBRVrOubmvln130b6d5PzLvw0LmL92BR 9sBawa9Ow1y14b6htJXMB0fjmbUtubcB4vn0vgPNl9DwOyZXGawSQbEDW7eB9Dag FePIO6KW1d01J54d3B0R+nBdbhB4Lr23Q99EEiO2N/f/Oa7cb6wc7nuqUkg1ymgG 4sTRUK95w+FQd2DhaAsXhjzRy1AqCCaW8O6RVDDhR71q808K+L+R4G/Ip/OvuPKS nEd1r9HEG4jOVhNNbjtE8vILhIYU0bwdHR45YNCUQDXWNdfvkXa5A3THpfpE0iF/ D1dsp030Ogwex0OFYtEcUOT9nMeE1Io46sTIwfhO/kmAx5zaZqNB/u0Duv5i6zPA vbG5yO6VEOU5wiJR97RTu1kzCs+UenOXSQ3mRjT3MJM5X8XvS/jQR6SSJflUsc7e E1tj9COegSg9APc+i0kMeJdqk6wV6JGS3XzYI5fOwaHaEK8eDORj/Al95Y/g1F3W yIYZbkL/TAV60Y4Z/VHYqblRa/eFvgzvyrkmZ3jjsTi7Zsh/2r8Dknx5l/tRiN6I Vi+ogc1ZQL8awmqdG2FR8V3hrTEQNp/QxphmSJ5M79Dv8t7iIcU= =4MpW -----END PGP SIGNATURE----- --zc6r4szvuyukhmxj-- --===============3712759860515710049== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============3712759860515710049==--