From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54D623A1E77 for ; Mon, 5 Jan 2026 05:01:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767589291; cv=none; b=Gcx6RB5BOD9LkvhxAZyfkrRcbAZrGosNqjCgZobjto9/7e7w408DsEruQwv5/OYSc92umkVwuU9sx5gCpOHM9sVLzjzcrh9zBJN03S7/ei70nATfop8/xddQ3ig3oDuTovaRLm9nYMtyyWOCK8zD7gAeR3anDsn0W8rH8dHXlVo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767589291; c=relaxed/simple; bh=NPlink7ctY4dKFyjDt3VUF5pc9NmRfk7QsHXudwmogo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=g8zzOjKjksQFwXQlYbW8xFKwxAJLvn+fual95wZZqOHD7EjIzVWL4hghOPhwuiG9MXeV3N6veFGgyu41c+o2rIcrGQri/8jIS+TXmIXjTB1FM2OUOLIyqNXCslTjzIz7F+T/aCqcl7m8KFvFkQof4BINVaY7QuS4a5xDDp6c9lQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Bsizm1x+; arc=none smtp.client-ip=91.218.175.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Bsizm1x+" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1767589287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rdssMG/Km+sdH2F1rihUyWPjVyzOilg9V180fAaQ6OI=; b=Bsizm1x+j+TCU4dQkuNucfEyH+jXGScosUy7m7npAlIFzq6RvxCDhVWax49dXnHMbFWOYp 3S5VipK/iaMdnsqyukdPwilrAWmi5PdfYWnmhG7EBsQPq0SGMnLLHJrlz/EsBGX7Io04q3 DBV99YKpdK7BtjYE/DWUhgu1nZIeRlU= Date: Sun, 4 Jan 2026 21:01:19 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH rdma-next 2/6] RDMA/core: Avoid exporting module local functions and remove not-used ones To: Leon Romanovsky , Jason Gunthorpe , Yishai Hadas , Chiara Meiohas , Michal Kalderon , Selvin Xavier Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Parav Pandit References: <20260104-ib-core-misc-v1-0-00367f77f3a8@nvidia.com> <20260104-ib-core-misc-v1-2-00367f77f3a8@nvidia.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Zhu Yanjun In-Reply-To: <20260104-ib-core-misc-v1-2-00367f77f3a8@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 在 2026/1/4 5:51, Leon Romanovsky 写道: > From: Parav Pandit > > Some of the functions are local to the module and some are not used > starting from commit 36783dec8d79 ("RDMA/rxe: Delete deprecated module > parameters interface"). Delete and avoid exporting them. > > Signed-off-by: Parav Pandit > Signed-off-by: Leon Romanovsky Reviewed-by: Zhu Yanjun Zhu Yanjun > --- > drivers/infiniband/core/device.c | 30 ------------------------------ > include/rdma/ib_verbs.h | 2 -- > 2 files changed, 32 deletions(-) > > diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c > index 13e8a1714bbd..0b0efa9d93aa 100644 > --- a/drivers/infiniband/core/device.c > +++ b/drivers/infiniband/core/device.c > @@ -361,34 +361,6 @@ static struct ib_device *__ib_device_get_by_name(const char *name) > return NULL; > } > > -/** > - * ib_device_get_by_name - Find an IB device by name > - * @name: The name to look for > - * @driver_id: The driver ID that must match (RDMA_DRIVER_UNKNOWN matches all) > - * > - * Find and hold an ib_device by its name. The caller must call > - * ib_device_put() on the returned pointer. > - */ > -struct ib_device *ib_device_get_by_name(const char *name, > - enum rdma_driver_id driver_id) > -{ > - struct ib_device *device; > - > - down_read(&devices_rwsem); > - device = __ib_device_get_by_name(name); > - if (device && driver_id != RDMA_DRIVER_UNKNOWN && > - device->ops.driver_id != driver_id) > - device = NULL; > - > - if (device) { > - if (!ib_device_try_get(device)) > - device = NULL; > - } > - up_read(&devices_rwsem); > - return device; > -} > -EXPORT_SYMBOL(ib_device_get_by_name); > - > static int rename_compat_devs(struct ib_device *device) > { > struct ib_core_device *cdev; > @@ -2875,7 +2847,6 @@ int ib_add_sub_device(struct ib_device *parent, > > return ret; > } > -EXPORT_SYMBOL(ib_add_sub_device); > > int ib_del_sub_device_and_put(struct ib_device *sub) > { > @@ -2894,7 +2865,6 @@ int ib_del_sub_device_and_put(struct ib_device *sub) > > return 0; > } > -EXPORT_SYMBOL(ib_del_sub_device_and_put); > > #ifdef CONFIG_INFINIBAND_VIRT_DMA > int ib_dma_virt_map_sg(struct ib_device *dev, struct scatterlist *sg, int nents) > diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h > index 6aad66bc5dd7..e92bf2e44fd8 100644 > --- a/include/rdma/ib_verbs.h > +++ b/include/rdma/ib_verbs.h > @@ -4545,8 +4545,6 @@ static inline bool ib_device_try_get(struct ib_device *dev) > void ib_device_put(struct ib_device *device); > struct ib_device *ib_device_get_by_netdev(struct net_device *ndev, > enum rdma_driver_id driver_id); > -struct ib_device *ib_device_get_by_name(const char *name, > - enum rdma_driver_id driver_id); > struct net_device *ib_get_net_dev_by_params(struct ib_device *dev, u32 port, > u16 pkey, const union ib_gid *gid, > const struct sockaddr *addr); >