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, Mar 26, 2019 at 08:21:10AM -0700, Bart Van Assche wrote:
> On Tue, 2019-03-26 at 10:24 +0000, Leon Romanovsky wrote:
> > On Thu, Mar 21, 2019 at 10:24:13AM -0700, Bart Van Assche wrote:
> > > This patch avoids that sparse complains about a missing declaration when
> > > building with CONFIG_MLX5_ESWITCH=n.
> >
> > What error do you see?
> > I'm building without MLX5_ESWITCH too and not fully understand what
> > declaration is missing.
>
> Hi Leon,
>
> sparse reports the following warning if I build with MLX5_ESWITCH disabled:
>
> drivers/infiniband/hw/mlx5/main.c:6486:30: warning: symbol 'uplink_rep_profile' was not declared. Should it be static?
>
> I think that is related to the following declaration in ib_rep.h:
>
> #ifdef CONFIG_MLX5_ESWITCH
> extern const struct mlx5_ib_profile uplink_rep_profile;
> [ ... ]
> #else
> [ ... ]
> #endif

Thanks,

I think that the best solution will be to move that extern to be outside
of ifdef CONFIG_MLX5_ESWITCH

Thanks

>
> Bart.




[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