linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ufs: core: Move the tracing enumeration types into a new file
@ 2025-08-29 15:38 Bart Van Assche
  2025-08-30 14:05 ` Avri Altman
  2025-08-31  1:50 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Bart Van Assche @ 2025-08-29 15:38 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: linux-scsi, Bart Van Assche, James E.J. Bottomley, Peter Wang,
	Avri Altman, Bao D. Nguyen, Huan Tang

The <ufs/ufs.h> header file defines constants and data structures
related to the UFS standard. Move the enumeration types related to
tracing into a new header file because these are not defined in the UFS
standard. An intended side effect of this patch is that the tracing
enumeration types are no longer visible to UFS host drivers.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/ufs/core/ufs_trace.h       |  1 +
 drivers/ufs/core/ufs_trace_types.h | 24 ++++++++++++++++++++++++
 include/ufs/ufs.h                  | 17 -----------------
 3 files changed, 25 insertions(+), 17 deletions(-)
 create mode 100644 drivers/ufs/core/ufs_trace_types.h

diff --git a/drivers/ufs/core/ufs_trace.h b/drivers/ufs/core/ufs_trace.h
index caa32e23ffa5..584c2b5c6ad9 100644
--- a/drivers/ufs/core/ufs_trace.h
+++ b/drivers/ufs/core/ufs_trace.h
@@ -11,6 +11,7 @@
 
 #include <ufs/ufs.h>
 #include <linux/tracepoint.h>
+#include "ufs_trace_types.h"
 
 #define str_opcode(opcode)						\
 	__print_symbolic(opcode,					\
diff --git a/drivers/ufs/core/ufs_trace_types.h b/drivers/ufs/core/ufs_trace_types.h
new file mode 100644
index 000000000000..f2d5ad1d92b9
--- /dev/null
+++ b/drivers/ufs/core/ufs_trace_types.h
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef _UFS_TRACE_TYPES_H_
+#define _UFS_TRACE_TYPES_H_
+
+enum ufs_trace_str_t {
+	UFS_CMD_SEND,
+	UFS_CMD_COMP,
+	UFS_DEV_COMP,
+	UFS_QUERY_SEND,
+	UFS_QUERY_COMP,
+	UFS_QUERY_ERR,
+	UFS_TM_SEND,
+	UFS_TM_COMP,
+	UFS_TM_ERR
+};
+
+enum ufs_trace_tsf_t {
+	UFS_TSF_CDB,
+	UFS_TSF_OSF,
+	UFS_TSF_TM_INPUT,
+	UFS_TSF_TM_OUTPUT
+};
+
+#endif /* _UFS_TRACE_TYPES_H_ */
diff --git a/include/ufs/ufs.h b/include/ufs/ufs.h
index 72fd385037a6..245a6a829ce9 100644
--- a/include/ufs/ufs.h
+++ b/include/ufs/ufs.h
@@ -653,21 +653,4 @@ struct ufs_dev_info {
 	bool hid_sup;
 };
 
-/*
- * This enum is used in string mapping in ufs_trace.h.
- */
-enum ufs_trace_str_t {
-	UFS_CMD_SEND, UFS_CMD_COMP, UFS_DEV_COMP,
-	UFS_QUERY_SEND, UFS_QUERY_COMP, UFS_QUERY_ERR,
-	UFS_TM_SEND, UFS_TM_COMP, UFS_TM_ERR
-};
-
-/*
- * Transaction Specific Fields (TSF) type in the UPIU package, this enum is
- * used in ufs_trace.h for UFS command trace.
- */
-enum ufs_trace_tsf_t {
-	UFS_TSF_CDB, UFS_TSF_OSF, UFS_TSF_TM_INPUT, UFS_TSF_TM_OUTPUT
-};
-
 #endif /* End of Header */

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] ufs: core: Move the tracing enumeration types into a new file
  2025-08-29 15:38 [PATCH] ufs: core: Move the tracing enumeration types into a new file Bart Van Assche
@ 2025-08-30 14:05 ` Avri Altman
  2025-08-31  1:50 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Avri Altman @ 2025-08-30 14:05 UTC (permalink / raw)
  To: Bart Van Assche, Martin K . Petersen
  Cc: linux-scsi@vger.kernel.org, James E.J. Bottomley, Peter Wang,
	Avri Altman, Bao D. Nguyen, Huan Tang

 
> The <ufs/ufs.h> header file defines constants and data structures
> related to the UFS standard. Move the enumeration types related to
> tracing into a new header file because these are not defined in the UFS
> standard. An intended side effect of this patch is that the tracing
> enumeration types are no longer visible to UFS host drivers.
> 
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Avri Altman <avri.altman@sandisk.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ufs: core: Move the tracing enumeration types into a new file
  2025-08-29 15:38 [PATCH] ufs: core: Move the tracing enumeration types into a new file Bart Van Assche
  2025-08-30 14:05 ` Avri Altman
@ 2025-08-31  1:50 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2025-08-31  1:50 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Martin K . Petersen, linux-scsi, James E.J. Bottomley, Peter Wang,
	Avri Altman, Bao D. Nguyen, Huan Tang


Bart,

> The <ufs/ufs.h> header file defines constants and data structures
> related to the UFS standard. Move the enumeration types related to
> tracing into a new header file because these are not defined in the
> UFS standard. An intended side effect of this patch is that the
> tracing enumeration types are no longer visible to UFS host drivers.

Applied to 6.18/scsi-staging, thanks!

-- 
Martin K. Petersen

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-31  1:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-29 15:38 [PATCH] ufs: core: Move the tracing enumeration types into a new file Bart Van Assche
2025-08-30 14:05 ` Avri Altman
2025-08-31  1:50 ` Martin K. Petersen

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).