linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: yupeng <yupeng0921@gmail.com>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-nvme@lists.infradead.org, keith.busch@intel.com,
	axboe@fb.com, hch@lst.de, sagi@grimberg.me
Subject: Re: [PATCH v2 1/2] share nvme trace event helper functions with multiple nvme modules
Date: Sun, 16 Dec 2018 08:30:10 -0800	[thread overview]
Message-ID: <20181216163010.GA21285@infradead.org> (raw)
In-Reply-To: <20181216014849.8584-1-yupeng0921@gmail.com>

On Sat, Dec 15, 2018 at 05:48:48PM -0800, yupeng wrote:
> The trace.c could only be used by core.c, move it to a header file and
> then other nvme modules could also use it. This commit creates a new
> header file trace_common.h, which has all the functions of trace.c. It
> changes all functions to static functions, so any other modules could
> include it without conflict. This commit also moves some common
> functions from trace.h to trace_common.h. Because the trace events in
> trace.h are used by nvme-core only, this commit renames the trace.h to
> trace_core.h.

We could always export bits out of trace.o using EXPORT_SYMBOL_GPL,
no need to move duplicate the code.  Also as far as I can tell you
only use __assign_disk_name of the helpers, so we can move that into
a new helper.  It might make sense to just move that into
include/linux/genhd.h to make it easily available everywhere.


      parent reply	other threads:[~2018-12-16 16:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-16  1:48 [PATCH v2 1/2] share nvme trace event helper functions with multiple nvme modules yupeng
2018-12-16  1:48 ` [PATCH v2 2/2] trace nvme submit queue status yupeng
2018-12-16 16:30 ` Christoph Hellwig [this message]

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=20181216163010.GA21285@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=yupeng0921@gmail.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;
as well as URLs for NNTP newsgroup(s).