@@ -12,7 +12,7 @@ using namespace syncd;
1212
1313#define MAX_OBJLIST_LEN 128
1414
15- const int maxLanesPerPort = 8 ;
15+ # define MAX_LANES_PER_PORT 8
1616
1717/*
1818 * NOTE: If real ID will change during hard restarts, then we need to remap all
@@ -244,14 +244,14 @@ std::unordered_map<sai_uint32_t, sai_object_id_t> SaiSwitch::saiGetHardwareLaneM
244244
245245 for (const auto &port_rid: portList)
246246 {
247- sai_uint32_t lanes[maxLanesPerPort ];
247+ sai_uint32_t lanes[MAX_LANES_PER_PORT ];
248248
249249 memset (lanes, 0 , sizeof (lanes));
250250
251251 sai_attribute_t attr;
252252
253253 attr.id = SAI_PORT_ATTR_HW_LANE_LIST;
254- attr.value .u32list .count = maxLanesPerPort ;
254+ attr.value .u32list .count = MAX_LANES_PER_PORT ;
255255 attr.value .u32list .list = lanes;
256256
257257 sai_status_t status = m_vendorSai->get (SAI_OBJECT_TYPE_PORT, port_rid, 1 , &attr);
@@ -956,12 +956,12 @@ std::vector<uint32_t> SaiSwitch::saiGetPortLanes(
956956
957957 std::vector<uint32_t > lanes;
958958
959- lanes.resize (maxLanesPerPort );
959+ lanes.resize (MAX_LANES_PER_PORT );
960960
961961 sai_attribute_t attr;
962962
963963 attr.id = SAI_PORT_ATTR_HW_LANE_LIST;
964- attr.value .u32list .count = maxLanesPerPort ;
964+ attr.value .u32list .count = MAX_LANES_PER_PORT ;
965965 attr.value .u32list .list = lanes.data ();
966966
967967 sai_status_t status = m_vendorSai->get (SAI_OBJECT_TYPE_PORT, port_rid, 1 , &attr);
0 commit comments