public inbox for linux-i3c@lists.infradead.org
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: Markus Elfring <Markus.Elfring@web.de>,
	linux-i3c@lists.infradead.org,
	 Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Frank Li	 <Frank.Li@nxp.com>,
	Fredrik Markstrom <fredrik.markstrom@est.tech>,
	Ivar Holmqvist <ivar.holmqvist@est.tech>,
	Jorge Marques <jorge.marques@analog.com>,
	Manikanta Guntupalli	 <manikanta.guntupalli@amd.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	 Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Zilin Guan <zilin@seu.edu.cn>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Aniket <aniketmaurya@google.com>,
	 Jianhao Xu <jianhao.xu@seu.edu.cn>
Subject: Re: [PATCH] i3c: dw: Use more common code in dw_i3c_master_i2c_xfers()
Date: Fri, 27 Feb 2026 16:04:52 +0000	[thread overview]
Message-ID: <0f87effdbe7d8ac352249a6487efb5efa40156ea.camel@gmail.com> (raw)
In-Reply-To: <2411a872-5bf5-4353-a754-47fa54d69c46@web.de>

On Fri, 2026-02-27 at 11:20 +0100, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 27 Feb 2026 10:16:50 +0100
> 
> Use an additional label so that a bit of common code can be better reused
> at the end of this function implementation.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---

This actually looks like a fix to me. It's not just reusing common code.

- Nuno Sá

>  drivers/i3c/master/dw-i3c-master.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
> index d87bde3f7700..beb40d947e6e 100644
> --- a/drivers/i3c/master/dw-i3c-master.c
> +++ b/drivers/i3c/master/dw-i3c-master.c
> @@ -1113,8 +1113,7 @@ static int dw_i3c_master_i2c_xfers(struct i2c_dev_desc *dev,
>  		dev_err(master->dev,
>  			"<%s> cannot resume i3c bus master, err: %d\n",
>  			__func__, ret);
> -		dw_i3c_master_free_xfer(xfer);
> -		return ret;
> +		goto free_xfer;
>  	}
>  
>  	for (i = 0; i < i2c_nxfers; i++) {
> @@ -1144,10 +1143,10 @@ static int dw_i3c_master_i2c_xfers(struct i2c_dev_desc *dev,
>  	if (!wait_for_completion_timeout(&xfer->comp, m->i2c.timeout))
>  		dw_i3c_master_dequeue_xfer(master, xfer);
>  
> +	pm_runtime_put_autosuspend(master->dev);
>  	ret = xfer->ret;
> +free_xfer:
>  	dw_i3c_master_free_xfer(xfer);
> -
> -	pm_runtime_put_autosuspend(master->dev);
>  	return ret;
>  }
>  
> -- 
> 2.53.0
> 

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

      parent reply	other threads:[~2026-02-27 16:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-27 10:20 [PATCH] i3c: dw: Use more common code in dw_i3c_master_i2c_xfers() Markus Elfring
2026-02-27 15:58 ` Frank Li
2026-02-27 16:04 ` Nuno Sá [this message]

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=0f87effdbe7d8ac352249a6487efb5efa40156ea.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=Frank.Li@nxp.com \
    --cc=Markus.Elfring@web.de \
    --cc=adrianhoyin.ng@altera.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=aniketmaurya@google.com \
    --cc=fredrik.markstrom@est.tech \
    --cc=ivar.holmqvist@est.tech \
    --cc=jianhao.xu@seu.edu.cn \
    --cc=jorge.marques@analog.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manikanta.guntupalli@amd.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=zilin@seu.edu.cn \
    /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