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: <20250722151956.000043a0@huawei.com>
Date: Tue, 22 Jul 2025 15:19:56 +0100
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
CC: <sboyd@...nel.org>, <jic23@...nel.org>, <dlechner@...libre.com>,
	<nuno.sa@...log.com>, <andy@...nel.org>, <arnd@...db.de>,
	<gregkh@...uxfoundation.org>, <srini@...nel.org>, <vkoul@...nel.org>,
	<kishon@...nel.org>, <sre@...nel.org>, <krzysztof.kozlowski@...aro.org>,
	<u.kleine-koenig@...libre.com>, <linux-arm-msm@...r.kernel.org>,
	<linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<linux-phy@...ts.infradead.org>, <linux-pm@...r.kernel.org>,
	<kernel@...labora.com>, <wenst@...omium.org>, <casey.connolly@...aro.org>
Subject: Re: [PATCH v2 7/7] iio: adc: qcom-spmi-iadc: Remove regmap R/W
 wrapper functions

On Tue, 22 Jul 2025 12:13:17 +0200
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com> wrote:

> This driver doesn't need to add any register base address to any
> regmap call anymore since it was migrated to register as a SPMI
> subdevice with its own regmap reg_base, which makes the regmap
> API to automatically add such base address internally.
> 
> Since the iadc_{read,write,read_result}() functions now only do
> call regmap_{read,write,bulk_read}() and nothing else, simplify
> the driver by removing them and by calling regmap APIs directly.
> 
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
One trivial comment following on from previous.
Either way

Reviewed-by: Jonathan Cameron <jonathan.cameron@...wei.com>

> @@ -267,11 +249,6 @@ static int iadc_poll_wait_eoc(struct iadc_chip *iadc, unsigned int interval_us)
>  	return -ETIMEDOUT;
>  }
>  
> -static int iadc_read_result(struct iadc_chip *iadc, u16 *data)
> -{
> -	return regmap_bulk_read(iadc->regmap, IADC_DATA, data, 2);
> -}
> -
>  static int iadc_do_conversion(struct iadc_chip *iadc, int chan, u16 *data)
>  {
>  	unsigned int wait;
> @@ -296,7 +273,7 @@ static int iadc_do_conversion(struct iadc_chip *iadc, int chan, u16 *data)
>  	}
>  
>  	if (!ret)
> -		ret = iadc_read_result(iadc, data);
> +		ret = regmap_bulk_read(iadc->regmap, IADC_DATA, data, 2);

sizeof(*data) would be better than the magic 2.  This is probably a good
place to tidy that up given you are replacing the line anyway.


>  exit:
>  	iadc_set_state(iadc, false);
>  	if (ret < 0)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ