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: <20241019124410.554c2817@jic23-huawei>
Date: Sat, 19 Oct 2024 12:44:10 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Justin Weiss <justin@...tinweiss.com>
Cc: Alex Lanzano <lanzano.alex@...il.com>, Lars-Peter Clausen
 <lars@...afoo.de>, Rob Herring <robh@...nel.org>, Krzysztof Kozlowski
 <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
 linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org, "Derek J . Clark"
 <derekjohn.clark@...il.com>, Philip Müller
 <philm@...jaro.org>
Subject: Re: [PATCH v2 6/6] iio: imu: bmi270: Add scale and sampling
 frequency to BMI270 IMU

On Fri, 18 Oct 2024 16:36:12 -0700
Justin Weiss <justin@...tinweiss.com> wrote:

> Add read and write functions and create _available entries.
> 
> Signed-off-by: Justin Weiss <justin@...tinweiss.com>
Hi Justin,

Just one trivial comment from me.

Jonathan



> +
> +static int bmi270_write_raw(struct iio_dev *indio_dev,
> +			    struct iio_chan_spec const *chan,
> +			    int val, int val2, long mask)
> +{
> +	struct bmi270_data *data = iio_priv(indio_dev);
> +
> +	switch (mask) {
> +	case IIO_CHAN_INFO_SCALE:
> +		return bmi270_set_scale(data, chan->type, val2);
> +	case IIO_CHAN_INFO_SAMP_FREQ:
> +		return bmi270_set_odr(data, chan->type, val, val2);
> +	default:
> +		return -EINVAL;
> +	}
> +
Unreachable code, so drop this return.
> +	return 0;
> +}
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ