]> www.infradead.org Git - users/hch/misc.git/commitdiff
scsi: ufs: core: Move the tracing enumeration types into a new file
authorBart Van Assche <bvanassche@acm.org>
Fri, 29 Aug 2025 15:38:16 +0000 (08:38 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 31 Aug 2025 01:49:48 +0000 (21:49 -0400)
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>
Link: https://lore.kernel.org/r/20250829153841.2201700-1-bvanassche@acm.org
Reviewed-by: Avri Altman <avri.altman@sandisk.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufs_trace.h
drivers/ufs/core/ufs_trace_types.h [new file with mode: 0644]
include/ufs/ufs.h

index caa32e23ffa57f90222242cf04d84927f81ae93e..584c2b5c6ad998675d05345ab18df241c9588244 100644 (file)
@@ -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 (file)
index 0000000..f2d5ad1
--- /dev/null
@@ -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_ */
index 72fd385037a6ee9bd5358c27ad3fac67899248bd..245a6a829ce998f58da0cab2a7862ab13fcd1afe 100644 (file)
@@ -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 */