xen/grant-table: Remove outdated warning in gnttab_grow_table()
PATCH 1/1 xen/grant-table: Remove outdated warning in gnttab_grow_table()
One of the warning message in gnttab_grow_table() refers to a function was removed in commit 6425f91c72 "xen/gnttab: Fold grant_table_{create, set_limits}() into grant_table_init()".
Since the commit, gt->active will be allocated while initializing the grant table at domain creation. Therefore gt-active will always be valid.
Rather than replacing the warning by another one, we can now downgrade the check to an ASSERT().
--- xen/common/grant_table.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
xen/common/grant_table.c +1 -5
@@ -1793,11 +1793,7 @@ gnttab_grow_table(struct domain *d, unsigned int req_nr_frames)struct grant_table *gt = d->grant_table;unsigned int i, j; -if (unlikely (!gt->active) ) - { -gprintk (XENLOG_WARNING ,"grant_table_set_limits() call missing\n" ); -return -ENODEV ; - } +ASSERT (gt->active);if ( req_nr_frames <INITIAL_NR_GRANT_FRAMES ) req_nr_frames =INITIAL_NR_GRANT_FRAMES ;
Signature · 7 lines
2.17.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 4 lines · Julien Grall
One of the warning message in
gnttab_grow_table()refers to a function was removed in commit6425f91c72"xen/gnttab: Fold grant_table_{create, set_limits}() intogrant_table_init()".
Quoted 8 lines
Since the commit,
gt->activewill be allocated while initializing the grant table at domain creation. Therefore gt-active will always be valid.Rather than replacing the warning by another one, we can now downgrade the check to an
ASSERT().Signed-off-by Julien Grall <[email protected]>
TBH, I'd drop the assert. As you identify, its not helpful, and there is no chance we're moving back to a semi-not-initialised-yet world.
Either way, Acked-by: Andrew Cooper <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 9 lines · Andrew Cooper
Quoted 8 lines · Julien Grall
One of the warning message in
gnttab_grow_table()refers to a function was removed in commit6425f91c72"xen/gnttab: Fold grant_table_{create, set_limits}() intogrant_table_init()".Since the commit,
gt->activewill be allocated while initializing the grant table at domain creation. Therefore gt-active will always be valid.
Quoted 6 lines
Quoted 4 lines
Rather than replacing the warning by another one, we can now downgrade the check to an
ASSERT().Signed-off-by Julien Grall <[email protected]>TBH, I'd drop the assert.
+1 fwiw
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 9 lines · Andrew Cooper
Quoted 8 lines · Julien Grall
One of the warning message in
gnttab_grow_table()refers to a function was removed in commit6425f91c72"xen/gnttab: Fold grant_table_{create, set_limits}() intogrant_table_init()".Since the commit,
gt->activewill be allocated while initializing the grant table at domain creation. Therefore gt-active will always be valid.
Quoted 7 lines
Quoted 4 lines
Rather than replacing the warning by another one, we can now downgrade the check to an
ASSERT().Signed-off-by Julien Grall <[email protected]>TBH, I'd drop the assert. As you identify, its not helpful, and there is no chance we're moving back to a semi-not-initialised-yet world.
I will drop the ASSERT then and resend the patch.
Quoted 2 lines
Either way, Acked-by: Andrew Cooper <[email protected]>
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel