[tip: x86/tdx] virt: tdx-guest: Remove unused and confusing function argument
From: tip-bot2 for Dave Hansen
Date: Mon Sep 28 2026 - 11:54:18 EST
The following commit has been merged into the x86/tdx branch of tip:
Commit-ID: d48b2d347105436365280a3697a265aa4d37e96c
Gitweb: https://git.kernel.org/tip/d48b2d347105436365280a3697a265aa4d37e96c
Author: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
AuthorDate: Mon, 28 Sep 2026 08:36:00 -07:00
Committer: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
CommitterDate: Mon, 28 Sep 2026 08:42:58 -07:00
virt: tdx-guest: Remove unused and confusing function argument
The tsm_report_ops->report_new() function takes a void* argument for
implementations to use. But, TDX does not use the argument. It
relies entirely on the 'struct tsm_report'.
Despite that, the TDX code passes 'data' around needlessly from
tdx_report_new()=>tdx_report_new_locked() where it is completely
unused and ignored.
This is not just a cleanup or bike-shedding rename. The variable is a
real liability because there are 'quote_data' variables and even a
tdx_quote_buf->data[] that can get literally referred to as "data".
Remove the unused argument.
Signed-off-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
---
drivers/virt/coco/tdx-guest/tdx-guest.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/virt/coco/tdx-guest/tdx-guest.c b/drivers/virt/coco/tdx-guest/tdx-guest.c
index d0303e3..a21bd03 100644
--- a/drivers/virt/coco/tdx-guest/tdx-guest.c
+++ b/drivers/virt/coco/tdx-guest/tdx-guest.c
@@ -265,7 +265,7 @@ static int wait_for_quote_completion(struct tdx_quote_buf *quote_buf, u32 timeou
return (i == timeout) ? -ETIMEDOUT : 0;
}
-static int tdx_report_new_locked(struct tsm_report *report, void *data)
+static int tdx_report_new_locked(struct tsm_report *report)
{
u8 *buf;
struct tdx_quote_buf *quote_buf = quote_data;
@@ -333,10 +333,10 @@ static int tdx_report_new_locked(struct tsm_report *report, void *data)
return ret;
}
-static int tdx_report_new(struct tsm_report *report, void *data)
+static int tdx_report_new(struct tsm_report *report, void *unused)
{
scoped_cond_guard(mutex_intr, return -EINTR, "e_lock)
- return tdx_report_new_locked(report, data);
+ return tdx_report_new_locked(report);
}
static bool tdx_report_attr_visible(int n)