diff options
author | Juergen Gross <jgross@suse.com> | 2022-04-28 09:01:03 +0200 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2022-05-19 14:21:48 +0200 |
commit | bd506c781207a52b0e212818d312d22e64db5cff (patch) | |
tree | 8a0fb94cdb2a666fd974ddf725e192340b4cefa3 /drivers/xen | |
parent | 297ce02669676517d2bfaa57995007b989d88524 (diff) | |
download | linux-bd506c781207a52b0e212818d312d22e64db5cff.tar.gz linux-bd506c781207a52b0e212818d312d22e64db5cff.tar.bz2 linux-bd506c781207a52b0e212818d312d22e64db5cff.zip |
xen/dmabuf: switch gntdev-dmabuf to use INVALID_GRANT_REF
Instead of using a private macro for an invalid grant reference use
the common one.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/gntdev-dmabuf.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/xen/gntdev-dmabuf.c b/drivers/xen/gntdev-dmabuf.c index d5bfd7b867fc..91073b4e4a20 100644 --- a/drivers/xen/gntdev-dmabuf.c +++ b/drivers/xen/gntdev-dmabuf.c @@ -24,15 +24,6 @@ MODULE_IMPORT_NS(DMA_BUF); -#ifndef GRANT_INVALID_REF -/* - * Note on usage of grant reference 0 as invalid grant reference: - * grant reference 0 is valid, but never exposed to a driver, - * because of the fact it is already in use/reserved by the PV console. - */ -#define GRANT_INVALID_REF 0 -#endif - struct gntdev_dmabuf { struct gntdev_dmabuf_priv *priv; struct dma_buf *dmabuf; @@ -532,7 +523,7 @@ static void dmabuf_imp_end_foreign_access(u32 *refs, int count) int i; for (i = 0; i < count; i++) - if (refs[i] != GRANT_INVALID_REF) + if (refs[i] != INVALID_GRANT_REF) gnttab_end_foreign_access(refs[i], 0UL); } @@ -567,7 +558,7 @@ static struct gntdev_dmabuf *dmabuf_imp_alloc_storage(int count) gntdev_dmabuf->nr_pages = count; for (i = 0; i < count; i++) - gntdev_dmabuf->u.imp.refs[i] = GRANT_INVALID_REF; + gntdev_dmabuf->u.imp.refs[i] = INVALID_GRANT_REF; return gntdev_dmabuf; |