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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240901151150.77074133@jic23-huawei>
Date: Sun, 1 Sep 2024 15:11:50 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Gyeyoung Baek <gye976@...il.com>
Cc: lars@...afoo.de, jean-baptiste.maneyrol@....com,
 linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] iio: imu: inv_mpu6050: Remove duplicate code between
 labels

On Sun,  1 Sep 2024 21:08:39 +0900
Gyeyoung Baek <gye976@...il.com> wrote:

> 'flush_fifo' label performs same task as 'endsession' label
> immediately after calling 'env_reset_fifo' function.
> So i remove that duplication.
> 
> Signed-off-by: Gyeyoung Baek <gye976@...il.com>

Ok. This doesn't greatly affect readability and the code
ends up a bit shorter.

Applied

Jonathan

> ---
> I worked on the wrong branch in v1, and reworked on the latest branch.
> 
>  drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
> index 3d3b27f28c9d..4753016d6ee0 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
> @@ -121,15 +121,12 @@ irqreturn_t inv_mpu6050_read_fifo(int irq, void *p)
>  		iio_push_to_buffers_with_timestamp(indio_dev, data, timestamp);
>  	}
>  
> -end_session:
> -	mutex_unlock(&st->lock);
> -	iio_trigger_notify_done(indio_dev->trig);
> -
> -	return IRQ_HANDLED;
>  
>  flush_fifo:
>  	/* Flush HW and SW FIFOs. */
>  	inv_reset_fifo(indio_dev);
> +
> +end_session:
>  	mutex_unlock(&st->lock);
>  	iio_trigger_notify_done(indio_dev->trig);
>  


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ