mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [tip: x86/tdx] virt: tdx-guest: Remove unused and confusing function argument
@ 2026-09-28 15:50 tip-bot2 for Dave Hansen
  0 siblings, 0 replies; only message in thread
From: tip-bot2 for Dave Hansen @ 2026-09-28 15:50 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Dave Hansen, x86, linux-kernel

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@linux.intel.com>
AuthorDate:    Mon, 28 Sep 2026 08:36:00 -07:00
Committer:     Dave Hansen <dave.hansen@linux.intel.com>
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@linux.intel.com>
---
 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, &quote_lock)
-		return tdx_report_new_locked(report, data);
+		return tdx_report_new_locked(report);
 }
 
 static bool tdx_report_attr_visible(int n)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-28 15:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 15:50 [tip: x86/tdx] virt: tdx-guest: Remove unused and confusing function argument tip-bot2 for Dave Hansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®