compat: clean up empty lines in .c and .h files

This commit is contained in:
Mateusz Guzik 2020-09-01 21:24:33 +00:00
parent ab6c81a218
commit 1a18003240
59 changed files with 2 additions and 142 deletions

View File

@ -324,43 +324,30 @@ int cloudabi_sys_thread_yield(struct thread *, struct cloudabi_sys_thread_yield_
#ifdef COMPAT_43
#endif /* COMPAT_43 */
#ifdef COMPAT_FREEBSD4
#endif /* COMPAT_FREEBSD4 */
#ifdef COMPAT_FREEBSD6
#endif /* COMPAT_FREEBSD6 */
#ifdef COMPAT_FREEBSD7
#endif /* COMPAT_FREEBSD7 */
#ifdef COMPAT_FREEBSD10
#endif /* COMPAT_FREEBSD10 */
#ifdef COMPAT_FREEBSD11
#endif /* COMPAT_FREEBSD11 */
#ifdef COMPAT_FREEBSD12
#endif /* COMPAT_FREEBSD12 */
#define CLOUDABI32_SYS_AUE_cloudabi_sys_clock_res_get AUE_NULL

View File

@ -324,43 +324,30 @@ int cloudabi_sys_thread_yield(struct thread *, struct cloudabi_sys_thread_yield_
#ifdef COMPAT_43
#endif /* COMPAT_43 */
#ifdef COMPAT_FREEBSD4
#endif /* COMPAT_FREEBSD4 */
#ifdef COMPAT_FREEBSD6
#endif /* COMPAT_FREEBSD6 */
#ifdef COMPAT_FREEBSD7
#endif /* COMPAT_FREEBSD7 */
#ifdef COMPAT_FREEBSD10
#endif /* COMPAT_FREEBSD10 */
#ifdef COMPAT_FREEBSD11
#endif /* COMPAT_FREEBSD11 */
#ifdef COMPAT_FREEBSD12
#endif /* COMPAT_FREEBSD12 */
#define CLOUDABI64_SYS_AUE_cloudabi_sys_clock_res_get AUE_NULL

View File

@ -60,7 +60,6 @@ struct semid_kernel32 {
};
#endif /* _KERNEL */
union semun32 {
int val;
uint32_t buf;

View File

@ -323,7 +323,6 @@ freebsd4_freebsd32_getfsstat(struct thread *td,
int
freebsd10_freebsd32_pipe(struct thread *td,
struct freebsd10_freebsd32_pipe_args *uap) {
return (freebsd10_pipe(td, (struct freebsd10_pipe_args*)uap));
}
#endif
@ -466,7 +465,6 @@ freebsd32_fexecve(struct thread *td, struct freebsd32_fexecve_args *uap)
return (error);
}
int
freebsd32_mknodat(struct thread *td, struct freebsd32_mknodat_args *uap)
{

View File

@ -976,7 +976,6 @@ int ofreebsd32_getdirentries(struct thread *, struct ofreebsd32_getdirentries_ar
#endif /* COMPAT_43 */
#ifdef COMPAT_FREEBSD4
#if !defined(PAD64_REQUIRED) && !defined(__amd64__)
@ -1042,7 +1041,6 @@ int freebsd4_freebsd32_sigreturn(struct thread *, struct freebsd4_freebsd32_sigr
#endif /* COMPAT_FREEBSD4 */
#ifdef COMPAT_FREEBSD6
#if !defined(PAD64_REQUIRED) && !defined(__amd64__)
@ -1132,7 +1130,6 @@ int freebsd6_freebsd32_lio_listio(struct thread *, struct freebsd6_freebsd32_lio
#endif /* COMPAT_FREEBSD6 */
#ifdef COMPAT_FREEBSD7
#if !defined(PAD64_REQUIRED) && !defined(__amd64__)
@ -1175,7 +1172,6 @@ int freebsd7_freebsd32_shmctl(struct thread *, struct freebsd7_freebsd32_shmctl_
#endif /* COMPAT_FREEBSD7 */
#ifdef COMPAT_FREEBSD10
#if !defined(PAD64_REQUIRED) && !defined(__amd64__)
@ -1200,7 +1196,6 @@ int freebsd10_freebsd32_pipe(struct thread *, struct freebsd10_freebsd32_pipe_ar
#endif /* COMPAT_FREEBSD10 */
#ifdef COMPAT_FREEBSD11
#if !defined(PAD64_REQUIRED) && !defined(__amd64__)
@ -1273,7 +1268,6 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta
#endif /* COMPAT_FREEBSD11 */
#ifdef COMPAT_FREEBSD12
#if !defined(PAD64_REQUIRED) && !defined(__amd64__)

View File

@ -88,7 +88,6 @@ struct ia32_ucontext {
u_int32_t __spare__[4];
};
#if defined(COMPAT_FREEBSD4)
struct ia32_mcontext4 {
u_int32_t mc_onstack; /* XXX - sigcontext compat. */

View File

@ -294,7 +294,6 @@ debugfs_remove_recursive(struct dentry *dnode)
pfs_destroy(dnode->d_pfs_node);
}
static int
debugfs_init(PFS_INIT_ARGS)
{

View File

@ -1041,7 +1041,6 @@ linprocfs_doprocstatus(PFS_FILL_ARGS)
return (0);
}
/*
* Filler function for proc/pid/cwd
*/

View File

@ -60,7 +60,6 @@ static eventhandler_tag linux_exec_tag;
static eventhandler_tag linux_thread_dtor_tag;
static eventhandler_tag linux_exit_tag;
static int
linux_common_modevent(module_t mod, int type, void *data)
{

View File

@ -221,7 +221,6 @@ static int eventfd_create(struct thread *td, uint32_t initval, int flags);
static void linux_timerfd_expire(void *);
static void linux_timerfd_curval(struct timerfd *, struct itimerspec *);
static void
epoll_fd_install(struct thread *td, int fd, epoll_udata_t udata)
{
@ -575,7 +574,6 @@ linux_epoll_wait_common(struct thread *td, int epfd, struct epoll_event *events,
thread_unlock(td);
}
coargs.leventlist = events;
coargs.p = td->td_proc;
coargs.count = 0;

View File

@ -539,7 +539,6 @@ linux_readdir(struct thread *td, struct linux_readdir_args *args)
}
#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
/*
* These exist mainly for hooks for doing /compat/linux translation.
*/

View File

@ -423,7 +423,6 @@ linux_thread_detach(struct thread *td)
child_clear_tid = em->child_clear_tid;
if (child_clear_tid != NULL) {
LINUX_CTR2(thread_detach, "thread(%d) %p",
em->em_tid, child_clear_tid);

View File

@ -999,7 +999,6 @@ linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args)
else
op_ret += futex_wake(f, nrwake, args->val3);
ret += op_ret;
}
if (f2 != NULL)
futex_put(f2, NULL);

View File

@ -713,7 +713,6 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
return (error);
switch (args->cmd & 0xffff) {
case LINUX_TCGETS:
error = fo_ioctl(fp, TIOCGETA, (caddr_t)&bios, td->td_ucred,
td);
@ -1455,7 +1454,6 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioctl_args *args)
if (error != 0)
return (error);
switch (args->cmd & 0xffff) {
case LINUX_CDROMPAUSE:
args->cmd = CDIOCPAUSE;
error = (sys_ioctl(td, (struct ioctl_args *)args));
@ -1723,7 +1721,6 @@ linux_ioctl_sound(struct thread *td, struct linux_ioctl_args *args)
{
switch (args->cmd & 0xffff) {
case LINUX_SOUND_MIXER_WRITE_VOLUME:
args->cmd = SETDIR(SOUND_MIXER_WRITE_VOLUME);
return (sys_ioctl(td, (struct ioctl_args *)args));
@ -1981,7 +1978,6 @@ linux_ioctl_sound(struct thread *td, struct linux_ioctl_args *args)
case LINUX_SNDCTL_SYNTH_MEMAVL:
args->cmd = SNDCTL_SYNTH_MEMAVL;
return (sys_ioctl(td, (struct ioctl_args *)args));
}
return (ENOIOCTL);
@ -2001,7 +1997,6 @@ linux_ioctl_console(struct thread *td, struct linux_ioctl_args *args)
if (error != 0)
return (error);
switch (args->cmd & 0xffff) {
case LINUX_KIOCSOUND:
args->cmd = KIOCSOUND;
error = (sys_ioctl(td, (struct ioctl_args *)args));
@ -2295,7 +2290,6 @@ linux_gifhwaddr(struct ifnet *ifp, struct l_ifreq *ifr)
return (copyout(&lsa, &ifr->ifr_hwaddr, sizeof(lsa)));
}
/*
* If we fault in bsd_to_linux_ifreq() then we will fault when we call
* the native ioctl(). Thus, we don't really need to check the return
@ -2351,7 +2345,6 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
}
switch (args->cmd & 0xffff) {
case LINUX_FIOGETOWN:
case LINUX_FIOSETOWN:
case LINUX_SIOCADDMULTI:
@ -2404,7 +2397,6 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
}
switch (args->cmd & 0xffff) {
case LINUX_FIOSETOWN:
args->cmd = FIOSETOWN;
error = sys_ioctl(td, (struct ioctl_args *)args);

View File

@ -832,7 +832,6 @@ linux_shmctl(struct thread *td, struct linux_shmctl_args *args)
memset(&linux_shminfo64, 0, sizeof(linux_shminfo64));
switch (args->cmd & ~LINUX_IPC_64) {
case LINUX_IPC_INFO: {
struct shminfo bsd_shminfo;

View File

@ -145,7 +145,6 @@ struct l_pselect6arg {
static int linux_utimensat_nsec_valid(l_long);
int
linux_sysinfo(struct thread *td, struct linux_sysinfo_args *args)
{
@ -641,7 +640,6 @@ struct l_times_argv {
l_clock_t tms_cstime;
};
/*
* Glibc versions prior to 2.2.1 always use hard-coded CLK_TCK value.
* Since 2.2.1 Glibc uses value exported from kernel via AT_CLKTCK
@ -1666,7 +1664,6 @@ linux_reboot(struct thread *td, struct linux_reboot_args *args)
return (sys_reboot(td, &bsd_args));
}
int
linux_getpid(struct thread *td, struct linux_getpid_args *args)
{
@ -1689,7 +1686,6 @@ linux_gettid(struct thread *td, struct linux_gettid_args *args)
return (0);
}
int
linux_getppid(struct thread *td, struct linux_getppid_args *args)
{

View File

@ -128,7 +128,6 @@ extern int stclohz;
#define LINUX_WCONTINUED 0x00000008
#define LINUX_WNOWAIT 0x01000000
#define __WNOTHREAD 0x20000000
#define __WALL 0x40000000
#define __WCLONE 0x80000000

View File

@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$");
#include <compat/linux/linux_persona.h>
#include <compat/linux/linux_util.h>
#define STACK_SIZE (2 * 1024 * 1024)
#define GUARD_SIZE (4 * PAGE_SIZE)

View File

@ -59,7 +59,6 @@ static int linux_do_tkill(struct thread *td, struct thread *tdt,
ksiginfo_t *ksi);
static void sicode_to_lsicode(int si_code, int *lsi_code);
static void
linux_to_bsd_sigaction(l_sigaction_t *lsa, struct sigaction *bsa)
{

View File

@ -88,7 +88,6 @@ static int linux_recvmsg_common(struct thread *, l_int, struct l_msghdr *,
l_uint, struct msghdr *);
static int linux_set_socket_flags(int, int *);
static int
linux_to_bsd_sockopt_level(int level)
{
@ -778,7 +777,6 @@ linux_socketpair(struct thread *td, struct linux_socketpair_args *args)
if (error != 0)
return (error);
if (args->protocol != 0 && args->protocol != PF_UNIX) {
/*
* Use of PF_UNIX as protocol argument is not right,
* but Linux does it.
@ -1020,7 +1018,6 @@ linux_sendmsg_common(struct thread *td, l_int s, struct l_msghdr *msghdr,
}
if (linux_msghdr.msg_controllen >= sizeof(struct l_cmsghdr)) {
error = ENOBUFS;
control = m_get(M_WAITOK, MT_CONTROL);
MCLGET(control, M_WAITOK);

View File

@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$");
#include <compat/linux/linux_util.h>
#include <compat/linux/linux_file.h>
static void
translate_vnhook_major_minor(struct vnode *vp, struct stat *sb)
{

View File

@ -122,7 +122,6 @@ LIN_SDT_PROBE_DEFINE1(time, linux_clock_nanosleep, unsupported_flags, "int");
LIN_SDT_PROBE_DEFINE1(time, linux_clock_nanosleep, unsupported_clockid, "int");
LIN_SDT_PROBE_DEFINE1(time, linux_clock_nanosleep, return, "int");
int
native_to_linux_timespec(struct l_timespec *ltp, struct timespec *ntp)
{

View File

@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$");
#endif
#include <compat/linux/linux_timer.h>
static int
linux_convert_l_sigevent(struct l_sigevent *l_sig, struct sigevent *sig)
{

View File

@ -65,7 +65,6 @@ static int __elfN(symstrindex);
static void
__elfN(linux_vdso_lookup)(Elf_Ehdr *, struct linux_vdso_sym *);
void
__elfN(linux_vdso_sym_init)(struct linux_vdso_sym *s)
{

View File

@ -34,7 +34,6 @@
#include <linux/compiler.h>
#include <sys/types.h>
#include <machine/atomic.h>
#define ATOMIC_LONG_INIT(x) { .counter = (x) }
typedef struct {

View File

@ -35,7 +35,6 @@
#include <linux/compiler.h>
#include <sys/types.h>
#include <machine/atomic.h>
#define ATOMIC_INIT(x) { .counter = (x) }
typedef struct {

View File

@ -35,7 +35,6 @@
typedef struct {
volatile int64_t counter;
} atomic64_t;
#define ATOMIC64_INIT(x) { .counter = (x) }
/*------------------------------------------------------------------------*

View File

@ -41,7 +41,6 @@ struct task_struct;
extern int linux_alloc_current(struct thread *, int flags);
extern void linux_free_current(struct task_struct *);
static inline void
linux_set_current(struct thread *td)
{

View File

@ -45,7 +45,6 @@
struct dma_attrs {
unsigned long flags;
};
#define DEFINE_DMA_ATTRS(x) struct dma_attrs x = { }
static inline void

View File

@ -276,7 +276,6 @@ static inline unsigned int dma_set_max_seg_size(struct device *dev,
return (0);
}
#define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, NULL)
#define dma_unmap_single(d, a, s, r) dma_unmap_single_attrs(d, a, s, r, NULL)
#define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, NULL)

View File

@ -82,5 +82,4 @@ dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t dma_addr)
linux_dma_pool_free(pool, vaddr, dma_addr);
}
#endif /* _LINUX_DMAPOOL_H_ */

View File

@ -64,7 +64,6 @@ struct linux_cdev;
#define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH)
#define S_IWUGO (S_IWUSR | S_IWGRP | S_IWOTH)
typedef struct files_struct *fl_owner_t;
struct file_operations;

View File

@ -43,7 +43,6 @@
* XXX This is all x86 specific. It should be bus space access.
*/
/* rmb and wmb are declared in machine/atomic.h, so should be included first. */
#ifndef __io_br
#define __io_br() __compiler_membar()

View File

@ -116,7 +116,6 @@ static inline u32 jhash2(const u32 *k, u32 length, u32 initval)
return c;
}
/* A special ultra-optimized versions that knows they are hashing exactly
* 3, 2 or 1 word(s).
*

View File

@ -48,5 +48,4 @@
#define request_module_nowait request_module
#endif /* _LINUX_KMOD_H_ */

View File

@ -91,7 +91,6 @@ kref_put_lock(struct kref *kref, void (*rel)(struct kref *kref),
return (0);
}
static inline int
kref_sub(struct kref *kref, unsigned int count,
void (*rel)(struct kref *kref))

View File

@ -73,7 +73,6 @@
#ifndef prefetch
#define prefetch(x)
#endif
#define LINUX_LIST_HEAD_INIT(name) { &(name), &(name) }
#define LINUX_LIST_HEAD(name) \
@ -324,7 +323,6 @@ list_splice_tail_init(struct list_head *list, struct list_head *head)
#undef LIST_HEAD
#define LIST_HEAD(name) struct list_head name = { &(name), &(name) }
struct hlist_head {
struct hlist_node *first;
};
@ -332,7 +330,6 @@ struct hlist_head {
struct hlist_node {
struct hlist_node *next, **pprev;
};
#define HLIST_HEAD_INIT { }
#define HLIST_HEAD(name) struct hlist_head name = HLIST_HEAD_INIT
#define INIT_HLIST_HEAD(head) (head)->first = NULL

View File

@ -496,7 +496,6 @@ static inline int pci_pcie_cap(struct pci_dev *dev)
return pci_find_capability(dev, PCI_CAP_ID_EXP);
}
static inline int
pci_read_config_byte(struct pci_dev *pdev, int where, u8 *val)
{
@ -706,7 +705,6 @@ pci_iounmap(struct pci_dev *dev, void *res)
#define DEFINE_PCI_DEVICE_TABLE(_table) \
const struct pci_device_id _table[] __devinitdata
/* XXX This should not be necessary. */
#define pcix_set_mmrbc(d, v) 0
#define pcix_get_max_mmrbc(d) 0
@ -773,7 +771,6 @@ enum pci_ers_result {
PCI_ERS_RESULT_RECOVERED = 5,
};
/* PCI bus error event callbacks */
struct pci_error_handlers {
pci_ers_result_t (*error_detected)(struct pci_dev *dev,
@ -809,7 +806,6 @@ static inline u16 pcie_flags_reg(struct pci_dev *dev)
return reg16;
}
static inline int pci_pcie_type(struct pci_dev *dev)
{
return (pcie_flags_reg(dev) & PCI_EXP_FLAGS_TYPE) >> 4;

View File

@ -479,5 +479,4 @@ sg_page_iter_page(struct sg_page_iter *piter)
return (nth_page(sg_page(piter->sg), piter->sg_pgoffset));
}
#endif /* _LINUX_SCATTERLIST_H_ */

View File

@ -57,7 +57,6 @@ struct attribute_group {
#define __ATTR_RO(_name) __ATTR(_name, 0444, _name##_show, NULL)
#define __ATTR_WO(_name) __ATTR(_name, 0200, NULL, _name##_store)
#define __ATTR_RW(_name) __ATTR(_name, 0644, _name##_show, _name##_store)
#define __ATTR_NULL { .attr = { .name = NULL } }
#define ATTRIBUTE_GROUPS(_name) \

View File

@ -110,5 +110,4 @@ static inline int ipv6_addr_cmp(const struct in6_addr *a1, const struct in6_addr
return memcmp(a1, a2, sizeof(struct in6_addr));
}
#endif /* _LINUX_NET_IPV6_H_ */

View File

@ -206,7 +206,6 @@ kobject_add_complete(struct kobject *kobj, struct kobject *parent)
}
if (error)
sysfs_remove_dir(kobj);
}
return (error);
}
@ -1012,7 +1011,6 @@ linux_poll_wakeup_state(atomic_t *v, const uint8_t *pstate)
return (c);
}
static int
linux_poll_wakeup_callback(wait_queue_t *wq, unsigned int wq_state, int flags, void *key)
{
@ -1835,7 +1833,6 @@ iounmap(void *addr)
kfree(vmmap);
}
void *
vmap(struct page **pages, unsigned int count, unsigned long flags, int prot)
{

View File

@ -120,4 +120,3 @@ linux_hrtimer_forward_now(struct hrtimer *hrtimer, ktime_t interval)
nstosbt(hrtimer->precision), hrtimer_call_handler, hrtimer, 0);
mtx_unlock(&hrtimer->mtx);
}

View File

@ -269,7 +269,6 @@ idr_remove(struct idr *idr, int id)
return (res);
}
static inline struct idr_layer *
idr_find_layer_locked(struct idr *idr, int id)
{

View File

@ -32,4 +32,3 @@ __FBSDID("$FreeBSD$");
MODULE_VERSION(linuxkpi, 1);
MODULE_DEPEND(linuxkpi, pci, 1, 1, 1);

View File

@ -588,7 +588,6 @@ linux_dma_trie_free(struct pctrie *ptree, void *node)
uma_zfree(linux_dma_trie_zone, node);
}
PCTRIE_DEFINE(LINUX_DMA, linux_dma_obj, dma_addr, linux_dma_trie_alloc,
linux_dma_trie_free);

View File

@ -206,7 +206,6 @@ radix_tree_insert(struct radix_tree_root *root, unsigned long index, void *item)
/* expand radix tree as needed */
while (radix_max(root) < index) {
/* check if the radix tree is getting too big */
if (root->height == RADIX_TREE_MAX_HEIGHT) {
radix_tree_clean_root_node(root);
@ -311,7 +310,6 @@ radix_tree_store(struct radix_tree_root *root, unsigned long index, void **ppite
/* expand radix tree as needed */
while (radix_max(root) < index) {
/* check if the radix tree is getting too big */
if (root->height == RADIX_TREE_MAX_HEIGHT) {
radix_tree_clean_root_node(root);

View File

@ -167,7 +167,6 @@ linux_rcu_cleaner_func(void *context, int pending __unused)
/* dispatch all callbacks, if any */
while ((rcu = STAILQ_FIRST(&tmp_head)) != NULL) {
STAILQ_REMOVE_HEAD(&tmp_head, entry);
offset = (uintptr_t)rcu->func;

View File

@ -130,7 +130,6 @@ single_open(struct linux_file *f, int (*show)(struct seq_file *, void *), void *
free(op, M_LSEQ);
else
((struct seq_file *)f->private_data)->private = d;
}
return (rc);
}

View File

@ -147,7 +147,6 @@ usb_linux_lookup_id(const struct usb_device_id *id, struct usb_attach_arg *uaa)
* array:
*/
for (; id->match_flags; id++) {
if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) &&
(id->idVendor != uaa->info.idVendor)) {
continue;
@ -513,7 +512,6 @@ usb_unlink_urb_sub(struct urb *urb, uint8_t drain)
uhe = urb->endpoint;
if (urb->bsd_urb_list.tqe_prev) {
/* not started yet, just remove it from the queue */
TAILQ_REMOVE(&uhe->bsd_urb_list, urb, bsd_urb_list);
urb->bsd_urb_list.tqe_prev = NULL;
@ -528,7 +526,6 @@ usb_unlink_urb_sub(struct urb *urb, uint8_t drain)
(urb->complete) (urb);
}
} else {
/*
* If the URB is not on the URB list, then check if one of
* the FreeBSD USB transfer are processing the current URB.
@ -794,7 +791,6 @@ usb_setup_endpoint(struct usb_device *dev,
memset(cfg, 0, sizeof(cfg));
if (type == UE_ISOCHRONOUS) {
/*
* Isochronous transfers are special in that they don't fit
* into the BULK/INTR/CONTROL transfer model.
@ -881,7 +877,6 @@ usb_linux_create_usb_device(struct usb_device *udev, device_t dev)
* and one pass to initialize all the allocated memory structures.
*/
for (pass = 0; pass < 2; pass++) {
iface_no_curr = 0xFFFF;
niface_total = 0;
iface_index = 0;
@ -893,7 +888,6 @@ usb_linux_create_usb_device(struct usb_device *udev, device_t dev)
* descriptor pointer provided by the FreeBSD USB stack.
*/
while ((desc = usb_desc_foreach(cd, desc))) {
/*
* Build up a tree according to the descriptors we
* find:
@ -957,7 +951,6 @@ usb_linux_create_usb_device(struct usb_device *udev, device_t dev)
}
if (pass == 0) {
size = (sizeof(*p_uhe) * nedesc) +
(sizeof(*p_ui) * iface_index) +
(sizeof(*p_uhi) * niface_total);
@ -1357,7 +1350,6 @@ usb_linux_isoc_callback(struct usb_xfer *xfer, usb_error_t error)
case USB_ST_TRANSFERRED:
if (urb->bsd_isread) {
/* copy in data with regard to the URB */
offset = 0;
@ -1413,7 +1405,6 @@ usb_linux_isoc_callback(struct usb_xfer *xfer, usb_error_t error)
tr_setup:
if (xfer->priv_fifo == NULL) {
/* get next transfer */
urb = TAILQ_FIRST(&uhe->bsd_urb_list);
if (urb == NULL) {
@ -1442,7 +1433,6 @@ usb_linux_isoc_callback(struct usb_xfer *xfer, usb_error_t error)
usbd_xfer_set_frame_data(xfer, 0, urb->transfer_buffer, 0);
}
if (!(urb->bsd_isread)) {
/* copy out data with regard to the URB */
offset = 0;
@ -1458,7 +1448,6 @@ usb_linux_isoc_callback(struct usb_xfer *xfer, usb_error_t error)
offset += uipd->length;
}
} else {
/*
* compute the transfer length into the "offset"
* variable
@ -1504,7 +1493,6 @@ usb_linux_isoc_callback(struct usb_xfer *xfer, usb_error_t error)
return;
}
goto tr_setup;
}
}
@ -1535,7 +1523,6 @@ usb_linux_non_isoc_callback(struct usb_xfer *xfer, usb_error_t error)
case USB_ST_TRANSFERRED:
if (xfer->flags_int.control_xfr) {
/* don't transfer the setup packet again: */
usbd_xfer_set_frame_len(xfer, 0, 0);
@ -1587,7 +1574,6 @@ usb_linux_non_isoc_callback(struct usb_xfer *xfer, usb_error_t error)
xfer->timeout = urb->timeout;
if (xfer->flags_int.control_xfr) {
/*
* USB control transfers need special handling.
* First copy in the header, then copy in data!
@ -1609,7 +1595,6 @@ usb_linux_non_isoc_callback(struct usb_xfer *xfer, usb_error_t error)
urb->bsd_length_rem = ptr[6] | (ptr[7] << 8);
} else {
/* setup data transfer direction */
urb->bsd_length_rem = urb->transfer_buffer_length;

View File

@ -102,7 +102,6 @@ static image_patch_table kernndis_functbl[] = {
IMPORT_SFUNC(ndis_sendrsrcavail_func, 1),
IMPORT_SFUNC(ndis_intrsetup, 4),
IMPORT_SFUNC(ndis_return, 1),
{ NULL, NULL, NULL }
};
@ -590,7 +589,6 @@ ndis_convert_res(arg)
brl = BUS_GET_RESOURCE_LIST(dev, dev);
if (brl != NULL) {
STAILQ_FOREACH(brle, brl, link) {
switch (brle->type) {
case SYS_RES_IOPORT:

View File

@ -798,7 +798,6 @@ _x86_64_call6(void *fn, uint64_t a, uint64_t b, uint64_t c, uint64_t d,
}
#endif /* __amd64__ */
#ifdef __i386__
struct x86desc {

View File

@ -294,7 +294,6 @@ typedef uint8_t ndis_kirql;
#define NDIS_PNP_EVENT_STOPPED 4
#define NDIS_PNP_EVENT_PROFILECHANGED 5
/* PnP/PM Statistics (Optional). */
#define OID_PNP_WAKE_UP_OK 0xFD020200
#define OID_PNP_WAKE_UP_ERROR 0xFD020201
@ -674,7 +673,6 @@ typedef struct ndis_80211_enc_indication ndis_80211_enc_indication;
#define OID_TCP_TASK_IPSEC_DELETE_SA 0xFC010203
#define OID_TCP_SAN_SUPPORT 0xFC010204
#define NDIS_TASK_OFFLOAD_VERSION 1
#define NDIS_TASK_TCPIP_CSUM 0x00000000
@ -812,7 +810,6 @@ typedef enum ndis_media_state ndis_media_state;
#define NDIS_PACKET_TYPE_FUNCTIONAL 0x00004000
#define NDIS_PACKET_TYPE_MAC_FRAME 0x00008000
/* Ndis MAC option bits (OID_GEN_MAC_OPTIONS). */
#define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 0x00000001
@ -1425,7 +1422,6 @@ struct ndis_map_arg {
*/
struct ndis_miniport_characteristics {
/* NDIS 3.0 */
uint8_t nmc_version_major;

View File

@ -906,7 +906,6 @@ typedef struct devobj_extension devobj_extension;
#define IOCTL_CODE(dev, func, iomethod, acc) \
((dev) << 16) | (acc << 14) | (func << 2) | (iomethod))
struct io_status_block {
union {
uint32_t isb_status;

View File

@ -164,7 +164,6 @@ typedef struct image_data_directory image_data_directory;
*/
struct image_optional_header {
/* Standard fields */
uint16_t ioh_magic;
@ -503,7 +502,6 @@ extern uint32_t x86_stdcall_call(void *, int, ...);
#endif /* __i386__ */
#define FUNC void(*)(void)
#ifdef __i386__

View File

@ -478,6 +478,5 @@ image_patch_table hal_functbl[] = {
{ NULL, (FUNC)dummy, NULL, 0, WINDRV_WRAP_STDCALL },
/* End of list. */
{ NULL, NULL, NULL }
};

View File

@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$");
* expects.
*/
#include <sys/ctype.h>
#include <sys/param.h>
#include <sys/types.h>
@ -1731,7 +1730,6 @@ NdisAllocatePacketPool(status, pool, descnum, protrsvdlen)
packets = ExAllocatePoolWithTag(NonPagedPool, p->np_cnt *
p->np_len, 0);
if (packets == NULL) {
ExFreePool(p);
*status = NDIS_STATUS_RESOURCES;
@ -1844,7 +1842,6 @@ NdisAllocatePacket(status, packet, pool)
return;
}
bzero((char *)pkt, sizeof(ndis_packet));
/* Save pointer to the pool. */
@ -3371,6 +3368,5 @@ image_patch_table ndis_functbl[] = {
{ NULL, (FUNC)dummy, NULL, 0, WINDRV_WRAP_STDCALL },
/* End of list. */
{ NULL, NULL, NULL }
};

View File

@ -742,7 +742,6 @@ IoGetDriverObjectExtension(drv, clid)
return (NULL);
}
uint32_t
IoCreateDevice(driver_object *drv, uint32_t devextlen, unicode_string *devname,
uint32_t devtype, uint32_t devchars, uint8_t exclusive,
@ -1599,7 +1598,6 @@ KeTickCount(void)
return tvtohz(&tv);
}
/*
* KeWaitForSingleObject() is a tricky beast, because it can be used
* with several different object types: semaphores, timers, events,
@ -1948,7 +1946,6 @@ KeWaitForMultipleObjects(uint32_t cnt, nt_dispatch_header *obj[], uint32_t wtype
}
}
wait_done:
cv_destroy(&we.we_cv);
@ -1956,7 +1953,6 @@ KeWaitForMultipleObjects(uint32_t cnt, nt_dispatch_header *obj[], uint32_t wtype
for (i = 0; i < cnt; i++) {
if (whead[i].wb_object != NULL)
RemoveEntryList(&whead[i].wb_waitlist);
}
mtx_unlock(&ntoskrnl_dispatchlock);
@ -2659,7 +2655,6 @@ MmUnmapIoSpace(vaddr, len)
{
}
static device_t
ntoskrnl_finddev(dev, paddr, res)
device_t dev;
@ -2717,7 +2712,6 @@ ntoskrnl_finddev(dev, paddr, res)
}
}
/* Won't somebody please think of the children! */
if (children != NULL)
@ -2969,7 +2963,6 @@ ExQueueWorkItem(w, qtype)
io_workitem *cur;
uint8_t irql;
/*
* We need to do a special sanity test to make sure
* the ExQueueWorkItem() API isn't used to queue
@ -4250,7 +4243,6 @@ dummy()
printf("ntoskrnl dummy called...\n");
}
image_patch_table ntoskrnl_functbl[] = {
IMPORT_SFUNC(RtlZeroMemory, 2),
IMPORT_SFUNC(RtlSecureZeroMemory, 2),
@ -4450,6 +4442,5 @@ image_patch_table ntoskrnl_functbl[] = {
{ NULL, (FUNC)dummy, NULL, 0, WINDRV_WRAP_STDCALL },
/* End of list. */
{ NULL, NULL, NULL }
};

View File

@ -1455,7 +1455,6 @@ image_patch_table usbd_functbl[] = {
{ NULL, (FUNC)dummy, NULL, 0, WINDRV_WRAP_STDCALL },
/* End of list. */
{ NULL, NULL, NULL }
};