All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 2/2] Ocfs2: Add new OCFS2_IOC_INFO ioctl	for ocfs2 v6.
Date: Fri, 16 Apr 2010 17:11:39 -0700	[thread overview]
Message-ID: <20100417001138.GA16236@ca-server1.us.oracle.com> (raw)
In-Reply-To: <4BC8E406.2000200@oracle.com>

On Fri, Apr 16, 2010 at 03:26:14PM -0700, Sunil Mushran wrote:
> Or, you could take it a step further and make some macros. Keep these
> macros in close proximity to these functions.
> 
> #define _ocfs2_from_user(a, b)  \      
>                 copy_from_user(&(a), (a), typeof(a))
> 
> #define _ocfs2_to_user(a, b)    \      
>                 copy_to_user((typeof(a) __user *)b, &(a), sizeof(a))
> 
>         if (_ocfs2_from_user(oic, req))
>                 goto bail;
> 
>         if (_ocfs2_to_user(oic, req))
>                 goto bail;

	Give them a more specific name; no one should thing they are
generic c-t-u functions.  ocfs2-info-to-user?  bonus if they handle the
info types automagically.

Joel
-- 

"Born under a bad sign.
 I been down since I began to crawl.
 If it wasn't for bad luck,
 I wouldn't have no luck at all."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

  reply	other threads:[~2010-04-17  0:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-14  2:56 [Ocfs2-devel] [PATCH 1/2] Ocfs2: Move ocfs2 ioctl definitions from ocfs2_fs.h to newly added ocfs2_ioctl.h Tristan Ye
2010-04-14  2:56 ` [Ocfs2-devel] [PATCH 2/2] Ocfs2: Add new OCFS2_IOC_INFO ioctl for ocfs2 v6 Tristan Ye
2010-04-16 21:50   ` Sunil Mushran
2010-04-16 22:26     ` Sunil Mushran
2010-04-17  0:11       ` Joel Becker [this message]
2010-04-17  1:03         ` Sunil Mushran
2010-04-19  2:22       ` tristan
2010-04-19  1:48     ` tristan
  -- strict thread matches above, loose matches on Subject: below --
2010-03-02  5:59 [Ocfs2-devel] [PATCH 1/2] Ocfs2: Move ocfs2 ioctl definitions from ocfs2_fs.h to newly added ocfs2_ioctl.h Tristan Ye
2010-03-02  5:59 ` [Ocfs2-devel] [PATCH 2/2] Ocfs2: Add new OCFS2_IOC_INFO ioctl for ocfs2 v6 Tristan Ye
2010-02-24  7:51 [Ocfs2-devel] [PATCH 1/2] Ocfs2: Move ocfs2 ioctl definitions from ocfs2_fs.h to new added ocfs2_ioctl.h Tiger Yang
2010-02-24  7:51 ` [Ocfs2-devel] [PATCH 2/2] Ocfs2: Add new OCFS2_IOC_INFO ioctl for ocfs2 v6 Tiger Yang
2010-02-08  9:21 [Ocfs2-devel] [PATCH 1/2] Ocfs2: Move ocfs2 ioctl definitions from ocfs2_fs.h to new added ocfs2_ioctl.h Tristan Ye
2010-02-08  9:21 ` [Ocfs2-devel] [PATCH 2/2] Ocfs2: Add new OCFS2_IOC_INFO ioctl for ocfs2 v6 Tristan Ye
2010-02-05 10:15 Tristan Ye
2010-02-05  9:59 [Ocfs2-devel] [PATCH 1/2] Ocfs2: Move ocfs2 ioctl definitions from ocfs2_fs.h to new added ocfs2_ioctl.h Tristan Ye
2010-02-05  9:59 ` [Ocfs2-devel] [PATCH 2/2] Ocfs2: Add new OCFS2_IOC_INFO ioctl for ocfs2 v6 Tristan Ye
2010-02-05 16:27   ` Christoph Hellwig
2010-02-05 19:26     ` Joel Becker
2010-02-05 23:30     ` Joel Becker
2010-02-06 13:42     ` tristan.ye

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=20100417001138.GA16236@ca-server1.us.oracle.com \
    --to=joel.becker@oracle.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /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.