Re: [PATCH 4/8] IB/mlx5: Only define uplink_rep_profile if CONFIG_MLX5_ESWITCH is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2019-03-26 at 15:26 +-0000, Leon Romanovsky wrote:
+AD4 I think that the best solution will be to move that extern to be outside
+AD4 of ifdef CONFIG+AF8-MLX5+AF8-ESWITCH

Hi Leon,

How about moving the uplink+AF8-rep+AF8-profile definition such that the extern
declaration can be removed?

Thanks,

Bart.

diff --git a/drivers/infiniband/hw/mlx5/ib+AF8-rep.c b/drivers/infiniband/hw/mlx5/ib+AF8-rep.c
index b8639ac71336..e2c1cb6abd1a 100644
--- a/drivers/infiniband/hw/mlx5/ib+AF8-rep.c
+-+-+- b/drivers/infiniband/hw/mlx5/ib+AF8-rep.c
+AEAAQA -7,6 +-7,51 +AEAAQA
 +ACM-include +ACI-ib+AF8-rep.h+ACI
 +ACM-include +ACI-srq.h+ACI
 
+-const struct mlx5+AF8-ib+AF8-profile uplink+AF8-rep+AF8-profile +AD0 +AHs
+-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-INIT,
+-		     mlx5+AF8-ib+AF8-stage+AF8-init+AF8-init,
+-		     mlx5+AF8-ib+AF8-stage+AF8-init+AF8-cleanup),
+-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-FLOW+AF8-DB,
+-		     mlx5+AF8-ib+AF8-stage+AF8-flow+AF8-db+AF8-init,
+-		     mlx5+AF8-ib+AF8-stage+AF8-flow+AF8-db+AF8-cleanup),
+-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-CAPS,
+-		     mlx5+AF8-ib+AF8-stage+AF8-caps+AF8-init,
+-		     NULL),
+-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-NON+AF8-DEFAULT+AF8-CB,
+-		     mlx5+AF8-ib+AF8-stage+AF8-rep+AF8-non+AF8-default+AF8-cb,
+-		     NULL),
+-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-ROCE,
+-		     mlx5+AF8-ib+AF8-stage+AF8-rep+AF8-roce+AF8-init,
+-		     mlx5+AF8-ib+AF8-stage+AF8-rep+AF8-roce+AF8-cleanup),
+-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-SRQ,
+-		     mlx5+AF8-init+AF8-srq+AF8-table,
+-		     mlx5+AF8-cleanup+AF8-srq+AF8-table),
+-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-DEVICE+AF8-RESOURCES,
+-		     mlx5+AF8-ib+AF8-stage+AF8-dev+AF8-res+AF8-init,
+-		     mlx5+AF8-ib+AF8-stage+AF8-dev+AF8-res+AF8-cleanup),
+-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-DEVICE+AF8-NOTIFIER,
+-		     mlx5+AF8-ib+AF8-stage+AF8-dev+AF8-notifier+AF8-init,
+-		     mlx5+AF8-ib+AF8-stage+AF8-dev+AF8-notifier+AF8-cleanup),
+-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-COUNTERS,
+-		     mlx5+AF8-ib+AF8-stage+AF8-counters+AF8-init,
+-		     mlx5+AF8-ib+AF8-stage+AF8-counters+AF8-cleanup),
+-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-UAR,
+-		     mlx5+AF8-ib+AF8-stage+AF8-uar+AF8-init,
+-		     mlx5+AF8-ib+AF8-stage+AF8-uar+AF8-cleanup),
+-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-BFREG,
+-		     mlx5+AF8-ib+AF8-stage+AF8-bfrag+AF8-init,
+-		     mlx5+AF8-ib+AF8-stage+AF8-bfrag+AF8-cleanup),
+-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-PRE+AF8-IB+AF8-REG+AF8-UMR,
+-		     NULL,
+-		     mlx5+AF8-ib+AF8-stage+AF8-pre+AF8-ib+AF8-reg+AF8-umr+AF8-cleanup),
+-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-IB+AF8-REG,
+-		     mlx5+AF8-ib+AF8-stage+AF8-ib+AF8-reg+AF8-init,
+-		     mlx5+AF8-ib+AF8-stage+AF8-ib+AF8-reg+AF8-cleanup),
+-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-POST+AF8-IB+AF8-REG+AF8-UMR,
+-		     mlx5+AF8-ib+AF8-stage+AF8-post+AF8-ib+AF8-reg+AF8-umr+AF8-init,
+-		     NULL),
+-+AH0AOw
+-
 static const struct mlx5+AF8-ib+AF8-profile vf+AF8-rep+AF8-profile +AD0 +AHs
 	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-INIT,
 		     mlx5+AF8-ib+AF8-stage+AF8-init+AF8-init,
diff --git a/drivers/infiniband/hw/mlx5/ib+AF8-rep.h b/drivers/infiniband/hw/mlx5/ib+AF8-rep.h
index 798d41e61fb4..ef9e789294be 100644
--- a/drivers/infiniband/hw/mlx5/ib+AF8-rep.h
+-+-+- b/drivers/infiniband/hw/mlx5/ib+AF8-rep.h
+AEAAQA -10,8 +-10,6 +AEAAQA
 +ACM-include +ACI-mlx5+AF8-ib.h+ACI
 
 +ACM-ifdef CONFIG+AF8-MLX5+AF8-ESWITCH
-extern const struct mlx5+AF8-ib+AF8-profile uplink+AF8-rep+AF8-profile+ADs
-
 u8 mlx5+AF8-ib+AF8-eswitch+AF8-mode(struct mlx5+AF8-eswitch +ACo-esw)+ADs
 struct mlx5+AF8-ib+AF8-dev +ACo-mlx5+AF8-ib+AF8-get+AF8-rep+AF8-ibdev(struct mlx5+AF8-eswitch +ACo-esw,
 					  int vport+AF8-index)+ADs
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 531ff20b32ad..3c925a524619 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+-+-+- b/drivers/infiniband/hw/mlx5/main.c
+AEAAQA -6483,51 +-6483,6 +AEAAQA static const struct mlx5+AF8-ib+AF8-profile pf+AF8-profile +AD0 +AHs
 		     mlx5+AF8-ib+AF8-stage+AF8-delay+AF8-drop+AF8-cleanup),
 +AH0AOw
 
-const struct mlx5+AF8-ib+AF8-profile uplink+AF8-rep+AF8-profile +AD0 +AHs
-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-INIT,
-		     mlx5+AF8-ib+AF8-stage+AF8-init+AF8-init,
-		     mlx5+AF8-ib+AF8-stage+AF8-init+AF8-cleanup),
-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-FLOW+AF8-DB,
-		     mlx5+AF8-ib+AF8-stage+AF8-flow+AF8-db+AF8-init,
-		     mlx5+AF8-ib+AF8-stage+AF8-flow+AF8-db+AF8-cleanup),
-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-CAPS,
-		     mlx5+AF8-ib+AF8-stage+AF8-caps+AF8-init,
-		     NULL),
-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-NON+AF8-DEFAULT+AF8-CB,
-		     mlx5+AF8-ib+AF8-stage+AF8-rep+AF8-non+AF8-default+AF8-cb,
-		     NULL),
-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-ROCE,
-		     mlx5+AF8-ib+AF8-stage+AF8-rep+AF8-roce+AF8-init,
-		     mlx5+AF8-ib+AF8-stage+AF8-rep+AF8-roce+AF8-cleanup),
-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-SRQ,
-		     mlx5+AF8-init+AF8-srq+AF8-table,
-		     mlx5+AF8-cleanup+AF8-srq+AF8-table),
-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-DEVICE+AF8-RESOURCES,
-		     mlx5+AF8-ib+AF8-stage+AF8-dev+AF8-res+AF8-init,
-		     mlx5+AF8-ib+AF8-stage+AF8-dev+AF8-res+AF8-cleanup),
-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-DEVICE+AF8-NOTIFIER,
-		     mlx5+AF8-ib+AF8-stage+AF8-dev+AF8-notifier+AF8-init,
-		     mlx5+AF8-ib+AF8-stage+AF8-dev+AF8-notifier+AF8-cleanup),
-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-COUNTERS,
-		     mlx5+AF8-ib+AF8-stage+AF8-counters+AF8-init,
-		     mlx5+AF8-ib+AF8-stage+AF8-counters+AF8-cleanup),
-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-UAR,
-		     mlx5+AF8-ib+AF8-stage+AF8-uar+AF8-init,
-		     mlx5+AF8-ib+AF8-stage+AF8-uar+AF8-cleanup),
-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-BFREG,
-		     mlx5+AF8-ib+AF8-stage+AF8-bfrag+AF8-init,
-		     mlx5+AF8-ib+AF8-stage+AF8-bfrag+AF8-cleanup),
-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-PRE+AF8-IB+AF8-REG+AF8-UMR,
-		     NULL,
-		     mlx5+AF8-ib+AF8-stage+AF8-pre+AF8-ib+AF8-reg+AF8-umr+AF8-cleanup),
-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-IB+AF8-REG,
-		     mlx5+AF8-ib+AF8-stage+AF8-ib+AF8-reg+AF8-init,
-		     mlx5+AF8-ib+AF8-stage+AF8-ib+AF8-reg+AF8-cleanup),
-	STAGE+AF8-CREATE(MLX5+AF8-IB+AF8-STAGE+AF8-POST+AF8-IB+AF8-REG+AF8-UMR,
-		     mlx5+AF8-ib+AF8-stage+AF8-post+AF8-ib+AF8-reg+AF8-umr+AF8-init,
-		     NULL),
-+AH0AOw
-
 static void +ACo-mlx5+AF8-ib+AF8-add+AF8-slave+AF8-port(struct mlx5+AF8-core+AF8-dev +ACo-mdev)
 +AHs
 	struct mlx5+AF8-ib+AF8-multiport+AF8-info +ACo-mpi+ADs




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux