Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp2214132img; Wed, 27 Feb 2019 12:27:17 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia9hcku05a5vBquJwGUsi2OVrzdZwnOFlPptpNt/N1IZIVQu18vLUrbfWIpKo7oQfatbrqT X-Received: by 2002:a63:c04e:: with SMTP id z14mr4701160pgi.20.1551299237750; Wed, 27 Feb 2019 12:27:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551299237; cv=none; d=google.com; s=arc-20160816; b=YpTMUyIkSFljqEILcLrDmjsJ58axmhe1L19mH87G7M/TLOp9xOG5W/FM+DHTSCagr+ Kiyp8Piw/Hm/6r3aOV6ynN12JjULrFnMur+cr71A3YMUp36KNeRARhpVX2RgvoHgeoMw lCoIbnZJZFsnLJcfJHymYsipnz4nHbpPuXnp9gzK5mrzDjdkFQ7K2YImdX/wSfbFkuU+ xelOkoc++L8uy/wUKa68gvG+bvAJSWlitkK4fMzEm7qr7UI/Dbl5OlKTcCXhVdczK8VN PtI9+AId4iUC4We+FvEAERznpp+/DvvWlB1eKgagpyqkUMmZC1v14LFUpGjYKeTGEY1P sCLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=2v63wz/fzvVd0l6Yjq/qPc1gzyILO57yj6715Ximkt4=; b=KcYBsDO8vKIzs70BHVlpCgjOYm9uLuJ1CwE2QOweqdEaaWM4qGsQ25JLTe/ebhLyh3 i/Hm3bU1t7mpL1A1r4mCC/NU0k5ri3zhhnuXVTz5ynYAdOwh3bApW0n2YY48rbqE/DSx cN4XxTZeCVyzLi5bU0S1PTrb7HqonnaAeXLxvNVZyDaWqA1N23OaN+V5kZ44Fsx8ZaFx 9+fBvW34WR3XmUKJDAVsGpQVNtUqKAakEHwvxKjng/KvSHltRI/8hQW+NK/u2itN8Zgm bhBVciarzqb8NqAZm/T2yKmiAVmYdsJW9w13gLb+r3/thaxYT8kYbjAdLoQK+/pVBBB8 yRyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@schinagl.nl header.s=7of9 header.b=diU2UjEP; 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; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=schinagl.nl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f18si6101231pgv.253.2019.02.27.12.27.02; Wed, 27 Feb 2019 12:27:17 -0800 (PST) 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; dkim=pass header.i=@schinagl.nl header.s=7of9 header.b=diU2UjEP; 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; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=schinagl.nl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730131AbfB0U0f (ORCPT + 99 others); Wed, 27 Feb 2019 15:26:35 -0500 Received: from 7of9.schinagl.nl ([62.251.20.244]:54260 "EHLO 7of9.schinagl.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727240AbfB0U0e (ORCPT ); Wed, 27 Feb 2019 15:26:34 -0500 Received: from [10.2.10.179] (unknown [10.2.10.179]) by 7of9.schinagl.nl (Postfix) with ESMTPA id 481E4B7629E; Wed, 27 Feb 2019 21:26:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=schinagl.nl; s=7of9; t=1551299192; bh=pkasG0/KUOMhICFRN9RLiUnbjqP0azni2jj+VRogvd8=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=diU2UjEPjNtkEYwPMByjOOppavZpf7mu+9rQc1YREAm+5grFOCbHEWqeAP1wCGfYd ktx6RmcfTunflLgpaH1hjZxgd/oJjWz7I213k9J58eOlzr1r2xwjejiER4dF+Ll+YL YAutQi+YgVsCVh81zpWhk4lU6Mj8o6x+9EnyWxmE= Subject: Re: [PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines To: Mark Brown Cc: Axel Lin , Chen-Yu Tsai , Priit Laes , Liam Girdwood , LKML References: <20190220165013.12774-1-axel.lin@ingics.com> <24E35288-677D-4223-B94A-52A4F37792A8@schinagl.nl> <20190221094237.GA5970@sirena.org.uk> <15e97e28-0008-cda4-176d-a3feb9ad4e8a@schinagl.nl> <20190225172519.GD13898@sirena.org.uk> <20190227200537.GB11065@sirena.org.uk> From: Olliver Schinagl Message-ID: Date: Wed, 27 Feb 2019 21:26:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190227200537.GB11065@sirena.org.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27-02-2019 21:05, Mark Brown wrote: > On Wed, Feb 27, 2019 at 08:41:46PM +0100, Olliver Schinagl wrote: >> On 25-02-2019 18:25, Mark Brown wrote: >>> If you find you need to describe what the fields are it would be much >>> more constructive to add a comment at the top of the table saying what >>> they are. As things are this isn't helping anyone - as a big pile of >>> defines it's hard to read the values without context for how they're >>> used and if you're looking at the table you can't tell what the >>> regulator actually supports without going and decoding the defines. >> Then the name of the define should be more constructive, which imo they >> are reasonably? But as everything with programming, naming things is the >> he hardest part, right? > I really don't think that's it - I think that sometimes a data table is > just a data table. There are some coding styles that work to avoid > having raw numbers anywhere in code outside of defines at all costs but > I do think that goes too far in cases like this where the name of the > define is at some level just going to summarize what should go in a > given slot in a table which adds little. I'm not sure if we're still talking about the same thing or same table; In any case, this is something up to personal taste in the end, and I am in the camp that favors (readable, which of course could always be improved) defines over magic values; especially when it comes to these bit-selectors. And even if a little less here, to keep things consistent with all defines is why at least I prefer the one approach. You guys prefer the raw values. Two flavors of two opinions I suppose :)