lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 03 Dec 2013 13:08:20 -0700
From:	Stephen Warren <swarren@...dotorg.org>
To:	Laxman Dewangan <ldewangan@...dia.com>,
	Thierry Reding <thierry.reding@...il.com>
CC:	"rob.herring@...xeda.com" <rob.herring@...xeda.com>,
	"pawel.moll@....com" <pawel.moll@....com>,
	"mark.rutland@....com" <mark.rutland@....com>,
	"ijc+devicetree@...lion.org.uk" <ijc+devicetree@...lion.org.uk>,
	"linux@....linux.org.uk" <linux@....linux.org.uk>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] ARM: dts: tegra: Header file for pinctrl constants

On 12/02/2013 11:04 PM, Laxman Dewangan wrote:
> On Monday 02 December 2013 07:55 PM, Thierry Reding wrote:
>> * PGP Signed by an unknown key
>>
>> On Mon, Dec 02, 2013 at 07:25:01PM +0530, Laxman Dewangan wrote:
>>
> 
>> +
>> +/* Schmitt enable/disable */
>> +#define TEGRA_PIN_DRIVE_SCHMITT_DISABLE            0
>> +#define TEGRA_PIN_DRIVE_SCHMITT_ENABLE            1
>> These are all boolean, so I wonder if perhaps we should be simply
>> defining a single pair and reuse that in different contexts:
>>
>>     #define TEGRA_PIN_DISABLE    0
>>     #define TEGRA_PIN_ENABLE    1
>>
>> The property names should provide enough context for them to be used
>> unambiguously.
>>
>>
> 
> I can make generic ENABLE/DISABLE macro as you suggested but datasheet
> says as 0=NORMAL, 1 = TRISTATE. and that's why I kept name very near to
> the datasheet.

That documentation is relative to a specific field, whereas the
namespace for #defines is global. Hence, we may have to name #defines
using stricter rules than the TRM's field values, in order to make them
unambiguous.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ