Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xen/sound: switch xen_snd_front 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: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Tested-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> # Arm64 only
Signed-off-by: Juergen Gross <jgross@suse.com>

+2 -11
+2 -2
sound/xen/xen_snd_front_evtchnl.c
··· 167 167 xenbus_free_evtchn(front_info->xb_dev, channel->port); 168 168 169 169 /* End access and free the page. */ 170 - if (channel->gref != GRANT_INVALID_REF) 170 + if (channel->gref != INVALID_GRANT_REF) 171 171 gnttab_end_foreign_access(channel->gref, page); 172 172 else 173 173 free_page(page); ··· 207 207 channel->index = index; 208 208 channel->front_info = front_info; 209 209 channel->state = EVTCHNL_STATE_DISCONNECTED; 210 - channel->gref = GRANT_INVALID_REF; 210 + channel->gref = INVALID_GRANT_REF; 211 211 page = get_zeroed_page(GFP_KERNEL); 212 212 if (!page) { 213 213 ret = -ENOMEM;
-9
sound/xen/xen_snd_front_evtchnl.h
··· 15 15 16 16 struct xen_snd_front_info; 17 17 18 - #ifndef GRANT_INVALID_REF 19 - /* 20 - * FIXME: usage of grant reference 0 as invalid grant reference: 21 - * grant reference 0 is valid, but never exposed to a PV driver, 22 - * because of the fact it is already in use/reserved by the PV console. 23 - */ 24 - #define GRANT_INVALID_REF 0 25 - #endif 26 - 27 18 /* Timeout in ms to wait for backend to respond. */ 28 19 #define VSND_WAIT_BACK_MS 3000 29 20