All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Arnd Bergmann <arnd@kernel.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
	Selvin Xavier <selvin.xavier@broadcom.com>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RDMA: fix INFINIBAND_USER_ACCESS dependency
Date: Mon, 3 Jul 2023 16:32:42 +0300	[thread overview]
Message-ID: <20230703133242.GB32152@unreal> (raw)
In-Reply-To: <20230703113025.356682-1-arnd@kernel.org>

On Mon, Jul 03, 2023 at 01:30:06PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> After a change to the bnxt_re driver, it fails to link when
> CONFIG_INFINIBAND_USER_ACCESS is disabled:
> 
> aarch64-linux-ld: drivers/infiniband/hw/bnxt_re/ib_verbs.o: in function `bnxt_re_handler_BNXT_RE_METHOD_ALLOC_PAGE':
> ib_verbs.c:(.text+0xd64): undefined reference to `ib_uverbs_get_ucontext_file'
> aarch64-linux-ld: drivers/infiniband/hw/bnxt_re/ib_verbs.o:(.rodata+0x168): undefined reference to `uverbs_idr_class'
> aarch64-linux-ld: drivers/infiniband/hw/bnxt_re/ib_verbs.o:(.rodata+0x1a8): undefined reference to `uverbs_destroy_def_handler'
> 
> The problem is that the 'bnxt_re_uapi_defs' structure is built
> unconditionally and references a couple of functions that are never
> really called in this configuration but instead require other functions
> that are left out.
> 
> Adding an #ifdef around the new code, or a Kconfig dependency would
> address this problem, but adding the compile-time check inside of the
> UAPI_DEF_CHAIN_OBJ_TREE_NAMED() macro seems best because that also
> addresses the problem in other drivers that may run into the same
> dependency.
> 
> Fixes: 360da60d6c6ed ("RDMA/bnxt_re: Enable low latency push")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  include/rdma/uverbs_ioctl.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 

Thanks,
Acked-by: Leon Romanovsky <leon@kernel.org>

Linus, can you please apply this patch directly as it is overkill to
send PR for one patch?

https://lore.kernel.org/all/20230703113025.356682-1-arnd@kernel.org

Thanks

  reply	other threads:[~2023-07-03 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03 11:30 [PATCH] RDMA: fix INFINIBAND_USER_ACCESS dependency Arnd Bergmann
2023-07-03 13:32 ` Leon Romanovsky [this message]
2023-07-03 23:55   ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230703133242.GB32152@unreal \
    --to=leon@kernel.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=selvin.xavier@broadcom.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.