Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp628652ybz; Wed, 15 Apr 2020 15:28:00 -0700 (PDT) X-Google-Smtp-Source: APiQypJDlNouRkXOhc/XlYZXAPGJUnsz1miJv+WAOeVztz8npqP+/CO2+6AKJ9whD6Hgt3t71E3S X-Received: by 2002:a05:6402:1505:: with SMTP id f5mr25092905edw.208.1586989680451; Wed, 15 Apr 2020 15:28:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586989680; cv=none; d=google.com; s=arc-20160816; b=MLSR/Mm3tL/4aIOLs+PwBQICcMQCj83aVMYV1swbPwotNagb7TI+dtphb4dcyaFm48 iQlCXyJoBnC3YTS4rDGkiYDY1w3+bzkgUoyWt7Ueat/uEfpwqJ+20sIh5AsEcviqykOO FPatxcoc/pj1S2kQQlvzKkj88AwA5P6tw9BKdj4u1eIqSFtPtUe9a9yxkwz7/uCocGwh AdTd+Sx8DYzwfwhKcyFcSWOiTJF5cm0zcjDuUQwUTkQggwG7DV//t9o2mH6168sjMgKu VGOw2oQ0nmLS49rtDSHFkgdPf/dg3AkoAOLmmxKfzx0nKwlub3vFZGdXcNR6uWhcl9F+ c/4w== 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=1RxN0B3UxXFr8EWk+TxE9vcUcGqCT69D6nU+IEAc6Cw=; b=NDlmufz9NonSl2wVP3crmzxX4EDyjbhKqGDY8lI+/uQPxNBxDf0COzDDZ/zNf2ler8 F3NTXpkuKbieUxQqJzs7Jvdn/3V0vLEXpH1cCI086l0AQ0aNRLj7rbN3Rs+5csfcdrOl JwzC1AfNuA3yYXijyL9nApq/zylBYJ/FrQ/b2jyv7NGD8M2RcvQwtlEe/U9f85rkMNST u/DID6XzDpSeGfeEQBDk6PlnXILLEMk5YwKwXRcIbu0mxK0EXAozz7MvaFr42SCpKz+3 pjBlMKkhlxoBDxkBGkd9Cz+Mgci32luPHBCA8RYo27W8seN5G1RI7nap/1Z3ss4T5yBZ apow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn14si14348305ejc.261.2020.04.15.15.27.37; Wed, 15 Apr 2020 15:28:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2635642AbgDOIKj (ORCPT + 99 others); Wed, 15 Apr 2020 04:10:39 -0400 Received: from sauhun.de ([88.99.104.3]:48806 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727933AbgDOIKi (ORCPT ); Wed, 15 Apr 2020 04:10:38 -0400 Received: from localhost (p54B33507.dip0.t-ipconnect.de [84.179.53.7]) by pokefinder.org (Postfix) with ESMTPSA id E7DA52C1F58; Wed, 15 Apr 2020 10:10:35 +0200 (CEST) Date: Wed, 15 Apr 2020 10:10:35 +0200 From: Wolfram Sang To: Luca Ceresoli Cc: Wolfram Sang , linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-i3c@lists.infradead.org, Kieran Bingham , Niklas =?utf-8?Q?S=C3=B6derlund?= , Jacopo Mondi , Laurent Pinchart , Vladimir Zapolskiy , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2 5/6] i2c: of: mark a whole array of regs as reserved Message-ID: <20200415081035.GB1141@ninjato> References: <20200318150059.21714-1-wsa+renesas@sang-engineering.com> <20200318150059.21714-6-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="s/l3CgOIzMHHjg/5" Content-Disposition: inline In-Reply-To: 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 --s/l3CgOIzMHHjg/5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > -int of_i2c_get_board_info(struct device_node *node, struct i2c_board_i= nfo *info) > > +static void of_i2c_decode_board_info(struct device_node *node, u32 add= r, > > + bool first_addr, struct i2c_board_info *info) >=20 > While I confirm the patch looks generally OK, let me add the name of > this function is not quite self-explaining. The difference between "get" > and "decode" has nothing to do with the different actions these > functions do, i.e. the new function gets (or: decodes) info about a > single address that is passed, the old "get" function gets the info for > the first address. > > I'd suggest the new function be named of_i2c_get_board_info_one_addr or > similar. Not super nice, a bit long, but self-explanatory. I view them a bit differently, I think. of_i2c_decode_board_info() is a helper function to retrieve "some" addr. It is used by of_i2c_get_board_info() which has the special case of getting the first address. of_i2c_register_device() is the other user with the case of getting each address specified. So, I wouldn't put this helper function on the same level as the users of this helper. Yet, no strong opinion here, I will think about it... --s/l3CgOIzMHHjg/5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl6WwXsACgkQFA3kzBSg KbZmFQ/+IKAYZ44eKk5sxMfMCZYEKX5V6zDP8yGqCfmjnxTOrq4DLKZVUnlOV28t kwwh/lF53CM4/PPXUTjvv11yNRO1dvRJeQvz/O8incejc0VvjAKRIBYWSFG2GvXa sGH0vupmYyyqc5Vfx2UjrUBpFbLnrhOzCwOOacTDoiwbCcDDIhpVgB+ZbIaHR+Ep m2BCa6u3+c/4gNgIweYZzhEd6YkgDkEdjYefCrhhwpkr8aGs+wYiCzjipTreDtYf mIc4irogCauwpaCGX8tmzQj2/o6P4iT4pEIscO9wcHQMcOJmthK/8HcFt+x7Dfrw 7SvCBr8l5QmsyAR3Smbn8zrfw1YjSUvfu4tjRGbHQx8UuDfVeiyWy8+AHHJ7ApoF X/4lBTVf5JPdG8ZnypVlb+s5SDcfOuJ7F7QTIrWGope4rdihHXyjX2ulukHsEZ9j kYt759X+70ZfNaslgUdkZG2HGbCOlRUz/n2kV5moW0u18UZnFypvV1av2Z2kq8B2 7IC409rd5GVvi+V15JouiVRuRvWFTczjeuFfErjo3KiyVU3ZvPkfem0XhFDSrIUP lQNSMIiyu8Cp3Oz4T3SXAPV3Hn3YwyqcWiEItWrtw8Ttu6mfuGmwOjbdGSg4ANGG Qkx23jFosDHtthO02SgOED1J+GAj1BUqwienkWfN0+PbvKzoTQE= =DyfA -----END PGP SIGNATURE----- --s/l3CgOIzMHHjg/5--