block: virt-storage: Fix build for pre-v5.15 kernels

Building the Tegra virtual storage driver for v5.14 kernels fails with
the following error ...

 drivers/block/tegra_virt_storage/tegra_hv_vblk.c:1236:48: error:
 passing argument 1 of '__alloc_disk_node' makes integer from pointer
 without a cast [-Werror=int-conversion]
  vblkdev->gd = __alloc_disk_node(vblkdev->queue, NUMA_NO_NODE);
                                  ~~~~~~~^~~~~~~
                                         |
                                         struct request_queue *

Fix this by correcting the arguments passed to __alloc_disk_node() for
pre-v5.15 kernels.

Bug 3820317

Change-Id: I2f208acb3ef0a009d877ab46fb110a87968862fe
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2978392
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
This commit is contained in:
Jon Hunter
2023-09-11 21:28:19 +01:00
committed by mobile promotions
parent 3d4d545d18
commit e3f94bde03

View File

@@ -1233,7 +1233,7 @@ static void setup_device(struct vblk_dev *vblkdev)
#elif KERNEL_VERSION(5, 15, 0) <= LINUX_VERSION_CODE #elif KERNEL_VERSION(5, 15, 0) <= LINUX_VERSION_CODE
vblkdev->gd = __alloc_disk_node(vblkdev->queue, NUMA_NO_NODE, NULL); vblkdev->gd = __alloc_disk_node(vblkdev->queue, NUMA_NO_NODE, NULL);
#else #else
vblkdev->gd = __alloc_disk_node(vblkdev->queue, NUMA_NO_NODE); vblkdev->gd = __alloc_disk_node(VBLK_MINORS, NUMA_NO_NODE);
#endif #endif
if (!vblkdev->gd) { if (!vblkdev->gd) {
dev_err(vblkdev->device, "alloc_disk failure\n"); dev_err(vblkdev->device, "alloc_disk failure\n");