From 044cc6addab6325de0fc7e5b7e4eb03f9de55f41 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Mon, 15 Apr 2024 14:04:57 +0100 Subject: [PATCH] nvmap: Fix build for Linux v6.9 Commit c1fa617caeb0 ("tracing: Rework __assign_str() and __string() to not duplicate getting the string") update the __assign_str() function and dropped the trailing semi-colon from the definition. This is causing the NVMAP driver build to fail because of a missing semi-colon on some of the __assign_str() declarations in the nvmap.h header. Some already have a semi-colon and so fix this by populating a semi-colon for the ones that are missing. Note that there is no harm in having multiple semi-colons for kernels that define __assign_str() already with a trailing semi-colon. Bug 4471899 Change-Id: Ic804ca0ce1480f830ec3f6b5636e099b00734857 Signed-off-by: Jon Hunter (cherry picked from commit 6b355b554aa71bcbcd83df5855d46a2e67f8bc02) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3119066 GVS: Gerrit_Virtual_Submit Reviewed-by: Paritosh Dixit --- include/trace/events/nvmap.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/include/trace/events/nvmap.h b/include/trace/events/nvmap.h index 8990ae06..29f3fb8b 100644 --- a/include/trace/events/nvmap.h +++ b/include/trace/events/nvmap.h @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +/* SPDX-FileCopyrightText: Copyright (c) 2012-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. */ /* - * Copyright (c) 2012-2023, NVIDIA CORPORATION. All rights reserved. - * * NvMap event logging to ftrace. */ @@ -29,7 +28,7 @@ DECLARE_EVENT_CLASS(nvmap, ), TP_fast_assign( __entry->client = client; - __assign_str(sname, name) + __assign_str(sname, name); ), TP_printk("client=%p, name=%s", __entry->client, __get_str(sname)) @@ -65,7 +64,7 @@ TRACE_EVENT(nvmap_create_handle, TP_fast_assign( __entry->client = client; - __assign_str(sname, name) + __assign_str(sname, name); __entry->h = h; __entry->size = size; __entry->ref = ref; @@ -148,7 +147,7 @@ DECLARE_EVENT_CLASS(nvmap_handle_summary, __entry->size = size; __entry->flags = flags; __entry->tag = tag; - __assign_str(tag_name, tag_name) + __assign_str(tag_name, tag_name); ), TP_printk("client=0x%p pid=%d dupes=%u handle=0x%p share=%u base=%llx size=%zu flags=0x%x tag=0x%x %s", @@ -420,7 +419,7 @@ DECLARE_EVENT_CLASS(pin_unpin, TP_fast_assign( __entry->client = client; - __assign_str(sname, name) + __assign_str(sname, name); __entry->h = h; __entry->pin_count = pin_count; ),