Linux MM tree latest commits
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, trix@redhat.com,
	ndesaulniers@google.com, nathan@kernel.org,
	michalorzel.eng@gmail.com, akpm@linux-foundation.org
Subject: + ipc-sem-remove-redundant-assignments.patch added to -mm tree
Date: Tue, 12 Apr 2022 15:12:13 -0700	[thread overview]
Message-ID: <20220412221216.7E1F0C385A5@smtp.kernel.org> (raw)


The patch titled
     Subject: ipc/sem: Remove redundant assignments
has been added to the -mm tree.  Its filename is
     ipc-sem-remove-redundant-assignments.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/ipc-sem-remove-redundant-assignments.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/ipc-sem-remove-redundant-assignments.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Michal Orzel <michalorzel.eng@gmail.com>
Subject: ipc/sem: Remove redundant assignments

Get rid of redundant assignments which end up in values not being
read either because they are overwritten or the function ends.

Reported by clang-tidy [deadcode.DeadStores]

Link: https://lkml.kernel.org/r/20220409101933.207157-1-michalorzel.eng@gmail.com
Signed-off-by: Michal Orzel <michalorzel.eng@gmail.com>
Reviewed-by: Tom Rix <trix@redhat.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---


--- a/ipc/sem.c~ipc-sem-remove-redundant-assignments
+++ a/ipc/sem.c
@@ -766,7 +766,6 @@ static int perform_atomic_semop(struct s
 	for (sop = sops; sop < sops + nsops; sop++) {
 		curr = &sma->sems[sop->sem_num];
 		sem_op = sop->sem_op;
-		result = curr->semval;
 
 		if (sop->sem_flg & SEM_UNDO) {
 			int undo = un->semadj[sop->sem_num] - sem_op;
@@ -1430,7 +1429,6 @@ static int semctl_main(struct ipc_namesp
 	if (err)
 		goto out_rcu_wakeup;
 
-	err = -EACCES;
 	switch (cmd) {
 	case GETALL:
 	{
_

Patches currently in -mm which might be from michalorzel.eng@gmail.com are

kexec-remove-redundant-assignments.patch
ipc-sem-remove-redundant-assignments.patch


                 reply	other threads:[~2022-04-12 23:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220412221216.7E1F0C385A5@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michalorzel.eng@gmail.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=trix@redhat.com \
    /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