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: <aQhkRmtJMoB7vv8U@smile.fi.intel.com>
Date: Mon, 3 Nov 2025 10:13:58 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Frank Li <Frank.Li@....com>
Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>,
	Miquel Raynal <miquel.raynal@...tlin.com>,
	Jonathan Cameron <jic23@...nel.org>,
	David Lechner <dlechner@...libre.com>,
	Nuno Sá <nuno.sa@...log.com>,
	Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, linux-i3c@...ts.infradead.org,
	linux-kernel@...r.kernel.org, imx@...ts.linux.dev,
	linux-iio@...r.kernel.org, joshua.yeong@...rfivetech.com,
	devicetree@...r.kernel.org, linux@...ck-us.net,
	Carlos Song <carlos.song@....com>,
	Adrian Fluturel <fluturel.adrian@...il.com>
Subject: Re: [PATCH v9 6/6] iio: magnetometer: Add mmc5633 sensor

On Fri, Oct 31, 2025 at 12:39:18PM -0400, Frank Li wrote:
> Add mmc5633 sensor basic support.
> - Support read 20 bits X/Y/Z magnetic.
> - Support I3C HDR mode to send start measurememt command.
> - Support I3C HDR mode to read all sensors data by one command.

...

> - 1 -> ARRAY_SIZE()

Maybe I missed the answer, but why are the arrays to begin with?

...

> +#define MMC5633_REG_YOUT_H	0x03
> +#define MMC5633_REG_ZOUT_L	0x04
> +#define MMC5633_REG_ZOUT_H	0x05
> +#define MMC5633_REG_XOUT_2	0x06
> +#define MMC5633_REG_YOUT_2	0x07
> +#define MMC5633_REG_ZOUT_2	0x08
> +#define MMC5633_REG_TOUT	0x09

Are those _L, _H, _2 come from the datasheet?

...

> +struct mmc5633_data {
> +	struct i3c_device *i3cdev;
> +	struct mutex mutex; /* protect to finish one whole measurement */
> +	struct regmap *regmap;

Btw, have you experimented to shuffle this to put regmap to be the first
member, for example? Does it affect the binary (compiled object) size?

> +};

...

> +	regmap = devm_regmap_init_i2c(client, &mmc5633_regmap_config);
> +	if (IS_ERR(regmap))
> +		return dev_err_probe(dev, PTR_ERR(regmap), "regmap init failed");

Missing trailing \n. Please, double check all messages for this.

...

> +	ret = regmap_attach_dev(dev, regmap, &mmc5633_regmap_config);
> +	if (ret)
> +		return ret;

Why?

...

> +	ret = regmap_attach_dev(dev, regmap, &mmc5633_regmap_config);
> +	if (ret)
> +		return ret;


Ditto.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ