]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - ipc/util.c
Merge remote-tracking branches 'regulator/fix/as3722', 'regulator/fix/ltc3589' and...
[karo-tx-linux.git] / ipc / util.c
index 2eb0d1eaa312d9e0deda1faec271ea3bf55f8180..27d74e69fd579bbb4dd95b27593c2902df64c0a7 100644 (file)
@@ -183,7 +183,7 @@ void __init ipc_init_proc_interface(const char *path, const char *header,
  * ipc_findkey - find a key in an ipc identifier set
  * @ids: ipc identifier set
  * @key: key to find
- *     
+ *
  * Returns the locked pointer to the ipc structure if found or NULL
  * otherwise. If key is found ipc points to the owning ipc structure
  *
@@ -317,7 +317,7 @@ int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size)
  * when the key is IPC_PRIVATE.
  */
 static int ipcget_new(struct ipc_namespace *ns, struct ipc_ids *ids,
-               struct ipc_ops *ops, struct ipc_params *params)
+               const struct ipc_ops *ops, struct ipc_params *params)
 {
        int err;
 
@@ -344,7 +344,7 @@ static int ipcget_new(struct ipc_namespace *ns, struct ipc_ids *ids,
  */
 static int ipc_check_perms(struct ipc_namespace *ns,
                           struct kern_ipc_perm *ipcp,
-                          struct ipc_ops *ops,
+                          const struct ipc_ops *ops,
                           struct ipc_params *params)
 {
        int err;
@@ -375,7 +375,7 @@ static int ipc_check_perms(struct ipc_namespace *ns,
  * On success, the ipc id is returned.
  */
 static int ipcget_public(struct ipc_namespace *ns, struct ipc_ids *ids,
-               struct ipc_ops *ops, struct ipc_params *params)
+               const struct ipc_ops *ops, struct ipc_params *params)
 {
        struct kern_ipc_perm *ipcp;
        int flg = params->flg;
@@ -538,7 +538,7 @@ int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flag)
        else if (in_group_p(ipcp->cgid) || in_group_p(ipcp->gid))
                granted_mode >>= 3;
        /* is there some bit set in requested_mode but not in granted_mode? */
-       if ((requested_mode & ~granted_mode & 0007) && 
+       if ((requested_mode & ~granted_mode & 0007) &&
            !ns_capable(ns->user_ns, CAP_IPC_OWNER))
                return -1;
 
@@ -678,7 +678,7 @@ out:
  * Common routine called by sys_msgget(), sys_semget() and sys_shmget().
  */
 int ipcget(struct ipc_namespace *ns, struct ipc_ids *ids,
-                       struct ipc_ops *ops, struct ipc_params *params)
+                       const struct ipc_ops *ops, struct ipc_params *params)
 {
        if (params->key == IPC_PRIVATE)
                return ipcget_new(ns, ids, ops, params);