From 297859c56b7b6c93e150d75f7964a2e13b65dddf Mon Sep 17 00:00:00 2001 From: David Heidelberg Date: Fri, 5 May 2023 22:32:47 +0200 Subject: [PATCH] panvk: drop path from panvk_physical_device struct Unnecessary. Only produces warning: ``` ../src/panfrost/vulkan/panvk_device.c:437:4: warning: 'strncpy' specified bound 20 equals destination size [-Wstringop-truncation] 437 | strncpy(device->path, path, ARRAY_SIZE(device->path)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Signed-off-by: David Heidelberg Part-of: --- src/panfrost/vulkan/panvk_device.c | 2 -- src/panfrost/vulkan/panvk_private.h | 1 - 2 files changed, 3 deletions(-) diff --git a/src/panfrost/vulkan/panvk_device.c b/src/panfrost/vulkan/panvk_device.c index 9df451e..1ee18ee 100644 --- a/src/panfrost/vulkan/panvk_device.c +++ b/src/panfrost/vulkan/panvk_device.c @@ -433,8 +433,6 @@ panvk_physical_device_init(struct panvk_physical_device *device, } device->instance = instance; - assert(strlen(path) < ARRAY_SIZE(device->path)); - strncpy(device->path, path, ARRAY_SIZE(device->path)); if (instance->vk.enabled_extensions.KHR_display) { master_fd = open(drm_device->nodes[DRM_NODE_PRIMARY], O_RDWR | O_CLOEXEC); diff --git a/src/panfrost/vulkan/panvk_private.h b/src/panfrost/vulkan/panvk_private.h index 4511a78..0dbe68d 100644 --- a/src/panfrost/vulkan/panvk_private.h +++ b/src/panfrost/vulkan/panvk_private.h @@ -177,7 +177,6 @@ struct panvk_physical_device { struct panvk_instance *instance; - char path[20]; char name[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]; uint8_t driver_uuid[VK_UUID_SIZE]; uint8_t device_uuid[VK_UUID_SIZE]; -- 2.7.4