From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: adobriyan@gmail.com, clg@fr.ibm.com,
linux-kernel@vger.kernel.org, containers@lists.osdl.org
Subject: Re: [PATCH 4/4] mqueue namespace: adapt sysctl
Date: Tue, 24 Feb 2009 16:32:07 -0600 [thread overview]
Message-ID: <20090224223207.GA31959@us.ibm.com> (raw)
In-Reply-To: <20090224141651.70155ebd.akpm@linux-foundation.org>
Quoting Andrew Morton (akpm@linux-foundation.org):
> On Tue, 24 Feb 2009 16:02:56 -0600
> "Serge E. Hallyn" <serue@us.ibm.com> wrote:
>
> > +#ifdef CONFIG_PROC_SYSCTL
> > +static int proc_mq_dointvec(ctl_table *table, int write, struct file *filp,
> > + void __user *buffer, size_t *lenp, loff_t *ppos)
> > +{
> > + struct ctl_table mq_table;
> > + memcpy(&mq_table, table, sizeof(mq_table));
> > + mq_table.data = get_mq(table);
> > +
> > + return proc_dointvec(&mq_table, write, filp, buffer, lenp, ppos);
> > +}
> > +
> > +static int proc_mq_dointvec_minmax(ctl_table *table, int write,
> > + struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos)
> > +{
> > + struct ctl_table mq_table;
> > + memcpy(&mq_table, table, sizeof(mq_table));
> > + mq_table.data = get_mq(table);
> > +
> > + return proc_dointvec_minmax(&mq_table, write, filp, buffer,
> > + lenp, ppos);
> > +}
> > +#else
> > +proc_handler *proc_mq_dointvec = NULL;
> > +proc_handler *proc_mq_dointvec_minmax = NULL;
> > +#endif
>
> looks odd. Was this
>
> --- a/ipc/mq_sysctl.c~mqueue-namespace-adapt-sysctl-update-fix
> +++ a/ipc/mq_sysctl.c
> @@ -52,8 +52,8 @@ static int proc_mq_dointvec_minmax(ctl_t
> lenp, ppos);
> }
> #else
> -proc_handler *proc_mq_dointvec = NULL;
> -proc_handler *proc_mq_dointvec_minmax = NULL;
> +#define proc_mq_dointvec NULL
> +#define proc_mq_dointvec_minmax NULL
> #endif
>
> static int msg_max_limit_min = MIN_MSGMAX;
> _
>
> intended?
It just seemed more in line with the idea of ensuring type
safety... Of course the #defines will work and are how the
others (at least ipc and utsname) do it, but this seemed
a touch better. Of course I'll change it if that's the
preference.
thanks,
-serge
next prev parent reply other threads:[~2009-02-24 22:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-24 22:02 [PATCH 4/4] mqueue namespace: adapt sysctl Serge E. Hallyn
2009-02-24 22:16 ` Andrew Morton
2009-02-24 22:32 ` Serge E. Hallyn [this message]
2009-02-24 22:32 ` Alexey Dobriyan
2009-02-24 22:48 ` Andrew Morton
2009-02-24 23:23 ` Serge E. Hallyn
-- strict thread matches above, loose matches on Subject: below --
2009-02-24 3:03 [PATCH 1/4] move proc_net_get_sb to a generic fs/super.c helper Serge E. Hallyn
2009-02-24 3:09 ` [PATCH 4/4] mqueue namespace: adapt sysctl Serge E. Hallyn
2009-02-24 4:35 ` Alexey Dobriyan
2009-02-24 8:25 ` Cedric Le Goater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090224223207.GA31959@us.ibm.com \
--to=serue@us.ibm.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=clg@fr.ibm.com \
--cc=containers@lists.osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.