From nobody Tue Feb 10 01:59:41 2026 Received: from cvsmtppost20.nm.naver.com (cvsmtppost20.nm.naver.com [114.111.35.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B896339280A for ; Tue, 13 Jan 2026 13:48:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=114.111.35.236 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768312137; cv=none; b=q49+R2PQNEfoCPR34MUsYtomGqZD3C0pKEKPHN501AM6S5Wx3v3cxPKR9vXBtYCLJ1pen0YTyR8OEvopbfgqoON2ndxJ5hcffM+fenj/Qo6+qPkc2Mqmgc176I7otgB2V9Nkzyo6vRttGDdk/fdV1orFX/qCYzWwd6jThAfmIc8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768312137; c=relaxed/simple; bh=DBy4fXrwF7D1/9v4t2RP+30eJ7Y4adDfQ9rWzyZuD9I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LvUXH4Fhg7Y9qT0QYgKLKvJzrzxnz8YZdSeCSjmeBOjB+l+rHDb7/WNB+z+C2tPJV5Si2OIGZwds/BmUJajfxRymRZ84fMRcFfUqVCblQrCxEY1BGrHYXaS2q65WkGOF8FBihigkQmOgpEbml/88JQPEthMsvteMioCeyCvXdU8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=naver.com; spf=pass smtp.mailfrom=naver.com; dkim=pass (2048-bit key) header.d=naver.com header.i=@naver.com header.b=LZ0Gw+ZI; arc=none smtp.client-ip=114.111.35.236 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=naver.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=naver.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=naver.com header.i=@naver.com header.b="LZ0Gw+ZI" Received: from cvsendbo036.nm ([10.112.24.44]) by cvsmtppost20.nm.naver.com with ESMTP id B1VY4bvfT120DecQSAtlGA for ; Tue, 13 Jan 2026 13:38:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=naver.com; s=s20171208; t=1768311526; bh=DBy4fXrwF7D1/9v4t2RP+30eJ7Y4adDfQ9rWzyZuD9I=; h=From:To:Subject:Date:Message-ID:From:Subject:Feedback-ID: X-Works-Security; b=LZ0Gw+ZI9wRgyylwHHWrDdu/40nI7nhInO20fGjmRIyi8HsEzbGYB0MgpMkJhFYr0 bywqOgqYQVIW+UjHVoIO+Dr5fPb2SyWnzclWutOyEOxaq7LCYV2W7q/or6PIFsR6rQ t6iL1RVMtzCqfIgR4H8MMkKMdS5es8IEB54UH0vg46+ydneRgVfYzvM/n++fZgWOpf A9SZdCJtQcqY8PDnpLVt6JGClmkNDC79sBXSggNCtzYjgdL6dekyEYQfD0OiZdguCC F30abb0Nk7y6TE8rr0o52X+cmuHEE46tGV8x2he2UTkOxo+CYsB/BuOIg5EcRkjzNo SAmp81T7SYzLw== X-Session-ID: wCFF+3gDR-CZX8m31Z4vCA X-Works-Send-Opt: 6/Y9jAJYjHmwKo2qKqJYFquqFNwkx0eFjAJYKg== X-Works-Smtp-Source: fqnXKo2rFqJZ+HmrKoul+6E= Received: from JMW-Ubuntu.. ([14.38.141.199]) by cvnsmtp008.nm.naver.com with ESMTP id wCFF+3gDR-CZX8m31Z4vCA for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 13 Jan 2026 13:38:46 -0000 From: Minu Jin To: gregkh@linuxfoundation.org Cc: ovidiu.panait.oss@gmail.com, gshahrouzi@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Minu Jin Subject: [PATCH 2/2] staging: axis-fifo: Use bulk I/O accessors for data transfers Date: Tue, 13 Jan 2026 22:38:31 +0900 Message-ID: <20260113133831.3422480-3-s9430939@naver.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260113133831.3422480-1-s9430939@naver.com> References: <20260113133831.3422480-1-s9430939@naver.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: Minu Jin --- drivers/staging/axis-fifo/axis-fifo.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-f= ifo/axis-fifo.c index 525156583c4a..9663d2efd411 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); } =20 +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); +} + static inline void axis_fifo_write_reg(struct axis_fifo *fifo, int offset,= u32 val) { iowrite32(val, fifo->base_addr + offset); } =20 +static inline void axis_fifo_write_data(struct axis_fifo *fifo, const void= *buf, int count) +{ + iowrite32_rep(fifo->base_addr + XLLF_TDFD_OFFSET, buf, count); +} + static void reset_ip_core(struct axis_fifo *fifo) { axis_fifo_write_reg(fifo, XLLF_SRR_OFFSET, XLLF_SRR_RESET_MASK); @@ -259,10 +269,8 @@ static ssize_t axis_fifo_read(struct file *f, char __u= ser *buf, while (words_available > 0) { copy =3D min(words_available, READ_BUF_SIZE); =20 - for (i =3D 0; i < copy; i++) { - tmp_buf[i] =3D ioread32(fifo->base_addr + - XLLF_RDFD_OFFSET); - } + axis_fifo_read_data(fifo, tmp_buf, copy); + words_available -=3D copy; =20 if (copy_to_user(buf + copied * sizeof(u32), tmp_buf, @@ -378,8 +386,7 @@ static ssize_t axis_fifo_write(struct file *f, const ch= ar __user *buf, goto end_unlock; } =20 - for (int i =3D 0; i < words_to_write; ++i) - iowrite32(txbuf[i], fifo->base_addr + XLLF_TDFD_OFFSET); + axis_fifo_write_data(fifo, txbuf, words_to_write); =20 /* write packet size to fifo */ axis_fifo_write_reg(fifo, XLLF_TLR_OFFSET, len); --=20 2.43.0