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: <20201123174941.GM6322@sirena.org.uk>
Date:   Mon, 23 Nov 2020 17:49:41 +0000
From:   Mark Brown <broonie@...nel.org>
To:     Cristian Marussi <cristian.marussi@....com>
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        devicetree@...r.kernel.org, sudeep.holla@....com,
        lukasz.luba@....com, james.quinlan@...adcom.com,
        Jonathan.Cameron@...wei.com, robh@...nel.org,
        satyakim@....qualcomm.com, etienne.carriere@...aro.org,
        f.fainelli@...il.com, vincent.guittot@...aro.org,
        souvik.chakravarty@....com
Subject: Re: [PATCH v6 5/5] regulator: add SCMI driver

On Thu, Nov 19, 2020 at 07:10:51PM +0000, Cristian Marussi wrote:

> +	ret = handle->voltage_ops->config_get(handle, sreg->id,
> +					      &config);
> +	if (ret) {
> +		dev_err(&sreg->sdev->dev,
> +			"Error %d reading regulator %s status.\n",
> +			ret, sreg->desc.name);
> +		return 0;
> +	}

If we failed to read the status we should return an error rather than
claim the regulator is off, other functions return errors so I'm not
sure why this one would be different.

> +	vinfo = handle->voltage_ops->info_get(handle, sreg->id);
> +	if (!vinfo) {
> +		dev_warn(dev, "Skipping invalid voltage domain %d\n",
> +			 sreg->id);
> +		return -ENODEV;

I'm not sure that this error message is the most informative - the issue
is that we failed to read information, we don't know if that information
would have been valid or not.  Same for some of the other enumeration,
it's a failure to read not a lack of validity isn't it?

> +	/* Allocate pointers' array for all possible domains */

No '

> +	rinfo->num_doms = num_doms;
> +	/*

Several places like this with missing blank lines.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ