Skip to content

Commit

Permalink
ipc: standardize code comments
Browse files Browse the repository at this point in the history
IPC commenting style is all over the place, *specially* in util.c.  This
patch orders things a bit.

Signed-off-by: Davidlohr Bueso <[email protected]>
Cc: Aswin Chandramouleeswaran <[email protected]>
Cc: Rik van Riel <[email protected]>
Acked-by: Manfred Spraul <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Davidlohr Bueso authored and torvalds committed Jan 28, 2014
1 parent 239521f commit 8001c85
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 139 deletions.
24 changes: 11 additions & 13 deletions ipc/sem.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ static void unmerge_queues(struct sem_array *sma)
}

/**
* merge_queues - Merge single semop queues into global queue
* merge_queues - merge single semop queues into global queue
* @sma: semaphore array
*
* This function merges all per-semaphore queues into the global queue.
Expand Down Expand Up @@ -474,7 +474,6 @@ static inline void sem_rmid(struct ipc_namespace *ns, struct sem_array *s)
*
* Called with sem_ids.rwsem held (as a writer)
*/

static int newary(struct ipc_namespace *ns, struct ipc_params *params)
{
int id;
Expand Down Expand Up @@ -682,7 +681,7 @@ static void wake_up_sem_queue_prepare(struct list_head *pt,
}

/**
* wake_up_sem_queue_do(pt) - do the actual wake-up
* wake_up_sem_queue_do - do the actual wake-up
* @pt: list of tasks to be woken up
*
* Do the actual wake-up.
Expand Down Expand Up @@ -748,7 +747,7 @@ static int check_restart(struct sem_array *sma, struct sem_queue *q)
}

/**
* wake_const_ops(sma, semnum, pt) - Wake up non-alter tasks
* wake_const_ops - wake up non-alter tasks
* @sma: semaphore array.
* @semnum: semaphore that was modified.
* @pt: list head for the tasks that must be woken up.
Expand Down Expand Up @@ -798,15 +797,14 @@ static int wake_const_ops(struct sem_array *sma, int semnum,
}

/**
* do_smart_wakeup_zero(sma, sops, nsops, pt) - wakeup all wait for zero tasks
* do_smart_wakeup_zero - wakeup all wait for zero tasks
* @sma: semaphore array
* @sops: operations that were performed
* @nsops: number of operations
* @pt: list head of the tasks that must be woken up.
*
* do_smart_wakeup_zero() checks all required queue for wait-for-zero
* operations, based on the actual changes that were performed on the
* semaphore array.
* Checks all required queue for wait-for-zero operations, based
* on the actual changes that were performed on the semaphore array.
* The function returns 1 if at least one operation was completed successfully.
*/
static int do_smart_wakeup_zero(struct sem_array *sma, struct sembuf *sops,
Expand Down Expand Up @@ -850,7 +848,7 @@ static int do_smart_wakeup_zero(struct sem_array *sma, struct sembuf *sops,


/**
* update_queue(sma, semnum): Look for tasks that can be completed.
* update_queue - look for tasks that can be completed.
* @sma: semaphore array.
* @semnum: semaphore that was modified.
* @pt: list head for the tasks that must be woken up.
Expand Down Expand Up @@ -920,7 +918,7 @@ static int update_queue(struct sem_array *sma, int semnum, struct list_head *pt)
}

/**
* set_semotime(sma, sops) - set sem_otime
* set_semotime - set sem_otime
* @sma: semaphore array
* @sops: operations that modified the array, may be NULL
*
Expand All @@ -938,7 +936,7 @@ static void set_semotime(struct sem_array *sma, struct sembuf *sops)
}

/**
* do_smart_update(sma, sops, nsops, otime, pt) - optimized update_queue
* do_smart_update - optimized update_queue
* @sma: semaphore array
* @sops: operations that were performed
* @nsops: number of operations
Expand Down Expand Up @@ -1647,7 +1645,7 @@ static struct sem_undo *lookup_undo(struct sem_undo_list *ulp, int semid)
}

/**
* find_alloc_undo - Lookup (and if not present create) undo array
* find_alloc_undo - lookup (and if not present create) undo array
* @ns: namespace
* @semid: semaphore array id
*
Expand Down Expand Up @@ -1737,7 +1735,7 @@ static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid)


/**
* get_queue_result - Retrieve the result code from sem_queue
* get_queue_result - retrieve the result code from sem_queue
* @q: Pointer to queue structure
*
* Retrieve the return code from the pending queue. If IN_WAKEUP is found in
Expand Down
1 change: 0 additions & 1 deletion ipc/shm.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,6 @@ static const struct vm_operations_struct shm_vm_ops = {
*
* Called with shm_ids.rwsem held as a writer.
*/

static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
{
key_t key = params->key;
Expand Down
Loading

0 comments on commit 8001c85

Please sign in to comment.