gnttab: don't cast away constness

While _set_status_v2() indeed doesn't alter the grant_entry_header_t it
is handed a pointer to, _set_status_v1() does. Drop the const from the
parameter of the latter (and then necessarily also from _set_status()'s),
while adding const to the local variable of the former.

No functional change.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger@xenproject.org>
This commit is contained in:
Jan Beulich committed 2026-10-06 08:14:07 +02:00
1 parent d9e225afe6
commit 10c22e24a3
1 file changed
+3 -3
+3 -3
View File
@@ -740,7 +740,7 @@ static unsigned int nr_grant_entries(struct grant_table *gt)
return 0;
}
static int _set_status_v1(const grant_entry_header_t *shah,
static int _set_status_v1(grant_entry_header_t *shah,
struct domain *rd,
struct active_grant_entry *act,
int readonly,
@@ -832,7 +832,7 @@ static int _set_status_v2(const grant_entry_header_t *shah,
domid_t ldomid)
{
int rc = GNTST_okay;
uint32_t *raw_shah = (uint32_t *)shah;
const uint32_t *raw_shah = (const uint32_t *)shah;
union grant_combo scombo;
uint16_t mask = GTF_type_mask;
@@ -909,7 +909,7 @@ done:
}
static int _set_status(const grant_entry_header_t *shah,
static int _set_status(grant_entry_header_t *shah,
grant_status_t *status,
struct domain *rd,
unsigned int rgt_version,
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.