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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 20 Nov 2020 12:45:52 +0000
From:   Mark Brown <broonie@...nel.org>
To:     Adam Ward <adam.ward@...semi.com>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Vincent Whitchurch <vincent.whitchurch@...s.com>,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 4/9] regulator: da9121: Add device variant details and
 respective regmaps

On Fri, Nov 20, 2020 at 12:14:54PM +0000, Adam Ward wrote:

> Add ability to probe device and validate configuration, then apply a regmap
> configuration for a single or dual buck device accordingly.

This looks like it might benefit from being multiple commits - "X then
Y" type commit logs are often a warning sign of this, it's quite
difficult to review as it's doing several different things.

> +static int da9121_i2c_reg_read(struct i2c_client *client, u8 addr,
> +				    u8 *buf, int count)
> +{
> +	struct i2c_msg xfer[2];
> +	int ret;

Why is this open coding register I/O?

> +	name = of_get_property(chip->dev->of_node, "compatible", NULL);
> +	if (!name) {
> +		dev_err(chip->dev, "Cannot get device not compatible string.\n");
> +		goto error;
> +	}

You shouldn't need to query the compatible string as a property, why is
the code doing this?  You know what compatible was used from probe().

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

Powered by blists - more mailing lists