[PATCH 6/7] gnttab: rename a parameter of gnttab_populate_status_frames()

Jan Beulich <[email protected]>
Newsgroups org.xenproject.lists.xen-devel
Message-ID <[email protected]>
In a function of this name, "nr" (and hence req_nr_frames) is, at the
first and second glance, the number of frames to populate. That's
misleading, and it's also only what one of the two callers
(gnttab_grow_table()) actually passes in; the other (gnttab_set_version())
passes the number of grant frames already in place.

Fold declarations while at it, and convert the assignment to an
initializer.

Signed-off-by: Jan Beulich <[email protected]>

--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -1807,12 +1807,9 @@ fault:
 
 static int
 gnttab_populate_status_frames(struct domain *d, struct grant_table *gt,
-                              unsigned int req_nr_frames)
+                              unsigned int grant_frames)
 {
-    unsigned int i;
-    unsigned int req_status_frames;
-
-    req_status_frames = grant_to_status_frames(req_nr_frames);
+    unsigned int i, req_status_frames = grant_to_status_frames(grant_frames);
 
     /* Make sure, prior version checks are architectural visible */
     block_speculation();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.