From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751884AbeDQBuY (ORCPT ); Mon, 16 Apr 2018 21:50:24 -0400 Received: from merlin.infradead.org ([205.233.59.134]:59396 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060AbeDQBuX (ORCPT ); Mon, 16 Apr 2018 21:50:23 -0400 Subject: Re: [PATCH] infiniband: mlx5: fix build error when INFINIBAND_USER_ACCESS=m To: Jason Gunthorpe Cc: "linux-rdma@vger.kernel.org" , LKML , Matan Barak , Leon Romanovsky , Doug Ledford References: <81ea9f01-4624-38d7-2bfe-1dd7063fa3f0@infradead.org> <20180416215526.GX23074@mellanox.com> From: Randy Dunlap Message-ID: Date: Mon, 16 Apr 2018 18:49:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180416215526.GX23074@mellanox.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/16/18 14:55, Jason Gunthorpe wrote: > On Mon, Apr 16, 2018 at 02:21:07PM -0700, Randy Dunlap wrote: >> From: Randy Dunlap >> >> Fix build errors when INFINIBAND_USER_ACCESS=m and MLX5_INFINIBAND=y. >> The build error occurs when the mlx5 driver code attempts to use >> USER_ACCESS interfaces, which are built as a loadable module. >> >> Fixes these build errors: >> >> drivers/infiniband/hw/mlx5/main.o: In function `populate_specs_root': >> ../drivers/infiniband/hw/mlx5/main.c:4982: undefined reference to `uverbs_default_get_objects' >> ../drivers/infiniband/hw/mlx5/main.c:4994: undefined reference to `uverbs_alloc_spec_tree' >> drivers/infiniband/hw/mlx5/main.o: In function `depopulate_specs_root': >> ../drivers/infiniband/hw/mlx5/main.c:5001: undefined reference to `uverbs_free_spec_tree' >> >> Reported-by: kbuild test robot >> Signed-off-by: Randy Dunlap >> Cc: Matan Barak >> Cc: Jason Gunthorpe >> Cc: Leon Romanovsky >> Cc: Doug Ledford >> Cc: linux-rdma@vger.kernel.org >> Cc: stable@vger.kernel.org # reported against 4.16 >> drivers/infiniband/hw/mlx5/Kconfig | 1 + >> 1 file changed, 1 insertion(+) >> >> +++ lnx-417-rc1/drivers/infiniband/hw/mlx5/Kconfig >> @@ -1,6 +1,7 @@ >> config MLX5_INFINIBAND >> tristate "Mellanox Connect-IB HCA support" >> depends on NETDEVICES && ETHERNET && PCI && MLX5_CORE >> + select INFINIBAND_USER_ACCESS > > Shouldn't this be done via > > depends on m || INFINIBAND_USER_ACCESS != m > > ? > > We can turn off USER_ACCESS and still successfully compile the driver. Argh, thanks, I didn't notice that. v2 on the way but not quite the way that you mentioned, more like it's done in other (netdev) places. -- ~Randy