public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Gyeyoung Baek <gye976@gmail.com>
Cc: lars@metafoo.de, jean-baptiste.maneyrol@tdk.com,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iio: imu: inv_mpu6050: Remove duplicate code between labels
Date: Sun, 1 Sep 2024 15:11:50 +0100	[thread overview]
Message-ID: <20240901151150.77074133@jic23-huawei> (raw)
In-Reply-To: <20240901120839.9274-1-gye976@gmail.com>

On Sun,  1 Sep 2024 21:08:39 +0900
Gyeyoung Baek <gye976@gmail.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@gmail.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);
>  


  reply	other threads:[~2024-09-01 14:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-01 12:08 [PATCH v2] iio: imu: inv_mpu6050: Remove duplicate code between labels Gyeyoung Baek
2024-09-01 14:11 ` Jonathan Cameron [this message]
2024-09-02  1:53   ` gyeyoung
2024-09-02  9:51     ` Jean-Baptiste Maneyrol
2024-09-02 13:35   ` Markus Elfring
2024-09-03 23:28 ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240901151150.77074133@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=gye976@gmail.com \
    --cc=jean-baptiste.maneyrol@tdk.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox