mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@oss.nxp.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: alexandre.belloni@bootlin.com, Frank.Li@nxp.com,
	Adrian Ng Ho Yin <adrian.ho.yin.ng@altera.com>,
	linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] i3c: master: Use unsigned int for dev_nack_retry_count consistently
Date: Tue, 16 Jun 2026 12:58:27 -0400	[thread overview]
Message-ID: <ajGAs98Vw5ibSnJW@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20260616113752.196140-4-adrian.hunter@intel.com>

On Tue, Jun 16, 2026 at 02:37:52PM +0300, Adrian Hunter wrote:
> Use unsigned int for dev_nack_retry_count across the core and
> controller drivers to match the type of master->dev_nack_retry_count.
>
> Update the sysfs store path to use kstrtouint() and adjust the
>  ->set_dev_nack_retry() callback prototype and callers accordingly.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
>  drivers/i3c/master.c               | 4 ++--
>  drivers/i3c/master/dw-i3c-master.c | 4 ++--
>  include/linux/i3c/master.h         | 2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> index 903ac01ab413..58d20624ed05 100644
> --- a/drivers/i3c/master.c
> +++ b/drivers/i3c/master.c
> @@ -760,10 +760,10 @@ static ssize_t dev_nack_retry_count_store(struct device *dev,
>  {
>  	struct i3c_bus *i3cbus = dev_to_i3cbus(dev);
>  	struct i3c_master_controller *master = dev_to_i3cmaster(dev);
> -	unsigned long val;
> +	unsigned int val;
>  	int ret;
>
> -	ret = kstrtoul(buf, 0, &val);
> +	ret = kstrtouint(buf, 0, &val);
>  	if (ret)
>  		return ret;
>
> diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
> index c7030d0cd8a6..e4f6d6f29ed5 100644
> --- a/drivers/i3c/master/dw-i3c-master.c
> +++ b/drivers/i3c/master/dw-i3c-master.c
> @@ -1481,7 +1481,7 @@ static irqreturn_t dw_i3c_master_irq_handler(int irq, void *dev_id)
>  }
>
>  static int dw_i3c_master_set_dev_nack_retry(struct i3c_master_controller *m,
> -					    unsigned long dev_nack_retry_cnt)
> +					    unsigned int dev_nack_retry_cnt)
>  {
>  	struct dw_i3c_master *master = to_dw_i3c_master(m);
>  	u32 reg;
> @@ -1489,7 +1489,7 @@ static int dw_i3c_master_set_dev_nack_retry(struct i3c_master_controller *m,
>
>  	if (dev_nack_retry_cnt > DW_I3C_DEV_NACK_RETRY_CNT_MAX) {
>  		dev_err(&master->base.dev,
> -			"Value %ld exceeds maximum %d\n",
> +			"Value %u exceeds maximum %d\n",
>  			dev_nack_retry_cnt, DW_I3C_DEV_NACK_RETRY_CNT_MAX);
>  		return -ERANGE;
>  	}
> diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h
> index f73cede87d36..6f0379bdbb6d 100644
> --- a/include/linux/i3c/master.h
> +++ b/include/linux/i3c/master.h
> @@ -494,7 +494,7 @@ struct i3c_master_controller_ops {
>  	int (*disable_hotjoin)(struct i3c_master_controller *master);
>  	int (*set_speed)(struct i3c_master_controller *master, enum i3c_open_drain_speed speed);
>  	int (*set_dev_nack_retry)(struct i3c_master_controller *master,
> -				  unsigned long dev_nack_retry_cnt);
> +				  unsigned int dev_nack_retry_cnt);
>  };
>
>  /**
> --
> 2.51.0
>

  reply	other threads:[~2026-06-16 16:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16 11:37 [PATCH 0/3] i3c: master: Small fixes for dev_nack_retry_count Adrian Hunter
2026-06-16 11:37 ` [PATCH 1/3] i3c: master: Update dev_nack_retry_count under maintenance lock Adrian Hunter
2026-06-16 16:55   ` Frank Li
2026-06-16 11:37 ` [PATCH 2/3] i3c: master: Add missing runtime PM get in dev_nack_retry_count_store() Adrian Hunter
2026-06-16 16:56   ` Frank Li
2026-06-16 11:37 ` [PATCH 3/3] i3c: master: Use unsigned int for dev_nack_retry_count consistently Adrian Hunter
2026-06-16 16:58   ` Frank Li [this message]
2026-06-16 22:27 ` [PATCH 0/3] i3c: master: Small fixes for dev_nack_retry_count Alexandre Belloni

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=ajGAs98Vw5ibSnJW@lizhi-Precision-Tower-5810 \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=adrian.ho.yin.ng@altera.com \
    --cc=adrian.hunter@intel.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-i3c@lists.infradead.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

all inboxes | Powered by JetHome®