summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-03-11 12:17:33 +0100
committerFlorin Coras <florin.coras@gmail.com>2021-03-11 19:00:20 +0000
commit143610014ab91f7998014f4322c36c8b07f50d5f (patch)
tree72398cf11867f639433ae4be77635bf861bd8bcf /src/vlib
parenta31698bb7401f6e2389c0e805bf280ae52278524 (diff)
misc: fix gcc-11 build
Type: fix Change-Id: Ia17c8255806a2575bb75ed37050b47ddb347050c Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/pci/pci.c29
-rw-r--r--src/vlib/threads.c48
2 files changed, 33 insertions, 44 deletions
diff --git a/src/vlib/pci/pci.c b/src/vlib/pci/pci.c
index 7e96e1f7c6e..1c1f4b636f5 100644
--- a/src/vlib/pci/pci.c
+++ b/src/vlib/pci/pci.c
@@ -88,7 +88,7 @@ show_pci_fn (vlib_main_t * vm,
"Product Name", "Vital Product Data");
addrs = vlib_pci_get_all_dev_addrs ();
- /* *INDENT-OFF* */
+
vec_foreach (addr, addrs)
{
vlib_pci_device_info_t *d;
@@ -98,22 +98,19 @@ show_pci_fn (vlib_main_t * vm,
continue;
if (d->device_class != PCI_CLASS_NETWORK_ETHERNET && !show_all)
- continue;
-
- vec_reset_length (s);
- if (d->numa_node >= 0)
- s = format (s, " %d", d->numa_node);
-
- vlib_cli_output (vm, "%-13U%-5v%04x:%04x %-14U%-16s%-32v%U",
- format_vlib_pci_addr, addr, s,
- d->vendor_id, d->device_id,
- format_vlib_pci_link_speed, d,
- d->driver_name ? (char *) d->driver_name : "",
- d->product_name,
- format_vlib_pci_vpd, d->vpd_r, (u8 *) 0);
- vlib_pci_free_device_info (d);
+ continue;
+
+ vec_reset_length (s);
+ if (d->numa_node >= 0)
+ s = format (s, " %d", d->numa_node);
+
+ vlib_cli_output (
+ vm, "%-13U%-5v%04x:%04x %-14U%-16s%-32v%U", format_vlib_pci_addr,
+ addr, s, d->vendor_id, d->device_id, format_vlib_pci_link_speed, d,
+ d->driver_name ? (char *) d->driver_name : "", d->product_name,
+ format_vlib_pci_vpd, d->vpd_r, (u8 *) 0);
+ vlib_pci_free_device_info (d);
}
- /* *INDENT-ON* */
vec_free (s);
vec_free (addrs);
diff --git a/src/vlib/threads.c b/src/vlib/threads.c
index ea63653c53c..48e1bab8a66 100644
--- a/src/vlib/threads.c
+++ b/src/vlib/threads.c
@@ -48,13 +48,11 @@ barrier_trace_sync (f64 t_entry, f64 t_open, f64 t_closed)
if (!vlib_worker_threads->barrier_elog_enabled)
return;
- /* *INDENT-OFF* */
- ELOG_TYPE_DECLARE (e) =
- {
- .format = "bar-trace-%s-#%d",
- .format_args = "T4i4",
- };
- /* *INDENT-ON* */
+ ELOG_TYPE_DECLARE (e) = {
+ .format = "bar-trace-%s-#%d",
+ .format_args = "T4i4",
+ };
+
struct
{
u32 caller, count, t_entry, t_open, t_closed;
@@ -75,13 +73,11 @@ barrier_trace_sync_rec (f64 t_entry)
if (!vlib_worker_threads->barrier_elog_enabled)
return;
- /* *INDENT-OFF* */
- ELOG_TYPE_DECLARE (e) =
- {
- .format = "bar-syncrec-%s-#%d",
- .format_args = "T4i4",
- };
- /* *INDENT-ON* */
+ ELOG_TYPE_DECLARE (e) = {
+ .format = "bar-syncrec-%s-#%d",
+ .format_args = "T4i4",
+ };
+
struct
{
u32 caller, depth;
@@ -99,13 +95,11 @@ barrier_trace_release_rec (f64 t_entry)
if (!vlib_worker_threads->barrier_elog_enabled)
return;
- /* *INDENT-OFF* */
- ELOG_TYPE_DECLARE (e) =
- {
- .format = "bar-relrrec-#%d",
- .format_args = "i4",
- };
- /* *INDENT-ON* */
+ ELOG_TYPE_DECLARE (e) = {
+ .format = "bar-relrrec-#%d",
+ .format_args = "i4",
+ };
+
struct
{
u32 depth;
@@ -121,13 +115,11 @@ barrier_trace_release (f64 t_entry, f64 t_closed_total, f64 t_update_main)
if (!vlib_worker_threads->barrier_elog_enabled)
return;
- /* *INDENT-OFF* */
- ELOG_TYPE_DECLARE (e) =
- {
- .format = "bar-rel-#%d-e%d-u%d-t%d",
- .format_args = "i4i4i4i4",
- };
- /* *INDENT-ON* */
+ ELOG_TYPE_DECLARE (e) = {
+ .format = "bar-rel-#%d-e%d-u%d-t%d",
+ .format_args = "i4i4i4i4",
+ };
+
struct
{
u32 count, t_entry, t_update_main, t_closed_total;