Skip to contentSkip to conversation

Linux-kernel-mentees Digest, Vol 38, Issue 7

DISCUSSION Ankita Pareek 1 participant 1 message May 25, 2022 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Unsubscribe

Quoted 79 lines · On Wed, 25 May 2022, 17:30 , < [email protected]…

Send Linux-kernel-mentees mailing list submissions to
[email protected]

To subscribe or unsubscribe via the World Wide Web, visit

https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

or, via email, send a message with subject or body 'help' to
[email protected]

You can reach the person managing the list at
[email protected]

When replying, please edit your Subject line so it is more specific than "Re: Contents of Linux-kernel-mentees digest..."

Today's Topics:

1. Re: [PATCH] ipc: Remove dead code in perform_atomic_semop() (Vasily Averin)

----------------------------------------------------------------------

Message: 1
Date: Wed, 25 May 2022 07:20:40 +0300
From: Vasily Averin <[email protected]>
To: Gautam Menghani <[email protected]>,
[email protected], [email protected], [email protected], [email protected]
Cc: [email protected],
[email protected]
Subject: Re: [PATCH] ipc: Remove dead code in perform_atomic_semop()
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

Quoted 10 lines · On 5/25/22 02:12, [email protected] wrote:
Quoted 9 lines · Gautam Menghani

Remove the line which is dead code. Fixes the clang scan warning:
warning: Value stored to 'result' is never read [deadcode.DeadStores]

                result = curr->semval;
---
 ipc/sem.c | 1 -
 1 file changed, 1 deletion(-)
Quoted 5 lines

ipc/sem.c static int perform_atomic_semop(struct sem_array

Quoted 5 lines
ipc/sem.c +0 -0
index 0dbdb98fdf2d..156824bcda47 100644
@@ -766,7 +766,6 @@ static int perform_atomic_semop(struct sem_array

*sma, struct sem_queue *q)

Quoted 10 lines

ipc/sem.c static int perform_atomic_semop(struct sem_array · line 771

Quoted 7 lines
ipc/sem.c +0 -1
     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;

Perhaps it would be better to keep the "result" but use it in the marked line below, like it was done in previous part of this function?

Sorry, I was wrong.

------------------------------

Subject: Digest Footer

_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

Quoted 5 lines

------------------------------

End of Linux-kernel-mentees Digest, Vol 38, Issue 7
***************************************************

_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees