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]
Message-ID: <20251207182625.3468423d@jic23-huawei>
Date: Sun, 7 Dec 2025 18:26:25 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: "Shen Jianping (ME-SE/EAD2)" <Jianping.Shen@...bosch.com>
Cc: Massimiliano Pellizzer <mpellizzer.dev@...il.com>,
 "dlechner@...libre.com" <dlechner@...libre.com>, "nuno.sa@...log.com"
 <nuno.sa@...log.com>, "andy@...nel.org" <andy@...nel.org>,
 "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] iio: imu: smi330: remove redundant assignment in
 smi330_read_avail

On Wed, 26 Nov 2025 09:56:23 +0000
"Shen Jianping (ME-SE/EAD2)" <Jianping.Shen@...bosch.com> wrote:

> >Von: Massimiliano Pellizzer <mpellizzer.dev@...il.com>
> >Gesendet: Dienstag, 25. November 2025 18:18
> >An: jic23@...nel.org; dlechner@...libre.com; nuno.sa@...log.com;
> >andy@...nel.org; Shen Jianping (ME-SE/EAD2) <Jianping.Shen@...bosch.com>
> >Cc: linux-iio@...r.kernel.org; linux-kernel@...r.kernel.org; Massimiliano Pellizzer
> ><mpellizzer.dev@...il.com>
> >Betreff: [PATCH] iio: imu: smi330: remove redundant assignment in
> >smi330_read_avail
> >
> >In the IIO_CHAN_INFO_OVERSAMPLING_RATIO case, the type parameter is
> >assigned from smi330_average_attr.type and then immediately overwritten with
> >IIO_VAL_INT on the next line.
> >
> >Since smi330_average_attr.type is already initialized to IIO_VAL_INT, the second
> >assignment is redundant. Remove the hardcoded assignment to maintain
> >consistency in the code.  
> 
> Looks good to me. Thank you.
> 
> Reviewed-by: Jianping Shen <Jianping.Shen@...bosch.com>
I dropped the fixes tag because, as you've clearly laid out in the patch description
it is redundant rather than a bug fix.  Applied to my local tree
for now - I'll rebase that on rc1 once available and push out as the
togreg branch of iio.git.

Thanks,

Jonathan

> 
> >
> >Fixes: 6f3d8de8886d ("iio: imu: smi330: Add driver")
> >Signed-off-by: Massimiliano Pellizzer <mpellizzer.dev@...il.com>
> >---
> > drivers/iio/imu/smi330/smi330_core.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> >diff --git a/drivers/iio/imu/smi330/smi330_core.c
> >b/drivers/iio/imu/smi330/smi330_core.c
> >index 7564f12543e0..0cf673b44b62 100644
> >--- a/drivers/iio/imu/smi330/smi330_core.c
> >+++ b/drivers/iio/imu/smi330/smi330_core.c
> >@@ -475,7 +475,6 @@ static int smi330_read_avail(struct iio_dev *indio_dev,
> > 		*vals = smi330_average_attr.vals;
> > 		*length = smi330_average_attr.len;
> > 		*type = smi330_average_attr.type;
> >-		*type = IIO_VAL_INT;
> > 		return IIO_AVAIL_LIST;
> > 	case IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY:
> > 		*vals = smi330_bandwidth_attr.vals;
> >--
> >2.52.0  
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ