From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932354AbdGXTUR (ORCPT ); Mon, 24 Jul 2017 15:20:17 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:34199 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756421AbdGXTUH (ORCPT ); Mon, 24 Jul 2017 15:20:07 -0400 Date: Mon, 24 Jul 2017 21:20:04 +0200 From: Pavel Machek To: Charles Keepax Cc: Lee Jones , Linus Torvalds , Linux Kernel Mailing List , broonie@kernel.org, rf@opensource.wolfsonmicro.com Subject: Re: [GIT PULL] MFD for v4.13 Message-ID: <20170724192004.GD32425@amd> References: <20170707095013.fa2ik3nqedkeer6t@dell> <20170707225014.422x5ptpvnqpu674@dell> <20170717085650.gcauhi5tfqemtvme@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SO98HVl1bnMOfKZd" Content-Disposition: inline In-Reply-To: <20170717085650.gcauhi5tfqemtvme@localhost.localdomain> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --SO98HVl1bnMOfKZd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > > include/linux/mfd/madera/registers.h | 8832 ++++++++= ++++++++++++ > > >=20 > > > So I've pulled everything but this, because honestly, that file looks > > > like utter garbage. > > >=20 > > > Why are there all those _hundreds_ of odd defines for > > >=20 > > > MADERA_WSEQ_SEQUENCE_xx > > >=20 > > > when it looks like you could just do one single one: > > >=20 > > > // The sequence is one-based because somebody doesn't > > > // know that indices start at 0. Thus the "-2". > > > #define MADERA_WSEQ_SEQUENCE(x) (0x3000 + (x)*2 - 2) =2E.. > > > (a) probably closer to 200x too many lines > > > (b) less flexible than doing it right > > >=20 > > > Honestly, tell me why would I want to merge something monstrous like = that? > >=20 > > I'm inclined to agree and had my reservations. However based on > > a previous conversation [0], I was convinced that it's actually the > > right thing to do.=20 > >=20 > > https://lkml.org/lkml/2017/4/7/229 =2E.. > We really quite like to keep all the registers defined because it > makes the source highly greppable, which is extremely useful. A > type of question which is often asked is "what does the driver > do with register bits XYZ" or "where does it use register > bits XYZ". Eliminating definitions into generator macros or > block-indexing code makes these questions more difficult to > answer. Another convenience is that it makes it easier for people > to translate raw hardware configurations (which are a list > of register values) into ALSA and pdata settings if they can Well, easy grep is a nice thing, but not worth the cost of 8000 lines vs. 40 lines. I'm sure you can write the required regexps in less than 7960 lines. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --SO98HVl1bnMOfKZd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAll2SGQACgkQMOfwapXb+vJMowCfSV07Yn7TzSqUE1VR+1yAAya1 EXIAnjRsGejwYgnOdHdhhuo9bE6GrAwb =iUj7 -----END PGP SIGNATURE----- --SO98HVl1bnMOfKZd--