diff mbox series

[v4,1/2] export trace.c helper functions to other modules

Message ID 20181218045138.4282-1-yupeng0921@gmail.com (mailing list archive)
State New, archived
Headers show
Series [v4,1/2] export trace.c helper functions to other modules | expand

Commit Message

peng yu Dec. 18, 2018, 4:51 a.m. UTC
Export bellow three functions:
nvme_trace_parse_admin_cmd
nvme_trace_parse_nvm_cmd
nvme_trace_disk_name
Thus any other modules which depends on nvme-core could use the trace
events in trace.h

Signed-off-by: yupeng <yupeng0921@gmail.com>
---
 drivers/nvme/host/trace.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Sagi Grimberg Dec. 18, 2018, 7:26 a.m. UTC | #1
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Christoph Hellwig Dec. 18, 2018, 4:57 p.m. UTC | #2
On Mon, Dec 17, 2018 at 08:51:37PM -0800, yupeng wrote:
> Export bellow three functions:
> nvme_trace_parse_admin_cmd
> nvme_trace_parse_nvm_cmd
> nvme_trace_disk_name
> Thus any other modules which depends on nvme-core could use the trace
> events in trace.h

But we don't actually use these trace events anywhere outside of core.c,
even with your second patch, do we?
Christoph Hellwig Dec. 18, 2018, 4:58 p.m. UTC | #3
On Tue, Dec 18, 2018 at 05:57:06PM +0100, Christoph Hellwig wrote:
> 
> 
> On Mon, Dec 17, 2018 at 08:51:37PM -0800, yupeng wrote:
> > Export bellow three functions:
> > nvme_trace_parse_admin_cmd
> > nvme_trace_parse_nvm_cmd
> > nvme_trace_disk_name
> > Thus any other modules which depends on nvme-core could use the trace
> > events in trace.h
> 
> But we don't actually use these trace events anywhere outside of core.c,
> even with your second patch, do we?

Except for nvme_trace_disk_name, which is used via __print_disk_name.
diff mbox series

Patch

diff --git a/drivers/nvme/host/trace.c b/drivers/nvme/host/trace.c
index 25b0e310f4a8..8ca7079ed2bc 100644
--- a/drivers/nvme/host/trace.c
+++ b/drivers/nvme/host/trace.c
@@ -113,6 +113,7 @@  const char *nvme_trace_parse_admin_cmd(struct trace_seq *p,
 		return nvme_trace_common(p, cdw10);
 	}
 }
+EXPORT_SYMBOL_GPL(nvme_trace_parse_admin_cmd);
 
 const char *nvme_trace_parse_nvm_cmd(struct trace_seq *p,
 				     u8 opcode, u8 *cdw10)
@@ -128,6 +129,7 @@  const char *nvme_trace_parse_nvm_cmd(struct trace_seq *p,
 		return nvme_trace_common(p, cdw10);
 	}
 }
+EXPORT_SYMBOL_GPL(nvme_trace_parse_nvm_cmd);
 
 const char *nvme_trace_disk_name(struct trace_seq *p, char *name)
 {
@@ -139,3 +141,4 @@  const char *nvme_trace_disk_name(struct trace_seq *p, char *name)
 
 	return ret;
 }
+EXPORT_SYMBOL_GPL(nvme_trace_disk_name);