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
5656
5757 enum {
5858 MLX5_BOARD_ID_LEN = 64,
59− MLX5_MAX_NAME_LEN = 16,
6059 };
6160
6261 enum {
@@ -514,7 +513,6 @@ struct mlx5_rl_table { · 451 unmodified lines
514513 };
515514
516515 struct mlx5_priv {
517− char name[MLX5_MAX_NAME_LEN];
518516 struct mlx5_eq_table *eq_table;
519517
520518 /* pages stuff */
@@ -641,6 +639,7 @@ struct mlx5_fw_tracer; · 120 unmodified lines
641639 struct mlx5_vxlan;
642640
643641 struct mlx5_core_dev {
642+ struct device *device;
644643 struct pci_dev *pdev;
645644 /* sync pci state */
646645 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