]> git.baikalelectronics.ru Git - kernel.git/commit
xen-pciback: fix INTERRUPT_TYPE_* defines
authorMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Fri, 20 Mar 2020 03:09:18 +0000 (04:09 +0100)
committerJuergen Gross <jgross@suse.com>
Mon, 30 Mar 2020 15:31:57 +0000 (17:31 +0200)
commit24c5e671f30bce4c197e7f92a717fd44ffcc14a3
tree89314189ab000e3192b1c12893bacd7f3a95ed1e
parent66bf6760f9d0a2c62bb5f73faeb515dd42dc4798
xen-pciback: fix INTERRUPT_TYPE_* defines

xen_pcibk_get_interrupt_type() assumes INTERRUPT_TYPE_NONE being 0
(initialize ret to 0 and return as INTERRUPT_TYPE_NONE).
Fix the definition to make INTERRUPT_TYPE_NONE really 0, and also shift
other values to not leave holes.
But also, do not assume INTERRUPT_TYPE_NONE being 0 anymore to avoid
similar confusions in the future.

Fixes: 801f3f3d079a ("xen-pciback: optionally allow interrupt enable flag writes")
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/xen-pciback/conf_space.c
drivers/xen/xen-pciback/conf_space.h