diff mbox series

[XEN,v2,1/7] xen/memory: make 'ioreq_server_max_frames' static

Message ID 7f0d3f4330a262ec17029b3d82a7a89409215fbf.1691655814.git.nicola.vetrini@bugseng.com (mailing list archive)
State New, archived
Headers show
Series fix missing headers and static storage duration | expand

Commit Message

Nicola Vetrini Aug. 10, 2023, 8:39 a.m. UTC
The function 'ioreq_server_max_frames' can be defined static,
as its only uses are within the same file. This in turn avoids
violating Rule 8.4 because no declaration is present.

No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Fixes: 9244528955de ("xen/memory: Fix acquire_resource size semantics”)
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
---
Changes in v2:
- Revised commit message
---
 xen/common/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jan Beulich Aug. 10, 2023, 9 a.m. UTC | #1
On 10.08.2023 10:39, Nicola Vetrini wrote:
> The function 'ioreq_server_max_frames' can be defined static,
> as its only uses are within the same file. This in turn avoids
> violating Rule 8.4 because no declaration is present.

Here and presumably in subsequent patches (I only looked at patch 2
for now) you're now missing the word Misra (ahead of Rule). I'm
happy for that to be added while committing.

Jan
diff mbox series

Patch

diff --git a/xen/common/memory.c b/xen/common/memory.c
index c206fa48087d..b1dcbaf551e6 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -1120,7 +1120,7 @@  static long xatp_permission_check(struct domain *d, unsigned int space)
     return xsm_add_to_physmap(XSM_TARGET, current->domain, d);
 }
 
-unsigned int ioreq_server_max_frames(const struct domain *d)
+static unsigned int ioreq_server_max_frames(const struct domain *d)
 {
     unsigned int nr = 0;