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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2026011522-uncivil-freeware-f653@gregkh>
Date: Thu, 15 Jan 2026 12:29:22 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Minu Jin <s9430939@...er.com>
Cc: ovidiu.panait.oss@...il.com, gshahrouzi@...il.com,
	linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
	lkp@...el.com
Subject: Re: [PATCH v2 2/2] staging: axis-fifo: Use bulk I/O accessors for
 data transfers

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@...el.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202601141928.CyFxDTEk-lkp@intel.com/
> Signed-off-by: Minu Jin <s9430939@...er.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ