* [PATCH] accel/qaic: Use pointer from memcpy() call for assignment in copy_partial_exec_reqs()
@ 2025-10-31 10:34 Markus Elfring
2025-10-31 15:30 ` Jeff Hugo
0 siblings, 1 reply; 5+ messages in thread
From: Markus Elfring @ 2025-10-31 10:34 UTC (permalink / raw)
To: dri-devel, linux-arm-msm, Carl Vanderlip, Jacek Lawrynowicz,
Jeff Hugo, Oded Gabbay, Pranjal Ramajor Asha Kanojiya,
Stanislaw Gruszka
Cc: LKML, kernel-janitors, Miaoqian Lin
From: Markus Elfring <elfring@users.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@users.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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] accel/qaic: Use pointer from memcpy() call for assignment in copy_partial_exec_reqs()
2025-10-31 10:34 [PATCH] accel/qaic: Use pointer from memcpy() call for assignment in copy_partial_exec_reqs() Markus Elfring
@ 2025-10-31 15:30 ` Jeff Hugo
2025-10-31 15:34 ` Markus Elfring
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Hugo @ 2025-10-31 15:30 UTC (permalink / raw)
To: Markus Elfring, dri-devel, linux-arm-msm, Carl Vanderlip,
Jacek Lawrynowicz, Oded Gabbay, Pranjal Ramajor Asha Kanojiya,
Stanislaw Gruszka
Cc: LKML, kernel-janitors, Miaoqian Lin
On 10/31/2025 4:34 AM, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.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@users.sourceforge.net>
This does not match the address this patch was received from, therefore
DCO does not appear to be satisfied. I cannot accept this.
> ---
> 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));
The new version reads worse to me, so I do not consider this to be an
improvement. This is not a critical path, so I doubt any performance
increase that may exist outweighs the impact to readability.
-Jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] accel/qaic: Use pointer from memcpy() call for assignment in copy_partial_exec_reqs()
2025-10-31 15:30 ` Jeff Hugo
@ 2025-10-31 15:34 ` Markus Elfring
2025-10-31 16:10 ` Jeff Hugo
0 siblings, 1 reply; 5+ messages in thread
From: Markus Elfring @ 2025-10-31 15:34 UTC (permalink / raw)
To: Jeff Hugo, dri-devel, linux-arm-msm
Cc: LKML, kernel-janitors, Miaoqian Lin, Carl Vanderlip,
Jacek Lawrynowicz, Oded Gabbay, Pranjal Ramajor Asha Kanojiya,
Stanislaw Gruszka
>> From: Markus Elfring <elfring@users.sourceforge.net>
>> Date: Fri, 31 Oct 2025 11:26:33 +0100
…>> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
>
> This does not match the address this patch was received from, therefore DCO does not appear to be satisfied. I cannot accept this.
I find such a change rejection questionable.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.18-rc3#n409
Regards,
Markus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] accel/qaic: Use pointer from memcpy() call for assignment in copy_partial_exec_reqs()
2025-10-31 15:34 ` Markus Elfring
@ 2025-10-31 16:10 ` Jeff Hugo
2025-10-31 16:35 ` Markus Elfring
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Hugo @ 2025-10-31 16:10 UTC (permalink / raw)
To: Markus Elfring, dri-devel, linux-arm-msm
Cc: LKML, kernel-janitors, Miaoqian Lin, Carl Vanderlip,
Jacek Lawrynowicz, Oded Gabbay, Pranjal Ramajor Asha Kanojiya,
Stanislaw Gruszka
On 10/31/2025 9:34 AM, Markus Elfring wrote:
>>> From: Markus Elfring <elfring@users.sourceforge.net>
>>> Date: Fri, 31 Oct 2025 11:26:33 +0100
> …>> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
>>
>> This does not match the address this patch was received from, therefore DCO does not appear to be satisfied. I cannot accept this.
>
> I find such a change rejection questionable.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.18-rc3#n409
I received this patch from "Markus Elfring <Markus.Elfring@web.de>".
There is no SOB from "Markus Elfring <Markus.Elfring@web.de>" therefore
"Markus Elfring <Markus.Elfring@web.de>" has not followed the DCO.
The resolution to this is either the author and the SOB change to
"Markus Elfring <Markus.Elfring@web.de>" or "Markus Elfring
<Markus.Elfring@web.de>" adds a SOB at the end to show the path the
patch took (reference the paragraph in the documentation you linked to,
starting at line 449).
-Jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] accel/qaic: Use pointer from memcpy() call for assignment in copy_partial_exec_reqs()
2025-10-31 16:10 ` Jeff Hugo
@ 2025-10-31 16:35 ` Markus Elfring
0 siblings, 0 replies; 5+ messages in thread
From: Markus Elfring @ 2025-10-31 16:35 UTC (permalink / raw)
To: Jeff Hugo, dri-devel, linux-arm-msm
Cc: LKML, kernel-janitors, Miaoqian Lin, Carl Vanderlip,
Jacek Lawrynowicz, Oded Gabbay
>>>> From: Markus Elfring <elfring@users.sourceforge.net>
>>>> Date: Fri, 31 Oct 2025 11:26:33 +0100
>>>> …
>>>> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
>>>
>>> This does not match the address this patch was received from, therefore DCO does not appear to be satisfied. I cannot accept this.
>>
>> I find such a change rejection questionable.
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.18-rc3#n409
>
> I received this patch from "Markus Elfring <Markus.Elfring@web.de>".
This can be fine.
> There is no SOB from "Markus Elfring <Markus.Elfring@web.de>" therefore "Markus Elfring <Markus.Elfring@web.de>" has not followed the DCO.
Are you aware how author information can be better preserved for patches?
> The resolution to this is either the author and the SOB change to "Markus Elfring <Markus.Elfring@web.de>" or "Markus Elfring <Markus.Elfring@web.de>" adds a SOB at the end to show the path the patch took (reference the paragraph in the documentation you linked to, starting at line 449).
There are obviously two email addresses which refer to me.
Would you be willing to clarify the proposed change possibility another bit?
(Would another patch variant become relevant for the affected software component at all?)
Regards,
Markus
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-10-31 16:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-31 10:34 [PATCH] accel/qaic: Use pointer from memcpy() call for assignment in copy_partial_exec_reqs() Markus Elfring
2025-10-31 15:30 ` Jeff Hugo
2025-10-31 15:34 ` Markus Elfring
2025-10-31 16:10 ` Jeff Hugo
2025-10-31 16:35 ` Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox