[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <d154d3c4-dd3e-488d-862f-5361867a70f1@web.de>
Date: Fri, 31 Oct 2025 11:34:54 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: dri-devel@...ts.freedesktop.org, linux-arm-msm@...r.kernel.org,
Carl Vanderlip <carl.vanderlip@....qualcomm.com>,
Jacek Lawrynowicz <jacek.lawrynowicz@...ux.intel.com>,
Jeff Hugo <jeff.hugo@....qualcomm.com>, Oded Gabbay <ogabbay@...nel.org>,
Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@...cinc.com>,
Stanislaw Gruszka <stanislaw.gruszka@...ux.intel.com>
Cc: LKML <linux-kernel@...r.kernel.org>, kernel-janitors@...r.kernel.org,
Miaoqian Lin <linmq006@...il.com>
Subject: [PATCH] accel/qaic: Use pointer from memcpy() call for assignment in
copy_partial_exec_reqs()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Fri, 31 Oct 2025 11:26:33 +0100
A pointer was assigned to a variable. The same pointer was used for
the destination parameter of a memcpy() call.
This function is documented in the way that the same value is returned.
Thus convert two separate statements into a direct variable assignment for
the return value from a memory copy action.
The source code was transformed by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/accel/qaic/qaic_data.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/accel/qaic/qaic_data.c b/drivers/accel/qaic/qaic_data.c
index fa723a2bdfa9..c1b315d1689c 100644
--- a/drivers/accel/qaic/qaic_data.c
+++ b/drivers/accel/qaic/qaic_data.c
@@ -1171,8 +1171,8 @@ static inline int copy_partial_exec_reqs(struct qaic_device *qdev, struct bo_sli
* Copy over the last entry. Here we need to adjust len to the left over
* size, and set src and dst to the entry it is copied to.
*/
- last_req = fifo_at(dbc->req_q_base, (tail + first_n) % dbc->nelem);
- memcpy(last_req, reqs + slice->nents - 1, sizeof(*reqs));
+ last_req = memcpy(fifo_at(dbc->req_q_base, (tail + first_n) % dbc->nelem),
+ reqs + slice->nents - 1, sizeof(*reqs));
/*
* last_bytes holds size of a DMA segment, maximum DMA segment size is
--
2.51.1
Powered by blists - more mailing lists