Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp547145ybh; Tue, 10 Mar 2020 03:53:04 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsr0pGxvTAjuOCz12tr/kpIVMGxOEPHQtnN1wZYnL2JbmnOzPe97pAu4skCBsJkc4m8BWh/ X-Received: by 2002:a05:6830:13c7:: with SMTP id e7mr3825948otq.5.1583837584700; Tue, 10 Mar 2020 03:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583837584; cv=none; d=google.com; s=arc-20160816; b=X0c46WrgmxUlLdsgySt7NeY1xRxrZulXOsY9jjfIwaJMEu/m7/VBx7/ofDepBELTQ+ uosu5zh6sa8ina2aS+Vyf+uVe1EJsQEo4Y6TV2S+UfUHPNeH/wlsKGMd3IWejRxTpzci UuQY8/xNbAI0kiwQEL16jBjac7mHrzWv4w6YEHZbG1Y6RzY7POYwNlKxZSNVjf59emq6 c7sbv10qY2GdFdIw3ZHMv5YMRN4aCjHDR8/xPojmVpmYi1ueRhTtkR8Gr0kxDJMjSP8/ 36ybDX/rfWjp70ChV6JW4vi28NkWbr7o4GoHpBPnfzll+dzKCl2m++aAprq0p5gISRw9 30vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=k2N9Qsywezy015rcKH71CkRaKyRr3Fhff13MZD7wAUc=; b=ZgHHkJjEoqR4YW0pd7kHFPcW4LTOHQyCmlC8K8xQGwLksi9fqqEMns9APDcBF6AEZo jGdr9jcuQ03EbUvrnI1EPXUBZpnF6UQjwVdd69HqYk5qIqd3tyuPlUwDVFBJoqOvdXxc RHAMpiS4yZP3ZZ572NtJ6AquvFk0TSwWYfHy5ZQkDQmO8JLOyVsA6yr+PPCMzqiP+1oJ bi/zwfZITwKpuDtJFRwFnJJaStm6WDYRLGpBpZoG1ZscKN9VX2iPh0nXUUIGqW7SGCWP D6O5EVwlq102CxF6d5hmUgimNF6K0Y0KZFJV3pyy+w3h4n0To90lcKOmDsDfsxVfQUPQ Wcjg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y82si3486625oia.35.2020.03.10.03.52.52; Tue, 10 Mar 2020 03:53:04 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726290AbgCJKw0 (ORCPT + 99 others); Tue, 10 Mar 2020 06:52:26 -0400 Received: from sauhun.de ([88.99.104.3]:47354 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726170AbgCJKw0 (ORCPT ); Tue, 10 Mar 2020 06:52:26 -0400 Received: from localhost (p54B33196.dip0.t-ipconnect.de [84.179.49.150]) by pokefinder.org (Postfix) with ESMTPSA id 02A962C1EB6; Tue, 10 Mar 2020 11:52:24 +0100 (CET) Date: Tue, 10 Mar 2020 11:52:24 +0100 From: Wolfram Sang To: Francesco Lavra Cc: tangbin , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] i2c:i2c-core-of:remove redundant dev_err message Message-ID: <20200310105224.GO1987@ninjato> References: <20200226103901.21520-1-tangbin@cmss.chinamobile.com> <0757d83b-203c-fe40-a8ac-665953d7d336@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7gLe/sNPhR777EPF" Content-Disposition: inline In-Reply-To: <0757d83b-203c-fe40-a8ac-665953d7d336@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --7gLe/sNPhR777EPF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 26, 2020 at 11:58:41AM +0100, Francesco Lavra wrote: > On 2/26/20 11:39 AM, tangbin wrote: > > of_i2c_register_device already contains error message, so remove > > the redundant dev_err message > >=20 > > Signed-off-by: tangbin > > --- > > drivers/i2c/i2c-core-of.c | 6 +----- > > 1 file changed, 1 insertion(+), 5 deletions(-) > >=20 > > diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c > > index 6787c1f71..7b0a786d3 100644 > > --- a/drivers/i2c/i2c-core-of.c > > +++ b/drivers/i2c/i2c-core-of.c > > @@ -103,9 +103,7 @@ void of_i2c_register_devices(struct i2c_adapter *ad= ap) > > client =3D of_i2c_register_device(adap, node); > > if (IS_ERR(client)) { > > - dev_err(&adap->dev, > > - "Failed to create I2C device for %pOF\n", > > - node); > > + return PTR_ERR(client); >=20 > This looks like an unrelated (and wrong) change. Why would you alter the > semantics of of_i2c_register_devices()? Besides, this function doesn't ha= ve > a return value. Right. This is not correct. In general, tangbin has a point, the error reporting is doubled. Lower layers already report, so both(!) callers of of_i2c_register_device do not need to. Since I am refactoring all this anyhow in "[RFC PATCH 5/7] i2c: of: error message unification", I think I will just drop error reporting in the callers there when resending the series (giving tanbin credits for the removal). Is this okay with everyone? --7gLe/sNPhR777EPF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl5ncWQACgkQFA3kzBSg KbZpcA//S4jnQJB+biCG8KuwbviA/gQmWDm7X4Y6lR9SOVNmv6fT2RlljBaTXFtN E1s4Cxc23bkUomFNEnfH7tGJcFGnTXJdPtxmuYG7v9h6caK0bWTOUVrH0PDB0eSD cy+okiDoySmdMBoxGnqHOPeZnbB6IQlEb91HiXS/VvMdluCbcHqRUQ45yNtYys0L RpmNwcOxL1E/NHG2GetQ5NyZLSC0IONaATOvEUkSpfthWar6u0EcMcUgCr4RruQS /9Wm34MxU3G42tCDlxHjcf4JB7G535wwZh5hoFPkiUK/UWmPeTF60XqhsJvE9HHP k4kbWurWFcDh+EOtj8wT3RH4gmBmEt0PhMTDeH0t4thlVhajjjEhPfuFs+1U0VRR 6vn1yBBQs0wyNuKeJQDUCoJ6pIxF1Iwl1nxABuY5u9bF2+1BCpOKZpRRvmcbbhTS xk3IO/9rU8/7DDuPMOEFXKAg3YSgmYnfEcrSkQew7ZWSuf07wGT4FgvssSFlVnhd XHwwGzSC/ni6ngjrdc+woRI8EebLww9wvtvbeocnV/cdddSyvCBKYX1MSsMVEBLX QXorfLdiUFdojkxCZFyQNEqgodI/LRZi9QKGrw/5BQcWRrUVnrzgBtcnfIjvTOGX fXmgYy+4/2j3+LazmApRzWp9JPOGe2FP440iHlcHYQGgsPS1RBQ= =OV/r -----END PGP SIGNATURE----- --7gLe/sNPhR777EPF--