-----Original Message----- From: Christoph Hellwig hch@infradead.org Sent: Tuesday, November 24, 2020 1:34 AM To: Xiong, Jianxin jianxin.xiong@intel.com Cc: linux-rdma@vger.kernel.org; dri-devel@lists.freedesktop.org; Doug Ledford dledford@redhat.com; Jason Gunthorpe jgg@ziepe.ca; Leon Romanovsky leon@kernel.org; Sumit Semwal sumit.semwal@linaro.org; Christian Koenig christian.koenig@amd.com; Vetter, Daniel daniel.vetter@intel.com Subject: Re: [PATCH v11 1/4] RDMA/umem: Support importing dma-buf as user memory region
As these are mostly trivial wrappers around the EXPORT_SYMBOL_GPL dmabuf exports please stick to that export style.
--- /dev/null +++ b/drivers/infiniband/core/umem_dmabuf.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ +/*
- Copyright (c) 2020 Intel Corporation. All rights reserved.
- */
+#ifndef UMEM_DMABUF_H +#define UMEM_DMABUF_H
+void ib_umem_dmabuf_release(struct ib_umem_dmabuf *umem_dmabuf);
+#endif /* UMEM_DMABUF_H */
Does this really need a separate header?
The symbol doesn't need to be exported otherwise it can be put into "ib_umem.h". Although the prototype could be put into the file where it is called directly, using a separate header file provides a cleaner interface.