Date: Fri, 30 Mar 2018 02:04:46 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331756 - in stable/11/sys/compat/linuxkpi/common: include/asm include/linux include/net src Message-ID: <201803300204.w2U24k6v079999@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Fri Mar 30 02:04:46 2018 New Revision: 331756 URL: https://svnweb.freebsd.org/changeset/base/331756 Log: MFC r331433: linuxkpi whitespace cleanup Modified: stable/11/sys/compat/linuxkpi/common/include/asm/byteorder.h stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h stable/11/sys/compat/linuxkpi/common/include/linux/cdev.h stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h stable/11/sys/compat/linuxkpi/common/include/linux/device.h stable/11/sys/compat/linuxkpi/common/include/linux/dma-attrs.h stable/11/sys/compat/linuxkpi/common/include/linux/dma-mapping.h stable/11/sys/compat/linuxkpi/common/include/linux/err.h stable/11/sys/compat/linuxkpi/common/include/linux/errno.h stable/11/sys/compat/linuxkpi/common/include/linux/etherdevice.h stable/11/sys/compat/linuxkpi/common/include/linux/fs.h stable/11/sys/compat/linuxkpi/common/include/linux/idr.h stable/11/sys/compat/linuxkpi/common/include/linux/if_ether.h stable/11/sys/compat/linuxkpi/common/include/linux/if_vlan.h stable/11/sys/compat/linuxkpi/common/include/linux/io.h stable/11/sys/compat/linuxkpi/common/include/linux/jiffies.h stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h stable/11/sys/compat/linuxkpi/common/include/linux/kmod.h stable/11/sys/compat/linuxkpi/common/include/linux/kobject.h stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h stable/11/sys/compat/linuxkpi/common/include/linux/list.h stable/11/sys/compat/linuxkpi/common/include/linux/log2.h stable/11/sys/compat/linuxkpi/common/include/linux/miscdevice.h stable/11/sys/compat/linuxkpi/common/include/linux/mutex.h stable/11/sys/compat/linuxkpi/common/include/linux/pci.h stable/11/sys/compat/linuxkpi/common/include/linux/rwlock.h stable/11/sys/compat/linuxkpi/common/include/linux/rwsem.h stable/11/sys/compat/linuxkpi/common/include/linux/slab.h stable/11/sys/compat/linuxkpi/common/include/linux/spinlock.h stable/11/sys/compat/linuxkpi/common/include/linux/sysfs.h stable/11/sys/compat/linuxkpi/common/include/linux/usb.h stable/11/sys/compat/linuxkpi/common/include/linux/workqueue.h stable/11/sys/compat/linuxkpi/common/include/net/if_inet6.h stable/11/sys/compat/linuxkpi/common/include/net/ipv6.h stable/11/sys/compat/linuxkpi/common/include/net/netevent.h stable/11/sys/compat/linuxkpi/common/src/linux_compat.c stable/11/sys/compat/linuxkpi/common/src/linux_idr.c stable/11/sys/compat/linuxkpi/common/src/linux_radix.c stable/11/sys/compat/linuxkpi/common/src/linux_usb.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/asm/byteorder.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/asm/byteorder.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/asm/byteorder.h Fri Mar 30 02:04:46 2018 (r331756) @@ -87,7 +87,7 @@ static inline void be16_add_cpu(uint16_t *var, uint16_t val) -{ +{ *var = cpu_to_be16(be16_to_cpu(*var) + val); } Modified: stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Fri Mar 30 02:04:46 2018 (r331756) @@ -54,7 +54,7 @@ #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) #define GENMASK(h, l) (((~0UL) >> (BITS_PER_LONG - (h) - 1)) & ((~0UL) << (l))) #define GENMASK_ULL(h, l) (((~0ULL) >> (BITS_PER_LONG_LONG - (h) - 1)) & ((~0ULL) << (l))) -#define BITS_PER_BYTE 8 +#define BITS_PER_BYTE 8 #define hweight8(x) bitcount((uint8_t)(x)) #define hweight16(x) bitcount16(x) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/cdev.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/cdev.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/cdev.h Fri Mar 30 02:04:46 2018 (r331756) @@ -112,7 +112,7 @@ cdev_add_ext(struct linux_cdev *cdev, dev_t dev, uid_t int error; cdev->dev = dev; - + /* Setup arguments for make_dev_s() */ make_dev_args_init(&args); args.mda_devsw = &linuxcdevsw; Modified: stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h Fri Mar 30 02:04:46 2018 (r331756) @@ -84,7 +84,7 @@ #define __PASTE(a,b) ___PASTE(a,b) #define ACCESS_ONCE(x) (*(volatile __typeof(x) *)&(x)) - + #define WRITE_ONCE(x,v) do { \ barrier(); \ ACCESS_ONCE(x) = (v); \ Modified: stable/11/sys/compat/linuxkpi/common/include/linux/device.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/device.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/device.h Fri Mar 30 02:04:46 2018 (r331756) @@ -124,10 +124,10 @@ extern const struct kobj_type linux_dev_ktype; extern const struct kobj_type linux_class_ktype; struct class_attribute { - struct attribute attr; - ssize_t (*show)(struct class *, struct class_attribute *, char *); - ssize_t (*store)(struct class *, struct class_attribute *, const char *, size_t); - const void *(*namespace)(struct class *, const struct class_attribute *); + struct attribute attr; + ssize_t (*show)(struct class *, struct class_attribute *, char *); + ssize_t (*store)(struct class *, struct class_attribute *, const char *, size_t); + const void *(*namespace)(struct class *, const struct class_attribute *); }; #define CLASS_ATTR(_name, _mode, _show, _store) \ @@ -223,7 +223,7 @@ static inline char * dev_name(const struct device *dev) { - return kobject_name(&dev->kobj); + return kobject_name(&dev->kobj); } #define dev_set_name(_dev, _fmt, ...) \ @@ -533,7 +533,7 @@ class_remove_file(struct class *class, const struct cl static inline int dev_to_node(struct device *dev) { - return -1; + return -1; } char *kvasprintf(gfp_t, const char *, va_list); Modified: stable/11/sys/compat/linuxkpi/common/include/linux/dma-attrs.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/dma-attrs.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/dma-attrs.h Fri Mar 30 02:04:46 2018 (r331756) @@ -38,7 +38,7 @@ enum dma_attr { DMA_ATTR_WRITE_BARRIER, DMA_ATTR_WEAK_ struct dma_attrs { unsigned long flags; }; - + #define DEFINE_DMA_ATTRS(x) struct dma_attrs x = { } static inline void Modified: stable/11/sys/compat/linuxkpi/common/include/linux/dma-mapping.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Fri Mar 30 02:04:46 2018 (r331756) @@ -97,7 +97,7 @@ dma_supported(struct device *dev, u64 mask) /* XXX busdma takes care of this elsewhere. */ return (1); } - + static inline int dma_set_mask(struct device *dev, u64 dma_mask) { @@ -150,7 +150,7 @@ dma_zalloc_coherent(struct device *dev, size_t size, d return (dma_alloc_coherent(dev, size, dma_handle, flag | __GFP_ZERO)); } - + static inline void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t dma_handle) @@ -180,7 +180,7 @@ dma_map_sg_attrs(struct device *dev, struct scatterlis { struct scatterlist *sg; int i; - + for_each_sg(sgl, sg, nents, i) sg_dma_address(sg) = sg_phys(sg); @@ -192,7 +192,7 @@ dma_unmap_sg_attrs(struct device *dev, struct scatterl enum dma_data_direction dir, struct dma_attrs *attrs) { } - + static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction direction) @@ -258,9 +258,9 @@ dma_mapping_error(struct device *dev, dma_addr_t dma_a } static inline unsigned int dma_set_max_seg_size(struct device *dev, - unsigned int size) + unsigned int size) { - return (0); + return (0); } Modified: stable/11/sys/compat/linuxkpi/common/include/linux/err.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/err.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/err.h Fri Mar 30 02:04:46 2018 (r331756) @@ -70,10 +70,10 @@ ERR_CAST(void *ptr) static inline int PTR_ERR_OR_ZERO(const void *ptr) { - if (IS_ERR(ptr)) - return PTR_ERR(ptr); - else - return 0; + if (IS_ERR(ptr)) + return PTR_ERR(ptr); + else + return 0; } #define PTR_RET(p) PTR_ERR_OR_ZERO(p) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/errno.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/errno.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/errno.h Fri Mar 30 02:04:46 2018 (r331756) @@ -35,13 +35,13 @@ #define ECHRNG EDOM #define ETIME ETIMEDOUT -#define ECOMM ESTALE -#define ENODATA ECONNREFUSED +#define ECOMM ESTALE +#define ENODATA ECONNREFUSED #define ENOIOCTLCMD ENOIOCTL /* Use same value as Linux, because BSD's ERESTART is negative */ #define ERESTARTSYS 512 -#define ENOTSUPP EOPNOTSUPP -#define ENONET EHOSTDOWN +#define ENOTSUPP EOPNOTSUPP +#define ENONET EHOSTDOWN #define ERESTARTNOINTR 513 #define ERESTARTNOHAND 514 Modified: stable/11/sys/compat/linuxkpi/common/include/linux/etherdevice.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/etherdevice.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/etherdevice.h Fri Mar 30 02:04:46 2018 (r331756) @@ -51,31 +51,31 @@ struct ethtool_modinfo { u32 eeprom_len; }; -static inline bool +static inline bool is_zero_ether_addr(const u8 * addr) { return ((addr[0] + addr[1] + addr[2] + addr[3] + addr[4] + addr[5]) == 0x00); } -static inline bool +static inline bool is_multicast_ether_addr(const u8 * addr) { return (0x01 & addr[0]); } -static inline bool +static inline bool is_broadcast_ether_addr(const u8 * addr) { return ((addr[0] + addr[1] + addr[2] + addr[3] + addr[4] + addr[5]) == (6 * 0xff)); } -static inline bool +static inline bool is_valid_ether_addr(const u8 * addr) { return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr); } -static inline void +static inline void ether_addr_copy(u8 * dst, const u8 * src) { memcpy(dst, src, 6); Modified: stable/11/sys/compat/linuxkpi/common/include/linux/fs.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/fs.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/fs.h Fri Mar 30 02:04:46 2018 (r331756) @@ -82,7 +82,7 @@ struct linux_file_wait_queue { struct linux_file { struct file *_file; const struct file_operations *f_op; - void *private_data; + void *private_data; int f_flags; int f_mode; /* Just starting mode. */ struct dentry *f_dentry; @@ -140,7 +140,7 @@ struct file_operations { int (*fasync)(int, struct file *, int); /* Although not supported in FreeBSD, to align with Linux code - * we are adding llseek() only when it is mapped to no_llseek which returns + * we are adding llseek() only when it is mapped to no_llseek which returns * an illegal seek error */ loff_t (*llseek)(struct file *, loff_t, int); @@ -270,7 +270,7 @@ iput(struct inode *inode) vrele(inode); } -static inline loff_t +static inline loff_t no_llseek(struct file *file, loff_t offset, int whence) { Modified: stable/11/sys/compat/linuxkpi/common/include/linux/idr.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/idr.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/idr.h Fri Mar 30 02:04:46 2018 (r331756) @@ -96,7 +96,7 @@ int idr_for_each(struct idr *idp, int (*fn)(int id, vo #define IDA_CHUNK_SIZE 128 /* 128 bytes per chunk */ #define IDA_BITMAP_LONGS (IDA_CHUNK_SIZE / sizeof(long) - 1) -#define IDA_BITMAP_BITS (IDA_BITMAP_LONGS * sizeof(long) * 8) +#define IDA_BITMAP_BITS (IDA_BITMAP_LONGS * sizeof(long) * 8) struct ida_bitmap { long nr_busy; Modified: stable/11/sys/compat/linuxkpi/common/include/linux/if_ether.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/if_ether.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/if_ether.h Fri Mar 30 02:04:46 2018 (r331756) @@ -35,17 +35,17 @@ #include <net/ethernet.h> -#define ETH_HLEN ETHER_HDR_LEN /* Total octets in header. */ +#define ETH_HLEN ETHER_HDR_LEN /* Total octets in header. */ #ifndef ETH_ALEN -#define ETH_ALEN ETHER_ADDR_LEN +#define ETH_ALEN ETHER_ADDR_LEN #endif -#define ETH_FCS_LEN 4 /* Octets in the FCS */ -#define VLAN_HLEN 4 /* The additional bytes (on top of the Ethernet header) - * that VLAN requires. */ +#define ETH_FCS_LEN 4 /* Octets in the FCS */ +#define VLAN_HLEN 4 /* The additional bytes (on top of the Ethernet header) + * that VLAN requires. */ /* * defined Ethernet Protocol ID's. */ -#define ETH_P_IP ETHERTYPE_IP +#define ETH_P_IP ETHERTYPE_IP #define ETH_P_IPV6 ETHERTYPE_IPV6 #define ETH_P_MPLS_UC ETHERTYPE_MPLS #define ETH_P_MPLS_MC ETHERTYPE_MPLS_MCAST Modified: stable/11/sys/compat/linuxkpi/common/include/linux/if_vlan.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/if_vlan.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/if_vlan.h Fri Mar 30 02:04:46 2018 (r331756) @@ -39,7 +39,7 @@ #include <net/if_vlan_var.h> #include <net/if_types.h> -#define VLAN_N_VID 4096 +#define VLAN_N_VID 4096 static inline int is_vlan_dev(struct ifnet *ifp) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/io.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/io.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/io.h Fri Mar 30 02:04:46 2018 (r331756) @@ -71,7 +71,7 @@ __raw_writeq(uint64_t b, volatile void *addr) static inline void writel(uint32_t b, void *addr) { - *(volatile uint32_t *)addr = b; + *(volatile uint32_t *)addr = b; } #undef writel_relaxed @@ -85,21 +85,21 @@ writel_relaxed(uint32_t b, void *addr) static inline void writeq(uint64_t b, void *addr) { - *(volatile uint64_t *)addr = b; + *(volatile uint64_t *)addr = b; } #undef writeb static inline void writeb(uint8_t b, void *addr) { - *(volatile uint8_t *)addr = b; + *(volatile uint8_t *)addr = b; } #undef writew static inline void writew(uint16_t b, void *addr) { - *(volatile uint16_t *)addr = b; + *(volatile uint16_t *)addr = b; } #undef ioread8 Modified: stable/11/sys/compat/linuxkpi/common/include/linux/jiffies.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/jiffies.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/jiffies.h Fri Mar 30 02:04:46 2018 (r331756) @@ -38,7 +38,7 @@ #include <sys/kernel.h> #include <sys/limits.h> -#define jiffies ticks +#define jiffies ticks #define jiffies_64 ticks #define jiffies_to_msecs(x) (((int64_t)(int)(x)) * 1000 / hz) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h Fri Mar 30 02:04:46 2018 (r331756) @@ -49,7 +49,7 @@ #include <linux/sched.h> #include <linux/types.h> #include <linux/jiffies.h> -#include <linux/log2.h> +#include <linux/log2.h> #include <asm/byteorder.h> #include <machine/stdarg.h> @@ -170,12 +170,12 @@ scnprintf(char *buf, size_t size, const char *fmt, ... */ #ifdef DEBUG #define pr_debug(fmt, ...) \ - log(LOG_DEBUG, fmt, ##__VA_ARGS__) + log(LOG_DEBUG, fmt, ##__VA_ARGS__) #define pr_devel(fmt, ...) \ log(LOG_DEBUG, pr_fmt(fmt), ##__VA_ARGS__) #else #define pr_debug(fmt, ...) \ - ({ if (0) log(LOG_DEBUG, fmt, ##__VA_ARGS__); 0; }) + ({ if (0) log(LOG_DEBUG, fmt, ##__VA_ARGS__); 0; }) #define pr_devel(fmt, ...) \ ({ if (0) log(LOG_DEBUG, pr_fmt(fmt), ##__VA_ARGS__); 0; }) #endif @@ -238,19 +238,19 @@ scnprintf(char *buf, size_t size, const char *fmt, ... #ifndef WARN #define WARN(condition, ...) ({ \ - bool __ret_warn_on = (condition); \ - if (unlikely(__ret_warn_on)) \ - pr_warning(__VA_ARGS__); \ - unlikely(__ret_warn_on); \ + bool __ret_warn_on = (condition); \ + if (unlikely(__ret_warn_on)) \ + pr_warning(__VA_ARGS__); \ + unlikely(__ret_warn_on); \ }) #endif #ifndef WARN_ONCE #define WARN_ONCE(condition, ...) ({ \ - bool __ret_warn_on = (condition); \ - if (unlikely(__ret_warn_on)) \ - pr_warn_once(__VA_ARGS__); \ - unlikely(__ret_warn_on); \ + bool __ret_warn_on = (condition); \ + if (unlikely(__ret_warn_on)) \ + pr_warn_once(__VA_ARGS__); \ + unlikely(__ret_warn_on); \ }) #endif @@ -259,7 +259,7 @@ scnprintf(char *buf, size_t size, const char *fmt, ... const __typeof(((type *)0)->member) *__p = (ptr); \ (type *)((uintptr_t)__p - offsetof(type, member)); \ }) - + #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #define u64_to_user_ptr(val) ((void *)(uintptr_t)(val)) @@ -397,7 +397,7 @@ extern bool linux_cpu_has_clflush; #endif typedef struct pm_message { - int event; + int event; } pm_message_t; /* Swap values of a and b */ Modified: stable/11/sys/compat/linuxkpi/common/include/linux/kmod.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/kmod.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/kmod.h Fri Mar 30 02:04:46 2018 (r331756) @@ -41,7 +41,7 @@ #define request_module(...) \ ({\ char modname[128]; \ - int fileid; \ + int fileid; \ snprintf(modname, sizeof(modname), __VA_ARGS__); \ kern_kldload(curthread, modname, &fileid); \ }) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/kobject.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/kobject.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/kobject.h Fri Mar 30 02:04:46 2018 (r331756) @@ -61,17 +61,17 @@ struct kobject { extern struct kobject *mm_kobj; struct attribute { - const char *name; + const char *name; struct module *owner; mode_t mode; }; struct kobj_attribute { - struct attribute attr; - ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr, - char *buf); - ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr, - const char *buf, size_t count); + struct attribute attr; + ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr, + char *buf); + ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr, + const char *buf, size_t count); }; static inline void Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Fri Mar 30 02:04:46 2018 (r331756) @@ -40,8 +40,8 @@ /* time values in nanoseconds */ typedef s64 ktime_t; -#define KTIME_MAX ((s64)~((u64)1 << 63)) -#define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) +#define KTIME_MAX ((s64)~((u64)1 << 63)) +#define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) static inline int64_t ktime_to_ns(ktime_t kt) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/list.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/list.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/list.h Fri Mar 30 02:04:46 2018 (r331756) @@ -93,7 +93,7 @@ INIT_LIST_HEAD(struct list_head *list) list->next = list->prev = list; } - + static inline int list_empty(const struct list_head *head) { @@ -159,7 +159,7 @@ linux_list_add(struct list_head *new, struct list_head static inline void list_del_init(struct list_head *entry) -{ +{ list_del(entry); INIT_LIST_HEAD(entry); @@ -167,8 +167,8 @@ list_del_init(struct list_head *entry) #define list_entry(ptr, type, field) container_of(ptr, type, field) -#define list_first_entry(ptr, type, member) \ - list_entry((ptr)->next, type, member) +#define list_first_entry(ptr, type, member) \ + list_entry((ptr)->next, type, member) #define list_last_entry(ptr, type, member) \ list_entry((ptr)->prev, type, member) @@ -196,7 +196,7 @@ list_del_init(struct list_head *entry) p = list_entry((p)->field.next, typeof(*p), field)) #define list_for_each_entry_safe(p, n, h, field) \ - for (p = list_entry((h)->next, typeof(*p), field), \ + for (p = list_entry((h)->next, typeof(*p), field), \ n = list_entry((p)->field.next, typeof(*p), field); &(p)->field != (h);\ p = n, n = list_entry(n->field.next, typeof(*n), field)) @@ -208,7 +208,7 @@ list_del_init(struct list_head *entry) for (p = list_next_entry((p), field); &(p)->field != (h); \ p = list_next_entry((p), field)) -#define list_for_each_entry_safe_from(pos, n, head, member) \ +#define list_for_each_entry_safe_from(pos, n, head, member) \ for (n = list_entry((pos)->member.next, typeof(*pos), member); \ &(pos)->member != (head); \ pos = n, n = list_entry(n->member.next, typeof(*n), member)) @@ -218,7 +218,7 @@ list_del_init(struct list_head *entry) p = list_entry((p)->field.prev, typeof(*p), field)) #define list_for_each_entry_safe_reverse(p, n, h, field) \ - for (p = list_entry((h)->prev, typeof(*p), field), \ + for (p = list_entry((h)->prev, typeof(*p), field), \ n = list_entry((p)->field.prev, typeof(*p), field); &(p)->field != (h); \ p = n, n = list_entry(n->field.prev, typeof(*n), field)) @@ -259,7 +259,7 @@ list_move_tail(struct list_head *entry, struct list_he } static inline void -linux_list_splice(const struct list_head *list, struct list_head *prev, +linux_list_splice(const struct list_head *list, struct list_head *prev, struct list_head *next) { struct list_head *first; @@ -280,7 +280,7 @@ list_splice(const struct list_head *list, struct list_ { linux_list_splice(list, head, head->next); -} +} static inline void list_splice_tail(struct list_head *list, struct list_head *head) @@ -288,15 +288,15 @@ list_splice_tail(struct list_head *list, struct list_h linux_list_splice(list, head->prev, head); } - + static inline void list_splice_init(struct list_head *list, struct list_head *head) { linux_list_splice(list, head, head->next); - INIT_LIST_HEAD(list); + INIT_LIST_HEAD(list); } - + static inline void list_splice_tail_init(struct list_head *list, struct list_head *head) { @@ -344,9 +344,9 @@ static inline void hlist_del(struct hlist_node *n) { - if (n->next) - n->next->pprev = n->pprev; - *n->pprev = n->next; + if (n->next) + n->next->pprev = n->pprev; + *n->pprev = n->next; } static inline void @@ -379,7 +379,7 @@ hlist_add_before(struct hlist_node *n, struct hlist_no next->pprev = &n->next; *(n->pprev) = n; } - + static inline void hlist_add_after(struct hlist_node *n, struct hlist_node *next) { @@ -390,7 +390,7 @@ hlist_add_after(struct hlist_node *n, struct hlist_nod if (next->next) next->next->pprev = &next->next; } - + static inline void hlist_move_list(struct hlist_head *old, struct hlist_head *new) { @@ -433,11 +433,11 @@ static inline void list_cut_position(struct list_head } static inline int list_is_last(const struct list_head *list, - const struct list_head *head) + const struct list_head *head) { - return list->next == head; + return list->next == head; } - + #define hlist_entry(ptr, type, field) container_of(ptr, type, field) #define hlist_for_each(p, head) \ Modified: stable/11/sys/compat/linuxkpi/common/include/linux/log2.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/log2.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/log2.h Fri Mar 30 02:04:46 2018 (r331756) @@ -50,7 +50,7 @@ is_power_of_2(unsigned long n) static inline unsigned long rounddown_pow_of_two(unsigned long x) { - return (1UL << (flsl(x) - 1)); + return (1UL << (flsl(x) - 1)); } #define ilog2(n) \ Modified: stable/11/sys/compat/linuxkpi/common/include/linux/miscdevice.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/miscdevice.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/miscdevice.h Fri Mar 30 02:04:46 2018 (r331756) @@ -59,7 +59,7 @@ misc_register(struct miscdevice *misc) misc->cdev->owner = THIS_MODULE; misc->cdev->ops = misc->fops; kobject_set_name(&misc->cdev->kobj, misc->name); - if (cdev_add(misc->cdev, misc->this_device->devt, 1)) + if (cdev_add(misc->cdev, misc->this_device->devt, 1)) return -EINVAL; return (0); } Modified: stable/11/sys/compat/linuxkpi/common/include/linux/mutex.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/mutex.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/mutex.h Fri Mar 30 02:04:46 2018 (r331756) @@ -116,7 +116,7 @@ mutex_is_owned(mutex_t *m) #ifdef WITNESS_ALL /* NOTE: the maximum WITNESS name is 64 chars */ #define __mutex_name(name, file, line) \ - (((const char *){file ":" #line "-" name}) + \ + (((const char *){file ":" #line "-" name}) + \ (sizeof(file) > 16 ? sizeof(file) - 16 : 0)) #else #define __mutex_name(name, file, line) name Modified: stable/11/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/pci.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/pci.h Fri Mar 30 02:04:46 2018 (r331756) @@ -96,8 +96,8 @@ struct pci_device_id { #define PCI_SUBDEVICE_ID_QEMU 0x1100 #define PCI_DEVFN(slot, func) ((((slot) & 0x1f) << 3) | ((func) & 0x07)) -#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) -#define PCI_FUNC(devfn) ((devfn) & 0x07) +#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) +#define PCI_FUNC(devfn) ((devfn) & 0x07) #define PCI_VDEVICE(_vendor, _device) \ .vendor = PCI_VENDOR_ID_##_vendor, .device = (_device), \ @@ -457,7 +457,7 @@ pci_find_capability(struct pci_dev *pdev, int capid) static inline int pci_pcie_cap(struct pci_dev *dev) { - return pci_find_capability(dev, PCI_CAP_ID_EXP); + return pci_find_capability(dev, PCI_CAP_ID_EXP); } @@ -588,12 +588,12 @@ pci_enable_msix_range(struct pci_dev *dev, struct msix static inline int pci_channel_offline(struct pci_dev *pdev) { - return false; + return false; } static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) { - return -ENODEV; + return -ENODEV; } static inline void pci_disable_sriov(struct pci_dev *dev) { @@ -656,169 +656,167 @@ typedef unsigned int __bitwise pci_channel_state_t; typedef unsigned int __bitwise pci_ers_result_t; enum pci_channel_state { - pci_channel_io_normal = 1, - pci_channel_io_frozen = 2, - pci_channel_io_perm_failure = 3, + pci_channel_io_normal = 1, + pci_channel_io_frozen = 2, + pci_channel_io_perm_failure = 3, }; enum pci_ers_result { - PCI_ERS_RESULT_NONE = 1, - PCI_ERS_RESULT_CAN_RECOVER = 2, - PCI_ERS_RESULT_NEED_RESET = 3, - PCI_ERS_RESULT_DISCONNECT = 4, - PCI_ERS_RESULT_RECOVERED = 5, + PCI_ERS_RESULT_NONE = 1, + PCI_ERS_RESULT_CAN_RECOVER = 2, + PCI_ERS_RESULT_NEED_RESET = 3, + PCI_ERS_RESULT_DISCONNECT = 4, + PCI_ERS_RESULT_RECOVERED = 5, }; /* PCI bus error event callbacks */ struct pci_error_handlers { - pci_ers_result_t (*error_detected)(struct pci_dev *dev, - enum pci_channel_state error); - pci_ers_result_t (*mmio_enabled)(struct pci_dev *dev); - pci_ers_result_t (*link_reset)(struct pci_dev *dev); - pci_ers_result_t (*slot_reset)(struct pci_dev *dev); - void (*resume)(struct pci_dev *dev); + pci_ers_result_t (*error_detected)(struct pci_dev *dev, + enum pci_channel_state error); + pci_ers_result_t (*mmio_enabled)(struct pci_dev *dev); + pci_ers_result_t (*link_reset)(struct pci_dev *dev); + pci_ers_result_t (*slot_reset)(struct pci_dev *dev); + void (*resume)(struct pci_dev *dev); }; /* FreeBSD does not support SRIOV - yet */ static inline struct pci_dev *pci_physfn(struct pci_dev *dev) { - return dev; + return dev; } static inline bool pci_is_pcie(struct pci_dev *dev) { - return !!pci_pcie_cap(dev); + return !!pci_pcie_cap(dev); } static inline u16 pcie_flags_reg(struct pci_dev *dev) { - int pos; - u16 reg16; + int pos; + u16 reg16; - pos = pci_find_capability(dev, PCI_CAP_ID_EXP); - if (!pos) - return 0; + pos = pci_find_capability(dev, PCI_CAP_ID_EXP); + if (!pos) + return 0; - pci_read_config_word(dev, pos + PCI_EXP_FLAGS, ®16); + pci_read_config_word(dev, pos + PCI_EXP_FLAGS, ®16); - return reg16; + return reg16; } static inline int pci_pcie_type(struct pci_dev *dev) { - return (pcie_flags_reg(dev) & PCI_EXP_FLAGS_TYPE) >> 4; + return (pcie_flags_reg(dev) & PCI_EXP_FLAGS_TYPE) >> 4; } static inline int pcie_cap_version(struct pci_dev *dev) { - return pcie_flags_reg(dev) & PCI_EXP_FLAGS_VERS; + return pcie_flags_reg(dev) & PCI_EXP_FLAGS_VERS; } static inline bool pcie_cap_has_lnkctl(struct pci_dev *dev) { - int type = pci_pcie_type(dev); + int type = pci_pcie_type(dev); - return pcie_cap_version(dev) > 1 || - type == PCI_EXP_TYPE_ROOT_PORT || - type == PCI_EXP_TYPE_ENDPOINT || - type == PCI_EXP_TYPE_LEG_END; + return pcie_cap_version(dev) > 1 || + type == PCI_EXP_TYPE_ROOT_PORT || + type == PCI_EXP_TYPE_ENDPOINT || + type == PCI_EXP_TYPE_LEG_END; } static inline bool pcie_cap_has_devctl(const struct pci_dev *dev) { - return true; + return true; } static inline bool pcie_cap_has_sltctl(struct pci_dev *dev) { - int type = pci_pcie_type(dev); + int type = pci_pcie_type(dev); - return pcie_cap_version(dev) > 1 || - type == PCI_EXP_TYPE_ROOT_PORT || - (type == PCI_EXP_TYPE_DOWNSTREAM && - pcie_flags_reg(dev) & PCI_EXP_FLAGS_SLOT); + return pcie_cap_version(dev) > 1 || type == PCI_EXP_TYPE_ROOT_PORT || + (type == PCI_EXP_TYPE_DOWNSTREAM && + pcie_flags_reg(dev) & PCI_EXP_FLAGS_SLOT); } static inline bool pcie_cap_has_rtctl(struct pci_dev *dev) { - int type = pci_pcie_type(dev); + int type = pci_pcie_type(dev); - return pcie_cap_version(dev) > 1 || - type == PCI_EXP_TYPE_ROOT_PORT || - type == PCI_EXP_TYPE_RC_EC; + return pcie_cap_version(dev) > 1 || type == PCI_EXP_TYPE_ROOT_PORT || + type == PCI_EXP_TYPE_RC_EC; } static bool pcie_capability_reg_implemented(struct pci_dev *dev, int pos) { - if (!pci_is_pcie(dev)) - return false; + if (!pci_is_pcie(dev)) + return false; - switch (pos) { - case PCI_EXP_FLAGS_TYPE: - return true; - case PCI_EXP_DEVCAP: - case PCI_EXP_DEVCTL: - case PCI_EXP_DEVSTA: - return pcie_cap_has_devctl(dev); - case PCI_EXP_LNKCAP: - case PCI_EXP_LNKCTL: - case PCI_EXP_LNKSTA: - return pcie_cap_has_lnkctl(dev); - case PCI_EXP_SLTCAP: - case PCI_EXP_SLTCTL: - case PCI_EXP_SLTSTA: - return pcie_cap_has_sltctl(dev); - case PCI_EXP_RTCTL: - case PCI_EXP_RTCAP: - case PCI_EXP_RTSTA: - return pcie_cap_has_rtctl(dev); - case PCI_EXP_DEVCAP2: - case PCI_EXP_DEVCTL2: - case PCI_EXP_LNKCAP2: - case PCI_EXP_LNKCTL2: - case PCI_EXP_LNKSTA2: - return pcie_cap_version(dev) > 1; - default: - return false; - } + switch (pos) { + case PCI_EXP_FLAGS_TYPE: + return true; + case PCI_EXP_DEVCAP: + case PCI_EXP_DEVCTL: + case PCI_EXP_DEVSTA: + return pcie_cap_has_devctl(dev); + case PCI_EXP_LNKCAP: + case PCI_EXP_LNKCTL: + case PCI_EXP_LNKSTA: + return pcie_cap_has_lnkctl(dev); + case PCI_EXP_SLTCAP: + case PCI_EXP_SLTCTL: + case PCI_EXP_SLTSTA: + return pcie_cap_has_sltctl(dev); + case PCI_EXP_RTCTL: + case PCI_EXP_RTCAP: + case PCI_EXP_RTSTA: + return pcie_cap_has_rtctl(dev); + case PCI_EXP_DEVCAP2: + case PCI_EXP_DEVCTL2: + case PCI_EXP_LNKCAP2: + case PCI_EXP_LNKCTL2: + case PCI_EXP_LNKSTA2: + return pcie_cap_version(dev) > 1; + default: + return false; + } } static inline int pcie_capability_read_dword(struct pci_dev *dev, int pos, u32 *dst) { - if (pos & 3) - return -EINVAL; + if (pos & 3) + return -EINVAL; - if (!pcie_capability_reg_implemented(dev, pos)) - return -EINVAL; + if (!pcie_capability_reg_implemented(dev, pos)) + return -EINVAL; - return pci_read_config_dword(dev, pci_pcie_cap(dev) + pos, dst); + return pci_read_config_dword(dev, pci_pcie_cap(dev) + pos, dst); } static inline int pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *dst) { - if (pos & 3) - return -EINVAL; + if (pos & 3) + return -EINVAL; - if (!pcie_capability_reg_implemented(dev, pos)) - return -EINVAL; + if (!pcie_capability_reg_implemented(dev, pos)) + return -EINVAL; - return pci_read_config_word(dev, pci_pcie_cap(dev) + pos, dst); + return pci_read_config_word(dev, pci_pcie_cap(dev) + pos, dst); } static inline int pcie_capability_write_word(struct pci_dev *dev, int pos, u16 val) { - if (pos & 1) - return -EINVAL; + if (pos & 1) + return -EINVAL; - if (!pcie_capability_reg_implemented(dev, pos)) - return 0; + if (!pcie_capability_reg_implemented(dev, pos)) + return 0; - return pci_write_config_word(dev, pci_pcie_cap(dev) + pos, val); + return pci_write_config_word(dev, pci_pcie_cap(dev) + pos, val); } static inline int pcie_get_minimum_link(struct pci_dev *dev, Modified: stable/11/sys/compat/linuxkpi/common/include/linux/rwlock.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/rwlock.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/rwlock.h Fri Mar 30 02:04:46 2018 (r331756) @@ -48,9 +48,9 @@ typedef struct { #define read_unlock_irq(lock) read_unlock((lock)) #define write_lock_irq(lock) write_lock((lock)) #define write_unlock_irq(lock) write_unlock((lock)) -#define read_lock_irqsave(lock, flags) \ +#define read_lock_irqsave(lock, flags) \ do {(flags) = 0; read_lock(lock); } while (0) -#define write_lock_irqsave(lock, flags) \ +#define write_lock_irqsave(lock, flags) \ do {(flags) = 0; write_lock(lock); } while (0) #define read_unlock_irqrestore(lock, flags) \ do { read_unlock(lock); } while (0) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/rwsem.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/rwsem.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/rwsem.h Fri Mar 30 02:04:46 2018 (r331756) @@ -55,7 +55,7 @@ struct rw_semaphore { #ifdef WITNESS_ALL /* NOTE: the maximum WITNESS name is 64 chars */ #define __rwsem_name(name, file, line) \ - (((const char *){file ":" #line "-" name}) + \ + (((const char *){file ":" #line "-" name}) + \ (sizeof(file) > 16 ? sizeof(file) - 16 : 0)) #else #define __rwsem_name(name, file, line) name Modified: stable/11/sys/compat/linuxkpi/common/include/linux/slab.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/slab.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/slab.h Fri Mar 30 02:04:46 2018 (r331756) @@ -49,9 +49,9 @@ MALLOC_DECLARE(M_KMALLOC); #define vzalloc(size) __vmalloc(size, GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO, 0) #define vfree(arg) kfree(arg) #define kvfree(arg) kfree(arg) -#define vmalloc_node(size, node) __vmalloc(size, GFP_KERNEL, 0) -#define vmalloc_user(size) __vmalloc(size, GFP_KERNEL | __GFP_ZERO, 0) -#define vmalloc(size) __vmalloc(size, GFP_KERNEL, 0) +#define vmalloc_node(size, node) __vmalloc(size, GFP_KERNEL, 0) +#define vmalloc_user(size) __vmalloc(size, GFP_KERNEL | __GFP_ZERO, 0) +#define vmalloc(size) __vmalloc(size, GFP_KERNEL, 0) #define __kmalloc(...) kmalloc(__VA_ARGS__) #define kmalloc_node(chunk, flags, n) kmalloc(chunk, flags) @@ -62,7 +62,7 @@ MALLOC_DECLARE(M_KMALLOC); #define kmem_cache linux_kmem_cache #define kmem_cache_create(...) linux_kmem_cache_create(__VA_ARGS__) #define kmem_cache_alloc(...) linux_kmem_cache_alloc(__VA_ARGS__) -#define kmem_cache_free(...) linux_kmem_cache_free(__VA_ARGS__) +#define kmem_cache_free(...) linux_kmem_cache_free(__VA_ARGS__) #define kmem_cache_destroy(...) linux_kmem_cache_destroy(__VA_ARGS__) #define KMEM_CACHE(__struct, flags) \ @@ -79,7 +79,7 @@ struct linux_kmem_cache { }; #define SLAB_HWCACHE_ALIGN (1 << 0) -#define SLAB_TYPESAFE_BY_RCU (1 << 1) +#define SLAB_TYPESAFE_BY_RCU (1 << 1) #define SLAB_RECLAIM_ACCOUNT (1 << 2) #define SLAB_DESTROY_BY_RCU \ Modified: stable/11/sys/compat/linuxkpi/common/include/linux/spinlock.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/spinlock.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/spinlock.h Fri Mar 30 02:04:46 2018 (r331756) @@ -125,7 +125,7 @@ typedef struct { #ifdef WITNESS_ALL /* NOTE: the maximum WITNESS name is 64 chars */ #define __spin_lock_name(name, file, line) \ - (((const char *){file ":" #line "-" name}) + \ + (((const char *){file ":" #line "-" name}) + \ (sizeof(file) > 16 ? sizeof(file) - 16 : 0)) #else #define __spin_lock_name(name, file, line) name Modified: stable/11/sys/compat/linuxkpi/common/include/linux/sysfs.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/sysfs.h Fri Mar 30 01:53:14 2018 (r331755) +++ stable/11/sys/compat/linuxkpi/common/include/linux/sysfs.h Fri Mar 30 02:04:46 2018 (r331756) @@ -45,14 +45,14 @@ struct sysfs_ops { struct attribute_group { *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803300204.w2U24k6v079999>