From: Pierre Peiffer <[email protected]>
semctl_down() takes one unused parameter: semnum.
This patch proposes to get rid of it.
Signed-off-by: Pierre Peiffer <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
---
ipc/sem.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: b/ipc/sem.c
===================================================================
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -882,8 +882,8 @@ static inline unsigned long copy_semid_f
* to be held in write mode.
* NOTE: no locks must be held, the rw_mutex is taken inside this function.
*/
-static int semctl_down(struct ipc_namespace *ns, int semid, int semnum,
- int cmd, int version, union semun arg)
+static int semctl_down(struct ipc_namespace *ns, int semid,
+ int cmd, int version, union semun arg)
{
struct sem_array *sma;
int err;
@@ -974,7 +974,7 @@ asmlinkage long sys_semctl (int semid, i
return err;
case IPC_RMID:
case IPC_SET:
- err = semctl_down(ns,semid,semnum,cmd,version,arg);
+ err = semctl_down(ns, semid, cmd, version, arg);
return err;
default:
return -EINVAL;
--
Pierre Peiffer
[email protected] wrote:
> From: Pierre Peiffer <[email protected]>
>
> semctl_down() takes one unused parameter: semnum.
> This patch proposes to get rid of it.
>
> Signed-off-by: Pierre Peiffer <[email protected]>
> Acked-by: Serge Hallyn <[email protected]>
> ---
> ipc/sem.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Index: b/ipc/sem.c
> ===================================================================
> --- a/ipc/sem.c
> +++ b/ipc/sem.c
> @@ -882,8 +882,8 @@ static inline unsigned long copy_semid_f
> * to be held in write mode.
> * NOTE: no locks must be held, the rw_mutex is taken inside this function.
> */
> -static int semctl_down(struct ipc_namespace *ns, int semid, int semnum,
> - int cmd, int version, union semun arg)
> +static int semctl_down(struct ipc_namespace *ns, int semid,
> + int cmd, int version, union semun arg)
> {
> struct sem_array *sma;
> int err;
> @@ -974,7 +974,7 @@ asmlinkage long sys_semctl (int semid, i
> return err;
> case IPC_RMID:
> case IPC_SET:
> - err = semctl_down(ns,semid,semnum,cmd,version,arg);
> + err = semctl_down(ns, semid, cmd, version, arg);
> return err;
> default:
> return -EINVAL;
>
Looks like semnum is only used in semctl_main(). Why not removing it
from semctl_nolock() too?
Regards,
Nadia
Nadia Derbey wrote:
> [email protected] wrote:
>> From: Pierre Peiffer <[email protected]>
>>
>> semctl_down() takes one unused parameter: semnum.
>> This patch proposes to get rid of it.
>>
>> Signed-off-by: Pierre Peiffer <[email protected]>
>> Acked-by: Serge Hallyn <[email protected]>
>> ---
>> ipc/sem.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> Index: b/ipc/sem.c
>> ===================================================================
>> --- a/ipc/sem.c
>> +++ b/ipc/sem.c
>> @@ -882,8 +882,8 @@ static inline unsigned long copy_semid_f
>> * to be held in write mode.
>> * NOTE: no locks must be held, the rw_mutex is taken inside this
>> function.
>> */
>> -static int semctl_down(struct ipc_namespace *ns, int semid, int semnum,
>> - int cmd, int version, union semun arg)
>> +static int semctl_down(struct ipc_namespace *ns, int semid,
>> + int cmd, int version, union semun arg)
>> {
>> struct sem_array *sma;
>> int err;
>> @@ -974,7 +974,7 @@ asmlinkage long sys_semctl (int semid, i
>> return err;
>> case IPC_RMID:
>> case IPC_SET:
>> - err = semctl_down(ns,semid,semnum,cmd,version,arg);
>> + err = semctl_down(ns, semid, cmd, version, arg);
>> return err;
>> default:
>> return -EINVAL;
>>
>
> Looks like semnum is only used in semctl_main(). Why not removing it
> from semctl_nolock() too?
Indeed.
In fact, I already fixed that in a previous patch, included in -mm since kernel
2.6.24.rc3-mm2 (patch named ipc-semaphores-consolidate-sem_stat-and.patch)
--
Pierre
Pierre Peiffer wrote:
>
> Nadia Derbey wrote:
>
>>[email protected] wrote:
>>
>>>From: Pierre Peiffer <[email protected]>
>>>
>>>semctl_down() takes one unused parameter: semnum.
>>>This patch proposes to get rid of it.
>>>
>>>Signed-off-by: Pierre Peiffer <[email protected]>
>>>Acked-by: Serge Hallyn <[email protected]>
>>>---
>>> ipc/sem.c | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>>Index: b/ipc/sem.c
>>>===================================================================
>>>--- a/ipc/sem.c
>>>+++ b/ipc/sem.c
>>>@@ -882,8 +882,8 @@ static inline unsigned long copy_semid_f
>>> * to be held in write mode.
>>> * NOTE: no locks must be held, the rw_mutex is taken inside this
>>>function.
>>> */
>>>-static int semctl_down(struct ipc_namespace *ns, int semid, int semnum,
>>>- int cmd, int version, union semun arg)
>>>+static int semctl_down(struct ipc_namespace *ns, int semid,
>>>+ int cmd, int version, union semun arg)
>>> {
>>> struct sem_array *sma;
>>> int err;
>>>@@ -974,7 +974,7 @@ asmlinkage long sys_semctl (int semid, i
>>> return err;
>>> case IPC_RMID:
>>> case IPC_SET:
>>>- err = semctl_down(ns,semid,semnum,cmd,version,arg);
>>>+ err = semctl_down(ns, semid, cmd, version, arg);
>>> return err;
>>> default:
>>> return -EINVAL;
>>>
>>
>>Looks like semnum is only used in semctl_main(). Why not removing it
>>from semctl_nolock() too?
>
>
> Indeed.
> In fact, I already fixed that in a previous patch, included in -mm since kernel
> 2.6.24.rc3-mm2 (patch named ipc-semaphores-consolidate-sem_stat-and.patch)
>
Oops.. Sorry for the "noise"!