lkml.org 
[lkml]   [2018]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] share nvme trace event helper functions with multiple nvme modules
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.

\
 
 \ /
  Last update: 2018-12-16 17:30    [W:0.065 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site