diff options
Diffstat (limited to 'sys/compat/linuxkpi/common')
26 files changed, 1 insertions, 49 deletions
diff --git a/sys/compat/linuxkpi/common/include/asm/atomic-long.h b/sys/compat/linuxkpi/common/include/asm/atomic-long.h index e2bea06c09531..c80c348f95f9c 100644 --- a/sys/compat/linuxkpi/common/include/asm/atomic-long.h +++ b/sys/compat/linuxkpi/common/include/asm/atomic-long.h @@ -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 { diff --git a/sys/compat/linuxkpi/common/include/asm/atomic.h b/sys/compat/linuxkpi/common/include/asm/atomic.h index fff06f61d856a..5cdfbe674ef3a 100644 --- a/sys/compat/linuxkpi/common/include/asm/atomic.h +++ b/sys/compat/linuxkpi/common/include/asm/atomic.h @@ -35,7 +35,6 @@ #include <linux/compiler.h> #include <sys/types.h> #include <machine/atomic.h> - #define ATOMIC_INIT(x) { .counter = (x) } typedef struct { diff --git a/sys/compat/linuxkpi/common/include/asm/atomic64.h b/sys/compat/linuxkpi/common/include/asm/atomic64.h index c60117b5cb8c6..b8b87bb2c6856 100644 --- a/sys/compat/linuxkpi/common/include/asm/atomic64.h +++ b/sys/compat/linuxkpi/common/include/asm/atomic64.h @@ -35,7 +35,6 @@ typedef struct { volatile int64_t counter; } atomic64_t; - #define ATOMIC64_INIT(x) { .counter = (x) } /*------------------------------------------------------------------------* diff --git a/sys/compat/linuxkpi/common/include/linux/compat.h b/sys/compat/linuxkpi/common/include/linux/compat.h index e9b2e4dfd1a74..03b7dc60b7a1c 100644 --- a/sys/compat/linuxkpi/common/include/linux/compat.h +++ b/sys/compat/linuxkpi/common/include/linux/compat.h @@ -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) { diff --git a/sys/compat/linuxkpi/common/include/linux/dma-attrs.h b/sys/compat/linuxkpi/common/include/linux/dma-attrs.h index 5cb75e06cd382..d424d16164a6a 100644 --- a/sys/compat/linuxkpi/common/include/linux/dma-attrs.h +++ b/sys/compat/linuxkpi/common/include/linux/dma-attrs.h @@ -45,7 +45,6 @@ struct dma_attrs { unsigned long flags; }; - #define DEFINE_DMA_ATTRS(x) struct dma_attrs x = { } static inline void diff --git a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h index 291bd4a8e7cef..d074b563cd415 100644 --- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h @@ -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) diff --git a/sys/compat/linuxkpi/common/include/linux/dmapool.h b/sys/compat/linuxkpi/common/include/linux/dmapool.h index 80d74f1537477..980d5d74884f8 100644 --- a/sys/compat/linuxkpi/common/include/linux/dmapool.h +++ b/sys/compat/linuxkpi/common/include/linux/dmapool.h @@ -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_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/fs.h b/sys/compat/linuxkpi/common/include/linux/fs.h index f400fc7cbfda7..66a1607b99e23 100644 --- a/sys/compat/linuxkpi/common/include/linux/fs.h +++ b/sys/compat/linuxkpi/common/include/linux/fs.h @@ -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; diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h index 754bc4303ded3..0104eea90ace5 100644 --- a/sys/compat/linuxkpi/common/include/linux/io.h +++ b/sys/compat/linuxkpi/common/include/linux/io.h @@ -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() diff --git a/sys/compat/linuxkpi/common/include/linux/jhash.h b/sys/compat/linuxkpi/common/include/linux/jhash.h index c3904e276778e..08300083212f4 100644 --- a/sys/compat/linuxkpi/common/include/linux/jhash.h +++ b/sys/compat/linuxkpi/common/include/linux/jhash.h @@ -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). * diff --git a/sys/compat/linuxkpi/common/include/linux/kmod.h b/sys/compat/linuxkpi/common/include/linux/kmod.h index 3fd42fab584c7..b8a1a8b677ede 100644 --- a/sys/compat/linuxkpi/common/include/linux/kmod.h +++ b/sys/compat/linuxkpi/common/include/linux/kmod.h @@ -48,5 +48,4 @@ #define request_module_nowait request_module - #endif /* _LINUX_KMOD_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/kref.h b/sys/compat/linuxkpi/common/include/linux/kref.h index cfc5c0231e231..d5b45ba593134 100644 --- a/sys/compat/linuxkpi/common/include/linux/kref.h +++ b/sys/compat/linuxkpi/common/include/linux/kref.h @@ -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)) diff --git a/sys/compat/linuxkpi/common/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h index c16007eab1437..8135aec85c22a 100644 --- a/sys/compat/linuxkpi/common/include/linux/list.h +++ b/sys/compat/linuxkpi/common/include/linux/list.h @@ -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 diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 2c23f2a42a123..643bc7cc2630d 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -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; diff --git a/sys/compat/linuxkpi/common/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h index a23edfb0b4def..505c3009441cc 100644 --- a/sys/compat/linuxkpi/common/include/linux/scatterlist.h +++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h @@ -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_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h index 59e30f152f6ec..c645d9fdf45af 100644 --- a/sys/compat/linuxkpi/common/include/linux/sysfs.h +++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h @@ -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) \ diff --git a/sys/compat/linuxkpi/common/include/net/ipv6.h b/sys/compat/linuxkpi/common/include/net/ipv6.h index feabd7360280a..3eb6051035afc 100644 --- a/sys/compat/linuxkpi/common/include/net/ipv6.h +++ b/sys/compat/linuxkpi/common/include/net/ipv6.h @@ -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_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index b3c2475b223fb..dc87897415327 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -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) { @@ -2002,7 +1999,7 @@ linux_timer_init(void *arg) linux_timer_hz_mask--; /* compute some internal constants */ - + lkpi_nsec2hz_rem = hz; lkpi_usec2hz_rem = hz; lkpi_msec2hz_rem = hz; diff --git a/sys/compat/linuxkpi/common/src/linux_hrtimer.c b/sys/compat/linuxkpi/common/src/linux_hrtimer.c index efd91bfdaed5e..a56485512a14d 100644 --- a/sys/compat/linuxkpi/common/src/linux_hrtimer.c +++ b/sys/compat/linuxkpi/common/src/linux_hrtimer.c @@ -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); } - diff --git a/sys/compat/linuxkpi/common/src/linux_idr.c b/sys/compat/linuxkpi/common/src/linux_idr.c index 773ebd3b84102..b5007a89966b0 100644 --- a/sys/compat/linuxkpi/common/src/linux_idr.c +++ b/sys/compat/linuxkpi/common/src/linux_idr.c @@ -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) { diff --git a/sys/compat/linuxkpi/common/src/linux_kmod.c b/sys/compat/linuxkpi/common/src/linux_kmod.c index efe16fbb1aa9c..4e395ae5e1b21 100644 --- a/sys/compat/linuxkpi/common/src/linux_kmod.c +++ b/sys/compat/linuxkpi/common/src/linux_kmod.c @@ -32,4 +32,3 @@ __FBSDID("$FreeBSD$"); MODULE_VERSION(linuxkpi, 1); MODULE_DEPEND(linuxkpi, pci, 1, 1, 1); - diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index d3b64e07b9800..ed04d47c462a8 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -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); diff --git a/sys/compat/linuxkpi/common/src/linux_radix.c b/sys/compat/linuxkpi/common/src/linux_radix.c index 17c7b4bb48e78..abf217de7f98b 100644 --- a/sys/compat/linuxkpi/common/src/linux_radix.c +++ b/sys/compat/linuxkpi/common/src/linux_radix.c @@ -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); diff --git a/sys/compat/linuxkpi/common/src/linux_rcu.c b/sys/compat/linuxkpi/common/src/linux_rcu.c index 5e698739ab09d..86ec193aa4e4f 100644 --- a/sys/compat/linuxkpi/common/src/linux_rcu.c +++ b/sys/compat/linuxkpi/common/src/linux_rcu.c @@ -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; diff --git a/sys/compat/linuxkpi/common/src/linux_seq_file.c b/sys/compat/linuxkpi/common/src/linux_seq_file.c index b9eb15cdb47e6..6f4f1a368c4a9 100644 --- a/sys/compat/linuxkpi/common/src/linux_seq_file.c +++ b/sys/compat/linuxkpi/common/src/linux_seq_file.c @@ -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); } diff --git a/sys/compat/linuxkpi/common/src/linux_usb.c b/sys/compat/linuxkpi/common/src/linux_usb.c index abef31e20a071..e35cca5216b6b 100644 --- a/sys/compat/linuxkpi/common/src/linux_usb.c +++ b/sys/compat/linuxkpi/common/src/linux_usb.c @@ -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 @@ tr_setup: 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 @@ tr_setup: offset += uipd->length; } } else { - /* * compute the transfer length into the "offset" * variable @@ -1504,7 +1493,6 @@ tr_setup: 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 @@ tr_setup: 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 @@ tr_setup: urb->bsd_length_rem = ptr[6] | (ptr[7] << 8); } else { - /* setup data transfer direction */ urb->bsd_length_rem = urb->transfer_buffer_length; |