From: Amir Tzin <amirtz@nvidia.com>
Subject: [PATCH] BACKPORT:
 drivers/net/ethernet/mellanox/mlx5/core/esw/diag/qos_tracepoint.h

Change-Id: I09e2d806c8a47d787813086ef8dde4eb192c46b1
---
 .../mellanox/mlx5/core/esw/diag/qos_tracepoint.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

--- a/drivers/net/ethernet/mellanox/mlx5/core/esw/diag/qos_tracepoint.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/diag/qos_tracepoint.h
@@ -18,7 +18,11 @@ TRACE_EVENT(mlx5_esw_vport_qos_destroy,
 			     __field(unsigned short, vport_id)
 			     __field(unsigned int,   sched_elem_ix)
 			     ),
+#ifndef HAVE_ASSIGN_STR_1_PARAM
 	    TP_fast_assign(__assign_str(devname, dev_name(vport->dev->device));
+#else
+	    TP_fast_assign(__assign_str(devname);
+#endif
 		    __entry->vport_id = vport->vport;
 		    __entry->sched_elem_ix = mlx5_esw_qos_vport_get_sched_elem_ix(vport);
 	    ),
@@ -38,7 +42,11 @@ DECLARE_EVENT_CLASS(mlx5_esw_vport_qos_t
 				     __field(unsigned int, max_rate)
 				     __field(void *, parent)
 				     ),
+#ifndef HAVE_ASSIGN_STR_1_PARAM
 		    TP_fast_assign(__assign_str(devname, dev_name(vport->dev->device));
+#else
+		    TP_fast_assign(__assign_str(devname);
+#endif
 			    __entry->vport_id = vport->vport;
 			    __entry->sched_elem_ix = mlx5_esw_qos_vport_get_sched_elem_ix(vport);
 			    __entry->bw_share = bw_share;
@@ -72,7 +80,11 @@ DECLARE_EVENT_CLASS(mlx5_esw_node_qos_te
 				     __field(const void *, node)
 				     __field(unsigned int, tsar_ix)
 				     ),
+#ifndef HAVE_ASSIGN_STR_1_PARAM
 		    TP_fast_assign(__assign_str(devname, dev_name(dev->device));
+#else
+		    TP_fast_assign(__assign_str(devname);
+#endif
 			    __entry->node = node;
 			    __entry->tsar_ix = tsar_ix;
 		    ),
@@ -106,7 +118,11 @@ TRACE_EVENT(mlx5_esw_node_qos_config,
 			     __field(unsigned int, bw_share)
 			     __field(unsigned int, max_rate)
 			     ),
+#ifndef HAVE_ASSIGN_STR_1_PARAM
 	    TP_fast_assign(__assign_str(devname, dev_name(dev->device));
+#else
+	    TP_fast_assign(__assign_str(devname);
+#endif
 		    __entry->node = node;
 		    __entry->tsar_ix = tsar_ix;
 		    __entry->bw_share = bw_share;
