public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Minu Jin <s9430939@naver.com>
Cc: ovidiu.panait.oss@gmail.com, gshahrouzi@gmail.com,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	lkp@intel.com
Subject: Re: [PATCH v2 2/2] staging: axis-fifo: Use bulk I/O accessors for data transfers
Date: Thu, 15 Jan 2026 12:29:22 +0100	[thread overview]
Message-ID: <2026011522-uncivil-freeware-f653@gregkh> (raw)
In-Reply-To: <20260115022509.3038062-2-s9430939@naver.com>

On Thu, Jan 15, 2026 at 11:25:09AM +0900, Minu Jin wrote:
> Replace manual for loops with ioread32_rep/iowrite32_rep.
> Add axis_fifo_read_data() and axis_fifo_write_data() wrappers to
> encapsulate these block-transfer operations.
> 
> No functional changes intended
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202601141928.CyFxDTEk-lkp@intel.com/
> Signed-off-by: Minu Jin <s9430939@naver.com>
> ---
> v2:
>  - Remove unused variable 'i' in axis_fifo_read() to fix build warning
>    reported by kernel test robot
>  - Add Reported-by and Closes tags
> 
>  drivers/staging/axis-fifo/axis-fifo.c | 20 +++++++++++++-------
>  1 file changed, 13 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
> index 525156583c4a..009333cc398b 100644
> --- a/drivers/staging/axis-fifo/axis-fifo.c
> +++ b/drivers/staging/axis-fifo/axis-fifo.c
> @@ -150,11 +150,21 @@ static inline u32 axis_fifo_read_reg(struct axis_fifo *fifo, int offset)
>  	return ioread32(fifo->base_addr + offset);
>  }
>  
> +static inline void axis_fifo_read_data(struct axis_fifo *fifo, void *buf, int count)
> +{
> +	ioread32_rep(fifo->base_addr + XLLF_RDFD_OFFSET, buf, count);
> +}

Are you _sure_ this is the same thing as:

> -		for (i = 0; i < copy; i++) {
> -			tmp_buf[i] = ioread32(fifo->base_addr +
> -					      XLLF_RDFD_OFFSET);
> -		}
> +		axis_fifo_read_data(fifo, tmp_buf, copy);

While it might look the same, can the hardware handle reading chunks of
memory like that all at once instead of in a loop like the driver is
doing?  If so great, but this needs to be tested on the hardware please.

And again, you are creating wrapper functions that are not needed, if
this really can be a replacement, just call ioread32_rep() directly.

thanks,

greg k-h

  reply	other threads:[~2026-01-15 11:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-15  2:25 [PATCH v2 1/2] staging: axis-fifo: introduce helper functions for register access Minu Jin
2026-01-15  2:25 ` [PATCH v2 2/2] staging: axis-fifo: Use bulk I/O accessors for data transfers Minu Jin
2026-01-15 11:29   ` Greg KH [this message]
2026-01-15 11:30   ` Greg KH
2026-01-15 11:24 ` [PATCH v2 1/2] staging: axis-fifo: introduce helper functions for register access Greg KH
2026-01-15 11:30 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2026-01-14 13:23 Minu Jin
2026-01-14 13:23 ` [PATCH v2 2/2] staging: axis-fifo: Use bulk I/O accessors for data transfers Minu Jin

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=2026011522-uncivil-freeware-f653@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=gshahrouzi@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=lkp@intel.com \
    --cc=ovidiu.panait.oss@gmail.com \
    --cc=s9430939@naver.com \
    /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