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
@@ -17,7 +17,11 @@ TRACE_EVENT(mlx5_esw_vport_qos_destroy,
 			     __field(unsigned short, vport_id)
 			     __field(unsigned int,   tsar_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->tsar_ix = vport->qos.esw_tsar_ix;
 	    ),
@@ -36,7 +40,11 @@ DECLARE_EVENT_CLASS(mlx5_esw_vport_qos_t
 				     __field(unsigned int, max_rate)
 				     __field(void *, group)
 				     ),
+#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->tsar_ix = vport->qos.esw_tsar_ix;
 			    __entry->bw_share = bw_share;
@@ -68,7 +76,11 @@ DECLARE_EVENT_CLASS(mlx5_esw_group_qos_t
 				     __field(const void *, group)
 				     __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->group = group;
 			    __entry->tsar_ix = tsar_ix;
 		    ),
@@ -102,7 +114,11 @@ TRACE_EVENT(mlx5_esw_group_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->group = group;
 		    __entry->tsar_ix = tsar_ix;
 		    __entry->bw_share = bw_share;
