Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Dec 2018 13:42:36 +0000 (UTC)
From:      Slava Shwartsman <slavash@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341558 - head/sys/dev/mlx5/mlx5_core
Message-ID:  <201812051342.wB5DgaDX081263@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: slavash
Date: Wed Dec  5 13:42:36 2018
New Revision: 341558
URL: https://svnweb.freebsd.org/changeset/base/341558

Log:
  mlx5: Convert some spaces into tabs and use device_printf() instead of printf().
  
  Submitted by:   hselasky@
  Approved by:    hselasky (mentor)
  MFC after:      1 week
  Sponsored by:   Mellanox Technologies

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_main.c

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_core/mlx5_main.c	Wed Dec  5 13:42:06 2018	(r341557)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c	Wed Dec  5 13:42:36 2018	(r341558)
@@ -1211,7 +1211,7 @@ static int init_one(struct pci_dev *pdev,
 		priv->pci_dev_data = id->driver_data;
 
 	if (prof_sel < 0 || prof_sel >= ARRAY_SIZE(profiles)) {
-		printf("mlx5_core: WARN: ""selected profile out of range, selecting default (%d)\n", MLX5_DEFAULT_PROF);
+		device_printf(bsddev, "WARN: selected profile out of range, selecting default (%d)\n", MLX5_DEFAULT_PROF);
 		prof_sel = MLX5_DEFAULT_PROF;
 	}
 	dev->profile = &profiles[prof_sel];
@@ -1226,38 +1226,38 @@ static int init_one(struct pci_dev *pdev,
 
 	INIT_LIST_HEAD(&priv->ctx_list);
 	spin_lock_init(&priv->ctx_lock);
-        mutex_init(&dev->pci_status_mutex);
-        mutex_init(&dev->intf_state_mutex);
+	mutex_init(&dev->pci_status_mutex);
+	mutex_init(&dev->intf_state_mutex);
 	err = mlx5_pci_init(dev, priv);
 	if (err) {
-		device_printf((&pdev->dev)->bsddev, "ERR: ""mlx5_pci_init failed %d\n", err);
+		device_printf(bsddev, "ERR: mlx5_pci_init failed %d\n", err);
 		goto clean_dev;
 	}
 
-        err = mlx5_health_init(dev);
-        if (err) {
-                device_printf((&pdev->dev)->bsddev, "ERR: ""mlx5_health_init failed %d\n", err);
-                goto close_pci;
-        }
+	err = mlx5_health_init(dev);
+	if (err) {
+		device_printf(bsddev, "ERR: mlx5_health_init failed %d\n", err);
+		goto close_pci;
+	}
 
 	mlx5_pagealloc_init(dev);
 
 	err = mlx5_load_one(dev, priv, true);
 	if (err) {
-		device_printf((&pdev->dev)->bsddev, "ERR: ""mlx5_register_device failed %d\n", err);
+		device_printf(bsddev, "ERR: mlx5_load_one failed %d\n", err);
 		goto clean_health;
 	}
 
 	mlx5_fwdump_prep(dev);
 
-	pci_save_state(pdev->dev.bsddev);
+	pci_save_state(bsddev);
 	return 0;
 
 clean_health:
 	mlx5_pagealloc_cleanup(dev);
-        mlx5_health_cleanup(dev);
+	mlx5_health_cleanup(dev);
 close_pci:
-        mlx5_pci_close(dev, priv);
+	mlx5_pci_close(dev, priv);
 clean_dev:
 	sysctl_ctx_free(&dev->sysctl_ctx);
 	kfree(dev);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812051342.wB5DgaDX081263>