History

net/mlx5: Get rid of storing copy of device name

Currently mlx5 core stores copy of the PCI device name in a mlx5_priv structure and uses pr_warn, pr_err helpers. Get rid of the copy of this name; instead store the parent device pointer that contains name as well as dma specific parameters. This also allows to use kernel's well defined dev_warn, dev_err, dev_dbg device specific print routines. This is also a preparation patch to access non PCI parent device in future.

Parav Pandit committed 7 years ago

Commit 27b942f1 parent 316793f9 files · +57 −53Browse files

Showing the changes to include/linux (1 of 9 files). Show all

Unified · Split

include/linux/mlx5/driver.h+1−2
@@ -56,7 +56,6 @@ · 55 unmodified lines
56 56
57enum {57enum {
58 MLX5_BOARD_ID_LEN = 64,58 MLX5_BOARD_ID_LEN = 64,
59 MLX5_MAX_NAME_LEN = 16,
60};59};
61 60
62enum {61enum {
@@ -514,7 +513,6 @@ struct mlx5_rl_table { · 451 unmodified lines
514};513};
515 514
516struct mlx5_priv {515struct mlx5_priv {
517 char name[MLX5_MAX_NAME_LEN];
518 struct mlx5_eq_table *eq_table;516 struct mlx5_eq_table *eq_table;
519 517
520 /* pages stuff */518 /* pages stuff */
@@ -641,6 +639,7 @@ struct mlx5_fw_tracer; · 120 unmodified lines
641struct mlx5_vxlan;639struct mlx5_vxlan;
642 640
643struct mlx5_core_dev {641struct mlx5_core_dev {
642 struct device *device;
644 struct pci_dev *pdev;643 struct pci_dev *pdev;
645 /* sync pci state */644 /* sync pci state */
646 struct mutex pci_status_mutex;645 struct mutex pci_status_mutex;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t