mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01: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>
This commit is contained in:
parent
c9fc85f1e4
commit
d48b2d3471
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user