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] [day] [month] [year] [list]
Date:   Sat, 5 Aug 2023 11:17:21 +0200
From:   Marcus Folkesson <marcus.folkesson@...il.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Kent Gustavsson <kent@...oris.se>,
        Jonathan Cameron <jic23@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Cosmin Tanislav <demonsingur@...il.com>,
        Arnd Bergmann <arnd@...db.de>,
        ChiYuan Huang <cy_huang@...htek.com>,
        Haibo Chen <haibo.chen@....com>,
        Ramona Bolboaca <ramona.bolboaca@...log.com>,
        Ibrahim Tilki <Ibrahim.Tilki@...log.com>,
        ChiaEn Wu <chiaen_wu@...htek.com>,
        William Breathitt Gray <william.gray@...aro.org>,
        linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] iio: adc: mcp3911: add support for the whole
 MCP39xx family


Hi Andy,

Thanks for your revew!

[...]
> 
> > +static int mcp3910_get_offset(struct mcp3911 *adc, int channel, int *val)
> > +{
> > +	return mcp3911_read(adc, MCP3910_OFFCAL(channel), val, 3);
> 
> Just to be sure, the proper endianess conversion is done in mcp3911_read()
> and mcp3911_write() calls?
> 
> This question applies to all calls to that APIs.

Yes it does.

[...]

> 
> > +static int mcp3910_get_osr(struct mcp3911 *adc, int *val)
> > +{
> > +	int ret = mcp3911_read(adc, MCP3910_REG_CONFIG0, val, 3);
> 
> Have you run checkpatch? Here should be a blank line. Same in other several
> places.

Yes, checkpatch does not report any warning for this.

[...]

> > +	adc->chip = (struct mcp3911_chip_info *)spi_get_device_id(spi)->driver_data;
> 
> Can't you use spi_get_device_match_data()?
> 
> ...

Will go for spi_get_device_match_data().

[...]

> 
> > +		device_property_read_u32(&adc->spi->dev, "device-addr", &adc->dev_addr);
> 
> With
> 
> 	struct device *dev = &adc->spi->dev;
> 
> lines like this will be neater.

Indeed, but I think I will short it down to just spi->dev.

> 
> 
> 

Best regards,
Marcus Folkesson

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ