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]
Message-ID: <20230604140722.5eef740b@jic23-huawei>
Date:   Sun, 4 Jun 2023 14:07:22 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     andy.shevchenko@...il.com
Cc:     Andreas Klinger <ak@...klinger.de>, linux-iio@...r.kernel.org,
        devicetree@...r.kernel.org, Lars-Peter Clausen <lars@...afoo.de>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Angel Iglesias <ang.iglesiasg@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 2/3] iio: pressure: Honeywell mprls0025pa pressure
 sensor



> 
> > +	if (dev_fwnode(dev)) {  
> 
> Why not simply use defaults?

Potential for inconsistent set if a firmware provides some but not others?
(at least that was my assumption that could well be wrong)

> 
> > +		ret = device_property_read_u32(dev, "honeywell,pmin-pascal",
> > +								&data->pmin);
> > +		if (ret)
> > +			return dev_err_probe(dev, ret,
> > +				"honeywell,pmin-pascal could not be read\n");
> > +		ret = device_property_read_u32(dev, "honeywell,pmax-pascal",
> > +								&data->pmax);
> > +		if (ret)
> > +			return dev_err_probe(dev, ret,
> > +				"honeywell,pmax-pascal could not be read\n");
> > +		ret = device_property_read_u32(dev,
> > +				"honeywell,transfer-function", &data->function);
> > +		if (ret)
> > +			return dev_err_probe(dev, ret,
> > +				"honeywell,transfer-function could not be read\n");
> > +		if (data->function > MPR_FUNCTION_C)
> > +			return dev_err_probe(dev, -EINVAL,  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ