Skip to content

Commit

Permalink
ipc: convert use of typedef ctl_table to struct ctl_table
Browse files Browse the repository at this point in the history
This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
JoePerches authored and torvalds committed Jun 6, 2014
1 parent d6f50c9 commit a5c5928
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions ipc/ipc_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <linux/msg.h>
#include "util.h"

static void *get_ipc(ctl_table *table)
static void *get_ipc(struct ctl_table *table)
{
char *which = table->data;
struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns;
Expand All @@ -27,7 +27,7 @@ static void *get_ipc(ctl_table *table)
}

#ifdef CONFIG_PROC_SYSCTL
static int proc_ipc_dointvec(ctl_table *table, int write,
static int proc_ipc_dointvec(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
struct ctl_table ipc_table;
Expand All @@ -38,7 +38,7 @@ static int proc_ipc_dointvec(ctl_table *table, int write,
return proc_dointvec(&ipc_table, write, buffer, lenp, ppos);
}

static int proc_ipc_dointvec_minmax(ctl_table *table, int write,
static int proc_ipc_dointvec_minmax(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
struct ctl_table ipc_table;
Expand All @@ -49,7 +49,7 @@ static int proc_ipc_dointvec_minmax(ctl_table *table, int write,
return proc_dointvec_minmax(&ipc_table, write, buffer, lenp, ppos);
}

static int proc_ipc_dointvec_minmax_orphans(ctl_table *table, int write,
static int proc_ipc_dointvec_minmax_orphans(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
struct ipc_namespace *ns = current->nsproxy->ipc_ns;
Expand All @@ -62,7 +62,7 @@ static int proc_ipc_dointvec_minmax_orphans(ctl_table *table, int write,
return err;
}

static int proc_ipc_callback_dointvec_minmax(ctl_table *table, int write,
static int proc_ipc_callback_dointvec_minmax(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
struct ctl_table ipc_table;
Expand All @@ -85,7 +85,7 @@ static int proc_ipc_callback_dointvec_minmax(ctl_table *table, int write,
return rc;
}

static int proc_ipc_doulongvec_minmax(ctl_table *table, int write,
static int proc_ipc_doulongvec_minmax(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
struct ctl_table ipc_table;
Expand Down Expand Up @@ -119,7 +119,7 @@ static void ipc_auto_callback(int val)
}
}

static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write,
static int proc_ipcauto_dointvec_minmax(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
struct ctl_table ipc_table;
Expand Down
12 changes: 6 additions & 6 deletions ipc/mq_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
#include <linux/sysctl.h>

#ifdef CONFIG_PROC_SYSCTL
static void *get_mq(ctl_table *table)
static void *get_mq(struct ctl_table *table)
{
char *which = table->data;
struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns;
which = (which - (char *)&init_ipc_ns) + (char *)ipc_ns;
return which;
}

static int proc_mq_dointvec(ctl_table *table, int write,
static int proc_mq_dointvec(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
struct ctl_table mq_table;
Expand All @@ -32,7 +32,7 @@ static int proc_mq_dointvec(ctl_table *table, int write,
return proc_dointvec(&mq_table, write, buffer, lenp, ppos);
}

static int proc_mq_dointvec_minmax(ctl_table *table, int write,
static int proc_mq_dointvec_minmax(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
struct ctl_table mq_table;
Expand All @@ -53,7 +53,7 @@ static int msg_max_limit_max = HARD_MSGMAX;
static int msg_maxsize_limit_min = MIN_MSGSIZEMAX;
static int msg_maxsize_limit_max = HARD_MSGSIZEMAX;

static ctl_table mq_sysctls[] = {
static struct ctl_table mq_sysctls[] = {
{
.procname = "queues_max",
.data = &init_ipc_ns.mq_queues_max,
Expand Down Expand Up @@ -100,7 +100,7 @@ static ctl_table mq_sysctls[] = {
{}
};

static ctl_table mq_sysctl_dir[] = {
static struct ctl_table mq_sysctl_dir[] = {
{
.procname = "mqueue",
.mode = 0555,
Expand All @@ -109,7 +109,7 @@ static ctl_table mq_sysctl_dir[] = {
{}
};

static ctl_table mq_sysctl_root[] = {
static struct ctl_table mq_sysctl_root[] = {
{
.procname = "fs",
.mode = 0555,
Expand Down

0 comments on commit a5c5928

Please sign in to comment.