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.
Showing the changes to include/linux (1 of 9 files). Show all
Unified · Split
| @@ -56,7 +56,6 @@ · 55 unmodified lines | ||
| 56 | 56 | |
| 57 | 57 | enum { |
| 58 | 58 | MLX5_BOARD_ID_LEN = 64, |
| 59 | − MLX5_MAX_NAME_LEN = 16, | |
| 60 | 59 | }; |
| 61 | 60 | |
| 62 | 61 | enum { |
| @@ -514,7 +513,6 @@ struct mlx5_rl_table { · 451 unmodified lines | ||
| 514 | 513 | }; |
| 515 | 514 | |
| 516 | 515 | struct mlx5_priv { |
| 517 | − char name[MLX5_MAX_NAME_LEN]; | |
| 518 | 516 | struct mlx5_eq_table *eq_table; |
| 519 | 517 | |
| 520 | 518 | /* pages stuff */ |
| @@ -641,6 +639,7 @@ struct mlx5_fw_tracer; · 120 unmodified lines | ||
| 641 | 639 | struct mlx5_vxlan; |
| 642 | 640 | |
| 643 | 641 | struct mlx5_core_dev { |
| 642 | + struct device *device; | |
| 644 | 643 | struct pci_dev *pdev; |
| 645 | 644 | /* sync pci state */ |
| 646 | 645 | struct mutex pci_status_mutex; |