From: Markus Elfring <Markus.Elfring@web.de>
To: Dan Carpenter <dan.carpenter@linaro.org>,
Julia Lawall <julia.lawall@inria.fr>,
cocci@inria.fr, kernel-janitors@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>, Miaoqian Lin <linmq006@gmail.com>
Subject: Re: [cocci] [RFC] Increasing usage of direct pointer assignments from memcpy() calls with SmPL?
Date: Fri, 31 Oct 2025 07:00:43 +0100 [thread overview]
Message-ID: <8c401643-3fe6-4511-b55f-5d7643ad4fa3@web.de> (raw)
In-Reply-To: <aQNsecHJSO2U68Fc@stanley.mountain>
> No one will thank you for making these changes... :( Please don't do it.
I am curious if further developers would dare to try another source code search pattern out.
@display@
expression destination, size, source, target;
@@
*target = memcpy(destination, source, size);
I would like to point out that return values from memcpy() calls are assigned
to variables in 16 source files of the software “Linux next-20251030”.
Under which circumstances can development interests grow to reduce “unused”
return values also for this kind of function?
https://wiki.sei.cmu.edu/confluence/display/c/MSC13-C.+Detect+and+remove+unused+values
Regards,
Markus
next prev parent reply other threads:[~2025-10-31 6:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 19:56 Markus Elfring
2025-10-29 21:24 ` [cocci] " Julia Lawall
2025-10-30 9:33 ` Markus Elfring
2025-10-30 10:12 ` Julia Lawall
2025-10-30 10:19 ` Markus Elfring
2025-10-30 10:32 ` Julia Lawall
2025-10-30 12:26 ` Markus Elfring
2025-10-30 12:31 ` Julia Lawall
2025-10-30 13:35 ` Markus Elfring
2025-10-30 13:38 ` Julia Lawall
2025-10-30 13:47 ` Dan Carpenter
2025-10-30 13:58 ` Markus Elfring
2025-10-31 6:00 ` Markus Elfring [this message]
2025-10-30 14:06 ` Markus Elfring
2025-10-30 14:14 ` Julia Lawall
2025-10-30 14:22 ` Markus Elfring
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=8c401643-3fe6-4511-b55f-5d7643ad4fa3@web.de \
--to=markus.elfring@web.de \
--cc=cocci@inria.fr \
--cc=dan.carpenter@linaro.org \
--cc=julia.lawall@inria.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linmq006@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®