diff options
author | luigi <luigi@FreeBSD.org> | 2012-07-30 18:21:48 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2012-07-30 18:21:48 +0000 |
commit | a85891a9e65f7574e20609c913c528d61354dd3c (patch) | |
tree | 60cc21d00648c4e4de5362b930a08956e1a1bea0 /sys/dev/netmap/netmap.c | |
parent | 18c77ad45409e71e62e91d336526a6254a64a1c9 (diff) | |
download | FreeBSD-src-a85891a9e65f7574e20609c913c528d61354dd3c.zip FreeBSD-src-a85891a9e65f7574e20609c913c528d61354dd3c.tar.gz |
- move the inclusion of netmap headers to the common part of the code;
- more portable annotations for unused arguments;
Diffstat (limited to 'sys/dev/netmap/netmap.c')
-rw-r--r-- | sys/dev/netmap/netmap.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c index 59263e5..6fcdb17 100644 --- a/sys/dev/netmap/netmap.c +++ b/sys/dev/netmap/netmap.c @@ -90,13 +90,14 @@ __FBSDID("$FreeBSD$"); #include <net/if.h> #include <net/bpf.h> /* BIOCIMMEDIATE */ #include <net/vnet.h> -#include <net/netmap.h> -#include <dev/netmap/netmap_kern.h> #include <machine/bus.h> /* bus_dmamap_* */ MALLOC_DEFINE(M_NETMAP, "netmap", "Network memory map"); #endif /* __FreeBSD__ */ +#include <net/netmap.h> +#include <dev/netmap/netmap_kern.h> + /* * lock and unlock for the netmap memory allocator */ @@ -764,8 +765,8 @@ netmap_set_ringid(struct netmap_priv_d *priv, u_int ringid) * Return 0 on success, errno otherwise. */ static int -netmap_ioctl(__unused struct cdev *dev, u_long cmd, caddr_t data, - __unused int fflag, struct thread *td) +netmap_ioctl(struct cdev *dev, u_long cmd, caddr_t data, + int fflag, struct thread *td) { struct netmap_priv_d *priv = NULL; struct ifnet *ifp; @@ -775,6 +776,8 @@ netmap_ioctl(__unused struct cdev *dev, u_long cmd, caddr_t data, u_int i, lim; struct netmap_if *nifp; + (void)dev; /* UNUSED */ + (void)fflag; /* UNUSED */ #ifdef linux #define devfs_get_cdevpriv(pp) \ ({ *(struct netmap_priv_d **)pp = ((struct file *)td)->private_data; \ @@ -1551,7 +1554,7 @@ linux_netmap_poll(struct file * file, struct poll_table_struct *pwait) } static int -netmap_mmap(__unused struct file *f, struct vm_area_struct *vma) +netmap_mmap(struct file *f, struct vm_area_struct *vma) { int lut_skip, i, j; int user_skip = 0; @@ -1565,6 +1568,7 @@ netmap_mmap(__unused struct file *f, struct vm_area_struct *vma) * vma->vm_end: end of the mapping user address space */ + (void)f; /* UNUSED */ // XXX security checks for (i = 0; i < 3; i++) { /* loop through obj_pools */ @@ -1599,7 +1603,7 @@ netmap_start_linux(struct sk_buff *skb, struct net_device *dev) } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) // XXX was 38 #define LIN_IOCTL_NAME .ioctl int linux_netmap_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long data /* arg */) @@ -1623,8 +1627,9 @@ linux_netmap_ioctl(struct file *file, u_int cmd, u_long data /* arg */) static int -netmap_release(__unused struct inode *inode, struct file *file) +netmap_release(struct inode *inode, struct file *file) { + (void)inode; /* UNUSED */ if (file->private_data) netmap_dtor(file->private_data); return (0); |