Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp85790pxb; Thu, 21 Jan 2021 01:48:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmKhfqNJ4rugokEkHLz4J0pAYNxwBRrmCFSkbvGMXNW6mC2lCc+OGB+W4KEiBx6Dk9uRw7 X-Received: by 2002:a17:906:7804:: with SMTP id u4mr8805686ejm.97.1611222510672; Thu, 21 Jan 2021 01:48:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611222510; cv=none; d=google.com; s=arc-20160816; b=GRDZK5IGQSGAl0I/yVHSKZiP8rGPzEFU36nkI77tEH6E1MJD8omC0cybHCL7QK4EYc DcOyqW37HxSSGdaO3kDSAwkgf27RbOz/cCftFvJKsGFt9by9V5DJQ150jugg413e84H/ 7Lay74qCisnU+SNNk5rgSEAtWC2B7kZQiMty6Sgto8WGJy1wIiEc5nupDtjiGEkVYMUr YRAJInTMgdONXXzyO2g7lyaG6LC8HxAJ2VA4vl9ouV1rTPpySaGk+CPQ5m6oCweEsskG YhUIeY4s6gxtb6nECjRRnOGebdEYu04F0Ejyx5WtxKkNZvokbz84ZXySIG44ShEeZYB3 zBog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=O4hV05n/n+Bsg+vhvbw7DuKKsG24m/+TXNGie7ja/vo=; b=UDVCUVqSgqNEoqKrNHu0VshwO7SdVz7IPKGS1+tqPbULkHv8ZoBG/pEooPNe8MgeZJ g9WW0pZmENoDwdsNatJSHfh3pPGQwNaIYFIIAmBZ6fPylvhq0O2sw8nMrz41xX2RVM6m Z/Xk4MvjfY+F/TKuIS7g/dk0vz+13KphTt9+v2p3AtXj+Pl6eVUHgn/leukD8pz18PZc TqBkJxMM3t61khcPcv+pJOpegMn8KLPavb/syCFhAfqdFrWxTRAoSqD7BpchGdNln5yy u7OcH4Gc3XAXESejPMsHagU+KCTMwIw+RMIPxYkjVNjy7qoZqJsZlg3MpkeO5cKNmJ5n hVfQ== 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 q9si1598184ejn.731.2021.01.21.01.48.06; Thu, 21 Jan 2021 01:48:30 -0800 (PST) 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 S1728786AbhAUJpi (ORCPT + 99 others); Thu, 21 Jan 2021 04:45:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727839AbhAUJpO (ORCPT ); Thu, 21 Jan 2021 04:45:14 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79667C061757 for ; Thu, 21 Jan 2021 01:44:33 -0800 (PST) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2WVt-0007QS-Bo; Thu, 21 Jan 2021 10:44:25 +0100 Received: from hardanger.blackshift.org (unknown [IPv6:2a03:f580:87bc:d400:37fb:eadb:47a3:78d5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 634405C98FE; Thu, 21 Jan 2021 09:44:23 +0000 (UTC) Date: Thu, 21 Jan 2021 10:44:22 +0100 From: Marc Kleine-Budde To: Su Cc: manivannan.sadhasivam@linaro.org, thomas.kopp@microchip.com, wg@grandegger.com, davem@davemloft.net, kuba@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] can: mcp251xfd: replace sizeof(u32) with val_bytes in regmap Message-ID: <20210121094422.h5tjjyhsn7gvhlrm@hardanger.blackshift.org> References: <20210121091005.74417-1-suyanjun218@gmail.com> <20210121092115.dasphwfzfkthcy64@hardanger.blackshift.org> <5ed3d488-3ea6-cc07-a04d-73a6678d772a@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zrug2yvgvouevx6t" Content-Disposition: inline In-Reply-To: <5ed3d488-3ea6-cc07-a04d-73a6678d772a@gmail.com> X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --zrug2yvgvouevx6t Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 21, 2021 at 05:33:40PM +0800, Su wrote: > The sizeof(u32) is hardcoded. IMO it's better to use the config value in > regmap. I got why you want to change this. Please update the patch description, com= ment on the increase of the object size and address the other issues I pointed o= ut. I think it makes no sense to have the function mcp251xfd_get_val_bytes() as= you have to use several regmaps anyways. > > > No functional effect. > > Not quite: > >=20 > > scripts/bloat-o-meter shows: > >=20 > > add/remove: 0/0 grow/shrink: 3/0 up/down: 104/0 (104) > > Function old new delta > > mcp251xfd_handle_tefif 980 1028 +48 > > mcp251xfd_irq 3716 3756 +40 > > mcp251xfd_handle_rxif_ring 964 980 +16 > > Total: Before=3D20832, After=3D20936, chg +0.50% Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --zrug2yvgvouevx6t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEK3kIWJt9yTYMP3ehqclaivrt76kFAmAJTPQACgkQqclaivrt 76kmLAf/Yexh9D+O2IOdOK2R9xP9k0PGIxsk6HhUz2wMqvIP8HBRd/Tuqj+5hFQU NO17xotVj9XVvvYHSI4mp8zfMyLVz7rylzimdLuxrGDaKmeMA+txcEU6BASpkXpy OadMbHTaor2CZt4blUVeeQcTGKhwH35cSIaRfXLcDr5dZADwwQcz5l1TkNe4dxEw 9qFaWENDjwoqnkwFVjQGVCM04kthvcQA8kRtwq0ne3VpoiyY1phSbzYO784CO3+F +uj0zJUNqUwpa5zA2HG6zby4h4af2hca8mdZQNlAmgyJzTCmQ9rjpPGHKiBuSZ+A PPN08M3HNARYwFYda7Qwhs9XW2t36Q== =stZm -----END PGP SIGNATURE----- --zrug2yvgvouevx6t--