From: "tip-bot2 for Cyrill Gorcunov" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Cyrill Gorcunov <gorcunov@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/core] posix-timers: Drop redundant memset() invocation
Date: Mon, 17 Mar 2025 09:45:35 -0000 [thread overview]
Message-ID: <174220473522.14745.13008426913238808969.tip-bot2@tip-bot2> (raw)
In-Reply-To: <Z9ctVxwaYOV4A2g4@grain>
The following commit has been merged into the timers/core branch of tip:
Commit-ID: d1c3a3f1c9a1dfc2b41696b7903972f4b3fbcd02
Gitweb: https://git.kernel.org/tip/d1c3a3f1c9a1dfc2b41696b7903972f4b3fbcd02
Author: Cyrill Gorcunov <gorcunov@gmail.com>
AuthorDate: Sun, 16 Mar 2025 22:58:15 +03:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 17 Mar 2025 10:38:49 +01:00
posix-timers: Drop redundant memset() invocation
Initially in commit 6891c4509c79 memset() was required to clear a variable
allocated on stack. Commit 2482097c6c0f removed the on stack variable and
retained the memset() despite the fact that the memory is allocated via
kmem_cache_zalloc() and therefore zereoed already.
Drop the redundant memset().
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/Z9ctVxwaYOV4A2g4@grain
---
kernel/time/posix-timers.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
index 2ca1c55..bc0bdf4 100644
--- a/kernel/time/posix-timers.c
+++ b/kernel/time/posix-timers.c
@@ -526,7 +526,6 @@ static int do_timer_create(clockid_t which_clock, struct sigevent *event,
} else {
new_timer->it_sigev_notify = SIGEV_SIGNAL;
new_timer->sigq.info.si_signo = SIGALRM;
- memset(&new_timer->sigq.info.si_value, 0, sizeof(sigval_t));
new_timer->sigq.info.si_value.sival_int = new_timer->it_id;
new_timer->it_pid = get_pid(task_tgid(current));
}
prev parent reply other threads:[~2025-03-17 9:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-16 19:58 [PATCH] posix-timers: Drop redundant memset call Cyrill Gorcunov
2025-03-17 9:45 ` tip-bot2 for Cyrill Gorcunov [this message]
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=174220473522.14745.13008426913238808969.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=gorcunov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@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®