public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: "quwenruo@cn.fujitsu.com" <quwenruo@cn.fujitsu.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 1/2] btrfs: Cleanup the btrfs_workqueue related function type
Date: Mon, 17 Mar 2014 12:58:56 +0100	[thread overview]
Message-ID: <20140317115855.GA29256@suse.cz> (raw)
In-Reply-To: <5324F370.4080303@cn.fujitsu.com>

On Sun, Mar 16, 2014 at 12:41:17AM +0000, quwenruo@cn.fujitsu.com wrote:
> On Fri, 14 Mar 2014 15:39:03 +0100, David Sterba wrote:
> > On Thu, Mar 06, 2014 at 04:19:50AM +0000, quwenruo@cn.fujitsu.com wrote:
> >> @@ -23,11 +23,13 @@
> >>   struct btrfs_workqueue;
> >>   /* Internal use only */
> >>   struct __btrfs_workqueue;
> >> +struct btrfs_work;
> >> +typedef void (*btrfs_func_t)(struct btrfs_work *arg);
> > I don't see what's wrong with the non-typedef type, CodingStyle
> > discourages from using typedefs in general (Chapter 5).
> >
> > The name btrfs_func_t is a generic, if you really need to use a typedef
> > here, please change it to something closer to the workqueues, eg.
> > btrfs_work_func_t.
> >
> btrfs_func_t is just following the work_func_t naming style,
> for btrfs it's only used to reduce the length of prototype definition.
> 
> Since btrfs_func_t is only used in btrfs, this patch can be ignored.

Thanks for considerations.  In case of the generic workqueues interface
it makes sense to provide a shortcut to the callback definition because
it appears in many structures.

  reply	other threads:[~2014-03-17 11:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-06  4:19 [PATCH 1/2] btrfs: Cleanup the btrfs_workqueue related function type quwenruo
2014-03-06  4:19 ` [PATCH 2/2] btrfs: Add ftrace for btrfs_workqueue quwenruo
2014-03-14 14:39 ` [PATCH 1/2] btrfs: Cleanup the btrfs_workqueue related function type David Sterba
2014-03-16  0:41   ` quwenruo
2014-03-17 11:58     ` David Sterba [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-03-06  3:41 quwenruo

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=20140317115855.GA29256@suse.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox