printf: Remove unused 'bprintf'
[drm/drm-misc.git] / net / core / mp_dmabuf_devmem.h
blob67cd0dd7319c347489d34d1004716b37ad8731c1
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * Dmabuf device memory provider.
5 * Authors: Mina Almasry <almasrymina@google.com>
7 */
8 #ifndef _NET_MP_DMABUF_DEVMEM_H
9 #define _NET_MP_DMABUF_DEVMEM_H
11 #include <net/netmem.h>
13 #if defined(CONFIG_NET_DEVMEM)
14 int mp_dmabuf_devmem_init(struct page_pool *pool);
16 netmem_ref mp_dmabuf_devmem_alloc_netmems(struct page_pool *pool, gfp_t gfp);
18 void mp_dmabuf_devmem_destroy(struct page_pool *pool);
20 bool mp_dmabuf_devmem_release_page(struct page_pool *pool, netmem_ref netmem);
21 #else
22 static inline int mp_dmabuf_devmem_init(struct page_pool *pool)
24 return -EOPNOTSUPP;
27 static inline netmem_ref
28 mp_dmabuf_devmem_alloc_netmems(struct page_pool *pool, gfp_t gfp)
30 return 0;
33 static inline void mp_dmabuf_devmem_destroy(struct page_pool *pool)
37 static inline bool
38 mp_dmabuf_devmem_release_page(struct page_pool *pool, netmem_ref netmem)
40 return false;
42 #endif
44 #endif /* _NET_MP_DMABUF_DEVMEM_H */