Skip to contentSkip to conversation

tools/libs: final cleanup making mini-os callbacks static

PATCH New Juergen Gross 1 participant 3 messages Jan 11, 2022

lore
Share & tools
lore
#0 lore raw

cover tools/libs: final cleanup making mini-os callbacks static

This is a final patch series making the callbacks static now referenced by the file_ops vector only.

Note that this series depends on the related Mini-OS series to have gone in:

https://lists.xen.org/archives/html/xen-devel/2022-01/threads.html#00369

Juergen Gross (2):
tools/libs/evtchn: make mini-os specific callback static tools/libs/gnttab: make mini-os specific callback static

 tools/libs/evtchn/minios.c | 4 +---
 tools/libs/gnttab/minios.c | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/2 tools/libs/evtchn: make mini-os specific callback static

It is possible now to make the callback for Mini-OS static, as it is only referenced via the file_ops vector.

---
 tools/libs/evtchn/minios.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
tools/libs/evtchn/minios.c +1 -3
index c3a5ce3b98..b495362f6b 100644
@@ -49,8 +49,6 @@ struct port_info {
 
 extern struct wait_queue_head event_queue;
 
-int minios_evtchn_close_fd(int fd);
-
 /* XXX Note: This is not threadsafe */
 static struct port_info *port_alloc(xenevtchn_handle *xce)
 {
@@ -80,7 +78,7 @@ static void port_dealloc(struct port_info *port_info)
     free(port_info);
 }
 
-int minios_evtchn_close_fd(int fd)
+static int minios_evtchn_close_fd(int fd)
 {
     struct port_info *port_info, *tmp;
     struct file *file = get_file_from_fd(fd);
Signature · 1 line
2.26.2
#2 lore raw

PATCH 2/2 tools/libs/gnttab: make mini-os specific callback static

In reply to Juergen Gross

It is possible now to make the callback for Mini-OS static, as it is only referenced via the file_ops vector.

---
 tools/libs/gnttab/minios.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
tools/libs/gnttab/minios.c +1 -3
index c19f339c8c..616728d676 100644
@@ -33,9 +33,7 @@
 
 #include "private.h"
 
-int minios_gnttab_close_fd(int fd);
-
-int minios_gnttab_close_fd(int fd)
+static int minios_gnttab_close_fd(int fd)
 {
     struct file *file = get_file_from_fd(fd);
 
Signature · 1 line
2.26.2