Commit 0a9798c1 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

mlxsw: spectrum: Assume CONFIG_NET_DEVLINK is always enabled

Since commit f6b19b35 ("net: devlink: select NET_DEVLINK
from drivers") adds implicit select of NET_DEVLINK for
mlxsw, the code does not have to deal with the case
when CONFIG_NET_DEVLINK is not enabled. So remove the ifcase
and adjust Makefile.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Reviewed-by: default avatarPetr Machata <petrm@mellanox.com>
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 42e5425a
...@@ -28,8 +28,8 @@ mlxsw_spectrum-objs := spectrum.o spectrum_buffers.o \ ...@@ -28,8 +28,8 @@ mlxsw_spectrum-objs := spectrum.o spectrum_buffers.o \
spectrum1_mr_tcam.o spectrum2_mr_tcam.o \ spectrum1_mr_tcam.o spectrum2_mr_tcam.o \
spectrum_mr_tcam.o spectrum_mr.o \ spectrum_mr_tcam.o spectrum_mr.o \
spectrum_qdisc.o spectrum_span.o \ spectrum_qdisc.o spectrum_span.o \
spectrum_nve.o spectrum_nve_vxlan.o spectrum_nve.o spectrum_nve_vxlan.o \
spectrum_dpipe.o
mlxsw_spectrum-$(CONFIG_MLXSW_SPECTRUM_DCB) += spectrum_dcb.o mlxsw_spectrum-$(CONFIG_MLXSW_SPECTRUM_DCB) += spectrum_dcb.o
mlxsw_spectrum-$(CONFIG_NET_DEVLINK) += spectrum_dpipe.o
obj-$(CONFIG_MLXSW_MINIMAL) += mlxsw_minimal.o obj-$(CONFIG_MLXSW_MINIMAL) += mlxsw_minimal.o
mlxsw_minimal-objs := minimal.o mlxsw_minimal-objs := minimal.o
...@@ -4,24 +4,9 @@ ...@@ -4,24 +4,9 @@
#ifndef _MLXSW_PIPELINE_H_ #ifndef _MLXSW_PIPELINE_H_
#define _MLXSW_PIPELINE_H_ #define _MLXSW_PIPELINE_H_
#if IS_ENABLED(CONFIG_NET_DEVLINK)
int mlxsw_sp_dpipe_init(struct mlxsw_sp *mlxsw_sp); int mlxsw_sp_dpipe_init(struct mlxsw_sp *mlxsw_sp);
void mlxsw_sp_dpipe_fini(struct mlxsw_sp *mlxsw_sp); void mlxsw_sp_dpipe_fini(struct mlxsw_sp *mlxsw_sp);
#else
static inline int mlxsw_sp_dpipe_init(struct mlxsw_sp *mlxsw_sp)
{
return 0;
}
static inline void mlxsw_sp_dpipe_fini(struct mlxsw_sp *mlxsw_sp)
{
}
#endif
#define MLXSW_SP_DPIPE_TABLE_NAME_ERIF "mlxsw_erif" #define MLXSW_SP_DPIPE_TABLE_NAME_ERIF "mlxsw_erif"
#define MLXSW_SP_DPIPE_TABLE_NAME_HOST4 "mlxsw_host4" #define MLXSW_SP_DPIPE_TABLE_NAME_HOST4 "mlxsw_host4"
#define MLXSW_SP_DPIPE_TABLE_NAME_HOST6 "mlxsw_host6" #define MLXSW_SP_DPIPE_TABLE_NAME_HOST6 "mlxsw_host6"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment