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: Fri, 19 Jan 2024 16:54:36 +0000
From: Conor Dooley <conor@...nel.org>
To: Nuno Sá <noname.nuno@...il.com>
Cc: Conor Dooley <conor.dooley@...rochip.com>,
	"Paller, Kim Seer" <KimSeer.Paller@...log.com>,
	"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Jonathan Cameron <jic23@...nel.org>,
	Lars-Peter Clausen <lars@...afoo.de>,
	"Hennerich, Michael" <Michael.Hennerich@...log.com>,
	Rob Herring <robh+dt@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>, Crt Mori <cmo@...exis.com>,
	Linus Walleij <linus.walleij@...aro.org>,
	Bartosz Golaszewski <brgl@...ev.pl>
Subject: Re: [PATCH v6 1/2] dt-bindings: iio: frequency: add admfm2000

> > > Hmmm, How is the enum easier than a boolean property :)? I guess the device has a
> > > default mode. So, if it is Direct IF mode you have 'adi,mixer-mode' to enable
> > > that
> > > mode and that's it. So the code is pretty much just:
> > > 
> > > if (device_property_read_bool()) {
> > 
> > device_property_present() is preferred I think.
> > 
> 
> Hmm, don't want to start an argument but I'm not sure either :). I would argue that
> device_property_read_bool() has more users (according to git grep - and if I did not
> mess the grep) and it pretty much wraps device_property_present(). So, if there was
> no value in it's "meaning" we would/should stop using it and eventually drop it...
> Anyways, not really a big deal.

If there's an actually boolean property that can have a true/false
value, but testing for presence alone device_property_present() is
the more accurate function to use.

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ