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

Configure Feed

Select the types of activity you want to include in your feed.

Drivers: hv: Fix the check for HYPERVISOR_CALLBACK_VECTOR

__is_defined(HYPERVISOR_CALLBACK_VECTOR) would return 1, only if
HYPERVISOR_CALLBACK_VECTOR macro is defined as 1. However its value is
0xf3 and this leads to __is_defined() returning 0. The expectation
was to just check whether this MACRO is defined or not and get 1 if
it's defined. Replace __is_defined with #ifdef blocks instead to
fix it.

Fixes: 1dc5df133b98 ("Drivers: hv: vmbus: Get the IRQ number from DeviceTree")
Cc: stable@kernel.org
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
Reviewed-by: Roman Kisel <romank@linux.microsoft.com>
Link: https://lore.kernel.org/r/20250707084322.1763-1-namjain@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20250707084322.1763-1-namjain@linux.microsoft.com>

authored by

Naman Jain and committed by
Wei Liu
b0871aa0 0d86a8d6

+5 -4
+5 -4
drivers/hv/vmbus_drv.c
··· 2509 2509 return 0; 2510 2510 } 2511 2511 #endif 2512 - 2512 + #ifndef HYPERVISOR_CALLBACK_VECTOR 2513 2513 static int vmbus_set_irq(struct platform_device *pdev) 2514 2514 { 2515 2515 struct irq_data *data; ··· 2534 2534 2535 2535 return 0; 2536 2536 } 2537 + #endif 2537 2538 2538 2539 static int vmbus_device_add(struct platform_device *pdev) 2539 2540 { ··· 2550 2549 if (ret) 2551 2550 return ret; 2552 2551 2553 - if (!__is_defined(HYPERVISOR_CALLBACK_VECTOR)) 2554 - ret = vmbus_set_irq(pdev); 2552 + #ifndef HYPERVISOR_CALLBACK_VECTOR 2553 + ret = vmbus_set_irq(pdev); 2555 2554 if (ret) 2556 2555 return ret; 2557 - 2556 + #endif 2558 2557 for_each_of_range(&parser, &range) { 2559 2558 struct resource *res; 2560 2559