backports: always use new version compare macros
Subsystems (3)
RFC 1/1 backports: always use new version compare macros
From: Johannes Berg <[email protected]>
--- .../backport-include/asm-generic/pci-dma-compat.h | 2 +- backport/backport-include/asm/atomic.h | 2 +- backport/backport-include/asm/barrier.h | 2 +- backport/backport-include/crypto/aead.h | 4 +- backport/backport-include/crypto/hash.h | 4 +- backport/backport-include/crypto/skcipher.h | 4 +- backport/backport-include/linux/acpi.h | 8 ++-- backport/backport-include/linux/bcm47xx_nvram.h | 6 +-- backport/backport-include/linux/bp-devcoredump.h | 8 ++-- backport/backport-include/linux/clk.h | 8 ++-- backport/backport-include/linux/compat.h | 4 +- backport/backport-include/linux/completion.h | 4 +- backport/backport-include/linux/crc7.h | 2 +- backport/backport-include/linux/debugfs.h | 8 ++-- backport/backport-include/linux/device.h | 24 +++++----- backport/backport-include/linux/dma-buf.h | 12 ++--- backport/backport-include/linux/dma-mapping.h | 6 +-- backport/backport-include/linux/dynamic_debug.h | 2 +- backport/backport-include/linux/err.h | 2 +- backport/backport-include/linux/etherdevice.h | 32 ++++++------- backport/backport-include/linux/export.h | 4 +- backport/backport-include/linux/firmware.h | 2 +- backport/backport-include/linux/freezer.h | 4 +- backport/backport-include/linux/fs.h | 8 ++-- backport/backport-include/linux/gpio.h | 2 +- backport/backport-include/linux/hashtable.h | 2 +- backport/backport-include/linux/hid.h | 6 +-- backport/backport-include/linux/hrtimer.h | 2 +- backport/backport-include/linux/hwmon.h | 4 +- backport/backport-include/linux/i2c-mux.h | 4 +- backport/backport-include/linux/idr.h | 4 +- backport/backport-include/linux/if_vlan.h | 4 +- backport/backport-include/linux/irq.h | 2 +- backport/backport-include/linux/irqdomain.h | 2 +- backport/backport-include/linux/jiffies.h | 2 +- backport/backport-include/linux/kconfig.h | 2 +- backport/backport-include/linux/kernel.h | 12 ++--- backport/backport-include/linux/kfifo.h | 2 +- backport/backport-include/linux/ktime.h | 2 +- backport/backport-include/linux/leds.h | 12 ++--- backport/backport-include/linux/list.h | 2 +- backport/backport-include/linux/lockdep.h | 4 +- backport/backport-include/linux/math64.h | 2 +- backport/backport-include/linux/mdio.h | 4 +- backport/backport-include/linux/mei_cl_bus.h | 6 +-- backport/backport-include/linux/mii.h | 2 +- backport/backport-include/linux/mm.h | 12 ++--- backport/backport-include/linux/mmc/host.h | 4 +- backport/backport-include/linux/module.h | 2 +- backport/backport-include/linux/moduleparam.h | 6 +-- backport/backport-include/linux/net.h | 4 +- backport/backport-include/linux/netdev_features.h | 6 +-- backport/backport-include/linux/netdevice.h | 54 +++++++++++----------- backport/backport-include/linux/netlink.h | 2 +- backport/backport-include/linux/nl80211.h | 2 +- backport/backport-include/linux/of.h | 40 ++++++++-------- backport/backport-include/linux/of_address.h | 4 +- backport/backport-include/linux/of_irq.h | 4 +- backport/backport-include/linux/of_platform.h | 12 ++--- backport/backport-include/linux/olpc-ec.h | 4 +- backport/backport-include/linux/page_ref.h | 2 +- backport/backport-include/linux/pci.h | 22 ++++----- backport/backport-include/linux/phy.h | 6 +-- .../linux/platform_data/media/si4713.h | 2 +- .../platform_data/media/soc_camera_platform.h | 2 +- .../linux/platform_data/media/timb_radio.h | 2 +- .../linux/platform_data/media/timb_video.h | 2 +- backport/backport-include/linux/pm_qos.h | 4 +- backport/backport-include/linux/pm_runtime.h | 4 +- backport/backport-include/linux/poll.h | 2 +- backport/backport-include/linux/printk.h | 6 +-- backport/backport-include/linux/proc_fs.h | 4 +- backport/backport-include/linux/ptp_clock_kernel.h | 8 ++-- backport/backport-include/linux/random.h | 12 ++--- backport/backport-include/linux/rculist.h | 2 +- backport/backport-include/linux/regmap.h | 8 ++-- backport/backport-include/linux/regulator/driver.h | 8 ++-- backport/backport-include/linux/rfkill.h | 2 +- backport/backport-include/linux/rtnetlink.h | 2 +- backport/backport-include/linux/scatterlist.h | 8 ++-- backport/backport-include/linux/security.h | 2 +- backport/backport-include/linux/seq_file.h | 6 +-- backport/backport-include/linux/skbuff.h | 50 ++++++++++---------- backport/backport-include/linux/slab.h | 2 +- backport/backport-include/linux/spi/spi.h | 2 +- backport/backport-include/linux/static_key.h | 4 +- backport/backport-include/linux/string.h | 24 +++++----- backport/backport-include/linux/thermal.h | 8 ++-- backport/backport-include/linux/time64.h | 6 +-- backport/backport-include/linux/timecounter.h | 2 +- backport/backport-include/linux/timekeeping.h | 6 +-- backport/backport-include/linux/tty.h | 12 ++--- backport/backport-include/linux/tty_flip.h | 2 +- backport/backport-include/linux/types.h | 2 +- backport/backport-include/linux/u64_stats_sync.h | 12 ++--- backport/backport-include/linux/uidgid.h | 4 +- backport/backport-include/linux/usb.h | 4 +- backport/backport-include/linux/usb/ch9.h | 4 +- backport/backport-include/linux/version.h | 3 +- backport/backport-include/linux/wait.h | 10 ++-- backport/backport-include/linux/watchdog.h | 2 +- backport/backport-include/linux/workqueue.h | 8 ++-- backport/backport-include/net/addrconf.h | 4 +- backport/backport-include/net/flow_keys.h | 2 +- backport/backport-include/net/genetlink.h | 12 ++--- backport/backport-include/net/inet_frag.h | 16 +++---- backport/backport-include/net/ip.h | 2 +- backport/backport-include/net/ip6_fib.h | 4 +- backport/backport-include/net/ipv6.h | 8 ++-- backport/backport-include/net/iw_handler.h | 18 ++++---- backport/backport-include/net/net_namespace.h | 6 +-- backport/backport-include/net/netlink.h | 14 +++--- backport/backport-include/net/sch_generic.h | 6 +-- backport/backport-include/net/sock.h | 10 ++-- backport/backport-include/net/tso.h | 2 +- backport/backport-include/sound/core.h | 2 +- backport/backport-include/sound/pcm.h | 4 +- backport/backport-include/uapi/linux/genetlink.h | 2 +- backport/backport-include/uapi/linux/sockios.h | 4 +- backport/compat/backport-3.13.c | 8 ++-- backport/compat/backport-3.18.c | 26 +++++------ backport/compat/backport-3.19.c | 2 +- backport/compat/backport-4.1.c | 4 +- backport/compat/backport-4.3.c | 8 ++-- backport/compat/backport-4.4.c | 2 +- backport/compat/backport-4.5.c | 6 +-- backport/compat/compat-3.3.c | 6 +-- backport/compat/compat-3.4.c | 8 ++-- backport/compat/compat-3.5.c | 4 +- backport/compat/compat-3.7.c | 4 +- backport/compat/compat-3.8.c | 4 +- .../0001-group-attr/0001-group_attr_class.cocci | 4 +- patches/0001-group-attr/0002-group_attr_bus.cocci | 4 +- patches/0001-group-attr/0003-class_groups.cocci | 4 +- patches/0001-v4l2-dma_mmap_coherent-revert.patch | 8 ++-- .../0002-disable-dump-adjust-on-old-kernels.patch | 2 +- patches/0002-gpio-parent.cocci | 8 ++-- patches/0006-ieee802154-6lowpan-namespace.patch | 12 ++--- patches/0007-lowpan-inet_frag_lru_move.patch | 8 ++-- patches/0008-net-user-ns.patch | 4 +- .../drivers_net_wireless_cw1200_sdio.patch | 2 +- .../0014-netlink_seq/net_wireless_nl80211.patch | 2 +- .../drivers_net_wireless_ipw2x00_ipw2100.patch | 2 +- .../drivers_net_wireless_libertas_if_usb.patch | 2 +- patches/0017-get_ts_info/get_ts_info.cocci | 8 ++-- patches/0019-usb_driver_lpm.cocci | 2 +- .../0020-tty-termios/net_bluetooth_hci_ldisc.patch | 8 ++-- .../net_bluetooth_rfcomm_tty.patch | 2 +- patches/0021-umode_t-api-change/ath10k.patch | 2 +- patches/0021-umode_t-api-change/ath9k.patch | 2 +- .../drivers_net_wireless_ath_ath9k_debug.patch | 2 +- patches/0022-define-tracing/ath6kl.patch | 2 +- patches/0022-define-tracing/cfg80211.patch | 2 +- patches/0022-define-tracing/mt7601u.patch | 2 +- patches/0022-define-tracing/wil6210.patch | 2 +- patches/0024-led-blink-api/mac80211.patch | 4 +- patches/0025-usb-sg/usbnet.patch | 10 ++-- patches/0026-ipv6_stub/cdc_mbim.patch | 8 ++-- patches/0028-select_queue/mac80211.patch | 8 ++-- patches/0028-select_queue/mwifiex.patch | 4 +- .../net_bluetooth_hidp_core.patch | 4 +- patches/0030-qdisc_tx_busylock/bluetooth.patch | 4 +- patches/0030-qdisc_tx_busylock/ieee802154.patch | 4 +- patches/0031-sk_data_ready.cocci | 8 ++-- .../0032-sriov_configure/igb_sriov_configure.patch | 4 +- patches/0032-sriov_configure/sriov_configure.cocci | 8 ++-- patches/0033-ndo_vlan_rx_vid/cdc_mbim.patch | 20 ++++---- .../0033-ndo_vlan_rx_vid/igb_ndo_vlan_rx_vid.patch | 32 ++++++------- .../0034-ndo_set_vf_spoofchk/set_vf_spoofchk.cocci | 12 ++--- patches/0035-skb_no_fcs/skb_no_fcs.cocci | 4 +- patches/0036-ethtool_eee/ethtool_eee.cocci | 16 +++---- patches/0037-ethtool_get_module/get_module.cocci | 16 +++---- .../0038-ethtool_rxfh_indir/igb_rxfh_indir.patch | 26 +++++------ patches/0039-ethtool_rxnfc/rxnfc.cocci | 4 +- .../0040-ethtool_cmd_mdix/ethtool_cmd_mdix.cocci | 8 ++-- patches/0042-pci_error_handlers/atl1e.patch | 4 +- .../igb_pci_error_handlers.cocci | 4 +- patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch | 4 +- patches/0043-ndo_set_vf_rate/set_vf_rate.cocci | 12 ++--- patches/0044-no_user_ns_in_net/ieee802154.patch | 4 +- patches/0047-write_iter/bluetooth.patch | 10 ++-- patches/0049-no-pfmemalloc/no-pfmemalloc.cocci | 4 +- patches/0050-iov_iter/bluetooth.patch | 28 +++++------ patches/0051-no-wakeup_path/ssb.patch | 4 +- patches/0052-deactivate-ptp-pin/igb.patch | 18 ++++---- .../0053-remove_wait_on_bit_timeout/btusb.patch | 8 ++-- .../hci_intel.patch | 14 +++--- patches/0054-struct-proto_ops-sig.cocci | 36 +++++++-------- patches/0055-name_assign_type/brcmfmac.patch | 2 +- .../0056-ndo_features_check/features_check.cocci | 8 ++-- .../0058-ptp_getsettime64/ptp_getsettime64.cocci | 12 ++--- patches/0059-skb_xmit_more/skb_no_xmit_more.cocci | 4 +- patches/0059-uuid-in-mei/nfc.patch | 8 ++-- patches/0060-trace_field_struct/mt7601u.patch | 4 +- patches/0061-termios_rwsem/nfc.patch | 8 ++-- patches/0062-acpi-gpio-remove/hci_bcm.patch | 14 +++--- patches/0062-acpi-gpio-remove/hci_intel.patch | 12 ++--- patches/0062-iff-no-queue.cocci | 2 +- patches/0065-ndisc_send_na-argument.cocci | 2 +- .../cfg802154.patch | 2 +- patches/0068-proto-hash/ieee802154.patch | 10 ++-- patches/0069-iwlwifi-pd-string-fix.patch | 10 ++-- patches/0069-remove-of_irq/bcma.patch | 2 +- patches/0070-mac80211-fils.patch | 6 +-- patches/0071-skb-head_frag/wireless.patch | 2 +- patches/0072-netdevice-ndo_fdb_add/igb.patch | 2 +- patches/0073-netdevice-mtu-range.cocci | 4 +- patches/0074-netdevice-mtu-range-ifdefs.cocci | 4 +- patches/0074-skb-wifi-acked.cocci | 2 +- patches/0075-ndo-stats-64.cocci | 4 +- patches/crypto-ccm.patch | 2 +- patches/devcoredump.patch | 12 ++--- patches/flow_dissector.patch | 2 +- 213 files changed, 736 insertions(+), 737 deletions(-)
backport/backport-include/asm-generic/pci-dma-compat.h +1 -1
@@ -2,7 +2,7 @@#define __BACKPORT_ASM_GENERIC_PCI_DMA_COMPAT_H#include_next <asm-generic/pci-dma-compat.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,17 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,17 ,0 )#define pci_zalloc_consistent LINUX_BACKPORT(pci_zalloc_consistent)static inline void *pci_zalloc_consistent (struct pci_dev *hwdev,size_t size,dma_addr_t *dma_handle)
backport/backport-include/asm/atomic.h +1 -1
@@ -4,7 +4,7 @@#include <linux/version.h> #include <asm/barrier.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,1 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,1 ,0 )/* * In many versions, several architectures do not seem to include an * atomic64_t implementation, and do not include the software emulation from
backport/backport-include/asm/barrier.h +1 -1
@@ -2,7 +2,7 @@#define __BACKPORT_ASM_BARRIER_H#include <linux/version.h> -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,4 ,0 ) || \ +#if LINUX_VERSION_IS_GEQ (3 ,4 ,0 ) || \ defined(CONFIG_ALPHA ) || defined(CONFIG_MIPS )#include_next <asm/barrier.h>#endif /* >= 3.4 */
backport/backport-include/crypto/aead.h +2 -2
@@ -3,7 +3,7 @@#include_next <crypto/aead.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,2 ,0 )#define aead_request_set_ad LINUX_BACKPORT(aead_request_set_ad)static inline void aead_request_set_ad (struct aead_request *req,unsigned int assoclen)
@@ -28,6 +28,6 @@ static inline int backport_crypto_aead_decrypt(struct aead_request *req) }#define crypto_aead_decrypt LINUX_BACKPORT(crypto_aead_decrypt) -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) */ +#endif /* LINUX_VERSION_IS_LESS(4,2,0) */ #endif /* __BACKPORT_CRYPTO_AEAD_H */
backport/backport-include/crypto/hash.h +2 -2
@@ -3,7 +3,7 @@#include_next <crypto/hash.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,6 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,6 ,0 )#define shash_desc_zero LINUX_BACKPORT(shash_desc_zero)static inline void shash_desc_zero (struct shash_desc *desc) {
@@ -12,7 +12,7 @@ static inline void shash_desc_zero(struct shash_desc *desc) }#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,6 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,6 ,0 )#define ahash_request_zero LINUX_BACKPORT(ahash_request_zero)static inline void ahash_request_zero (struct ahash_request *req) {
backport/backport-include/crypto/skcipher.h +2 -2
@@ -3,7 +3,7 @@#include_next <crypto/skcipher.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,3 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,3 ,0 )/** * struct skcipher_request - Symmetric key cipher request * @cryptlen: Number of bytes to encrypt or decrypt
@@ -441,7 +441,7 @@ static inline void skcipher_request_set_crypt( }#endif /* < 4.3 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,6 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,6 ,0 )#define skcipher_request_zero LINUX_BACKPORT(skcipher_request_zero)static inline void skcipher_request_zero (struct skcipher_request *req) {
backport/backport-include/linux/acpi.h +4 -4
@@ -3,7 +3,7 @@#include_next <linux/acpi.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,8 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,8 ,0 )/* * Backports *
@@ -34,7 +34,7 @@#else #define ACPI_HANDLE (dev) (NULL)#endif /* CONFIG_ACPI */ -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,8,0) */ #ifndef ACPI_COMPANION #ifdef CONFIG_ACPI
@@ -55,9 +55,9 @@ static inline struct acpi_device *_acpi_get_companion(struct device *dev)#endif /* CONFIG_ACPI */ #endif /* ACPI_COMPANION */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,19 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,19 ,0 )#define acpi_dev_remove_driver_gpios LINUX_BACKPORT(acpi_dev_remove_driver_gpios)static inline void acpi_dev_remove_driver_gpios (struct acpi_device *adev) {} -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) */ +#endif /* LINUX_VERSION_IS_LESS(3, 19, 0) */ #endif /* __BACKPORT_LINUX_ACPI_H */
backport/backport-include/linux/bcm47xx_nvram.h +3 -3
@@ -2,14 +2,14 @@#define __BACKPORTS_BCM47XX_NVRAM_H#include <linux/version.h> -#if LINUX_VERSION_CODE >=KERNEL_VERSION (4 ,1 ,0 ) +#if LINUX_VERSION_IS_GEQ (4 ,1 ,0 )#include_next <linux/bcm47xx_nvram.h>#else #include <linux/types.h> #include <linux/kernel.h> #endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,2 ,0 )#define bcm47xx_nvram_get_contents LINUX_BACKPORT(bcm47xx_nvram_get_contents)static inline char *bcm47xx_nvram_get_contents (size_t *val_len) {
@@ -20,6 +20,6 @@ static inline char *bcm47xx_nvram_get_contents(size_t *val_len)static inline void bcm47xx_nvram_release_contents (char *nvram) { } -#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */ +#endif /* LINUX_VERSION_IS_GEQ(4,1,0) */ #endif /* __BACKPORTS_BCM47XX_NVRAM_H */
backport/backport-include/linux/bp-devcoredump.h +4 -4
@@ -6,8 +6,8 @@/* We only need to add our wrapper inside the range from 3.18 until * 4.6, outside that we can let our BPAUTO mechanism handle it. */ -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,18 ,0 ) && \ -LINUX_VERSION_CODE <KERNEL_VERSION (4 ,7 ,0 )) +#if (LINUX_VERSION_IS_GEQ (3 ,18 ,0 ) && \ +LINUX_VERSION_IS_LESS (4 ,7 ,0 )) static inline void backport_dev_coredumpm(struct device *dev, struct module *owner, void *data, size_t datalen, gfp_t gfp,
@@ -26,7 +26,7 @@ void backport_dev_coredumpm(struct device *dev, struct module *owner,void dev_coredumpsg (struct device *dev,struct scatterlist *table,size_t datalen,gfp_t gfp); -#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0) && \ -LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)) */ +#endif /* (LINUX_VERSION_IS_GEQ(3,18,0) && \ +LINUX_VERSION_IS_LESS(4,7,0)) */ #endif /* __BACKPORT_LINUX_DEVCOREDUMP_H */
backport/backport-include/linux/clk.h +4 -4
@@ -12,7 +12,7 @@* CONFIG_COMMON_CLK case. The 3.5 kernel is not supported as * per kernel.org so we don't send a fix upstream for that. */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,6 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,6 ,0 )#ifndef CONFIG_COMMON_CLK
@@ -84,10 +84,10 @@ static inline struct clk *clk_get_parent(struct clk *clk) }#endif /* CONFIG_COMMON_CLK */ -#endif /* #if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0) */ +#endif /* #if LINUX_VERSION_IS_LESS(3,0,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 ) && \ -LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,3 ,0 ) && \ +LINUX_VERSION_IS_GEQ (3 ,2 ,0 )#define clk_prepare_enable LINUX_BACKPORT(clk_prepare_enable)/* clk_prepare_enable helps cases using clk_enable in non-atomic context. */ static inline int clk_prepare_enable (struct clk *clk)
backport/backport-include/linux/compat.h +2 -2
@@ -4,7 +4,7 @@#include_next <linux/compat.h>#include <linux/version.h> -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,4 ,0 )) +#if LINUX_VERSION_IS_LESS (3 ,4 ,0 )#ifdef CONFIG_X86_X32_ABI #define COMPAT_USE_64BIT_TIME \ (!!(task_pt_regs(current)->orig_ax & __X32_SYSCALL_BIT))
@@ -13,7 +13,7 @@#endif #endif -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,4 ,0 )) +#if LINUX_VERSION_IS_LESS (3 ,4 ,0 )#define compat_put_timespec LINUX_BACKPORT(compat_put_timespec)extern int compat_put_timespec (const struct timespec *,void __user *);#endif
backport/backport-include/linux/completion.h +2 -2
@@ -3,7 +3,7 @@#include_next <linux/completion.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,13 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,13 ,0 )/** * reinit_completion - reinitialize a completion structure * @x: pointer to completion structure that is to be reinitialized
@@ -16,6 +16,6 @@ static inline void reinit_completion(struct completion *x) { x->done =0 ; } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,13,0) */ #endif /* __BACKPORT_COMPLETION_H */
backport/backport-include/linux/crc7.h +1 -1
@@ -3,7 +3,7 @@#include_next <linux/crc7.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,16 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,16 ,0 )#define crc7_be LINUX_BACKPORT(crc7_be)static inline u8 crc7_be (u8 crc,const u8 *buffer,size_t len) {
backport/backport-include/linux/debugfs.h +4 -4
@@ -5,7 +5,7 @@#include <linux/device.h> #include <generated/utsrelease.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,19 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,19 ,0 )#define debugfs_create_devm_seqfile LINUX_BACKPORT(debugfs_create_devm_seqfile)#if defined(CONFIG_DEBUG_FS ) struct dentry *debugfs_create_devm_seqfile(struct device *dev, const char *name,
@@ -22,9 +22,9 @@ static inline struct dentry *debugfs_create_devm_seqfile(struct device *dev,return ERR_PTR (-ENODEV ); }#endif /* CONFIG_DEBUG_FS */ -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,19,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,4 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,4 ,0 )#define debugfs_create_bool LINUX_BACKPORT(debugfs_create_bool)#ifdef CONFIG_DEBUG_FS struct dentry *debugfs_create_bool(const char *name, umode_t mode,
@@ -37,7 +37,7 @@ debugfs_create_bool(const char *name, umode_t mode,return ERR_PTR (-ENODEV ); }#endif -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0) */ +#endif /* LINUX_VERSION_IS_LESS(4,4,0) */ #if LINUX_VERSION_IS_LESS(4,9,0) && \ !LINUX_VERSION_IN_RANGE(4,8,4, 4,9,0) && \
backport/backport-include/linux/device.h +12 -12
@@ -12,7 +12,7 @@*/ #include <linux/string.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )/* backport * commit 9f3b795a626ee79574595e06d1437fe0c7d51d29 * Author: Michał Mirosław <[email protected]>
@@ -49,19 +49,19 @@ static void __exit __driver##_exit(void) \ module_exit(__driver##_exit);#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )#define devm_ioremap_resource LINUX_BACKPORT(devm_ioremap_resource)void __iomem *devm_ioremap_resource (struct device *dev,struct resource *res);#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,5 ,0 ) && \ -LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,5 ,0 ) && \ +LINUX_VERSION_IS_GEQ (3 ,2 ,0 )#define devres_release LINUX_BACKPORT(devres_release)extern int devres_release (struct device *dev,dr_release_t release,dr_match_t match,void *match_data);#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,5 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,5 ,0 )#include <linux/ratelimit.h> #define dev_level_ratelimited (dev_level, dev, fmt, ...) \
@@ -125,7 +125,7 @@ static inline struct device *kobj_to_dev(struct kobject *kobj) }#endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(3,6,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,11 ,0 ) &&RHEL_RELEASE_CODE <RHEL_RELEASE_VERSION (7 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,11 ,0 ) &&RHEL_RELEASE_CODE <RHEL_RELEASE_VERSION (7 ,0 )#ifndef DEVICE_ATTR_RO #define DEVICE_ATTR_RO (_name) \ struct device_attribute dev_attr_ ## _name = __ATTR_RO(_name);
@@ -173,16 +173,16 @@ static const struct attribute_group _name##_group = { \ static inline void init_##_name##_attrs(void) {} \ __ATTRIBUTE_GROUPS(_name) -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,13 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,13 ,0 )#define devm_kmalloc (dev, size, flags) devm_kzalloc(dev, size, flags)#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,15 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,15 ,0 )#define devm_kstrdup LINUX_BACKPORT(devm_kstrdup)extern char *devm_kstrdup (struct device *dev,const char *s,gfp_t gfp);#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,13 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,13 ,0 )#define devm_kmalloc_array LINUX_BACKPORT(devm_kmalloc_array)static inline void *devm_kmalloc_array (struct device *dev,size_t n,size_t size,gfp_t flags)
@@ -200,7 +200,7 @@ static inline void *devm_kcalloc(struct device *dev, }#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,16 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,16 ,0 )#define devm_kmemdup LINUX_BACKPORT(devm_kmemdup)static inline void *devm_kmemdup (struct device *dev,const void *src,size_t len,gfp_t gfp)
@@ -252,7 +252,7 @@ do { \ dev_level_once(dev_dbg, dev, fmt, ##__VA_ARGS__)#endif /* dev_level_once */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,17 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,17 ,0 )#define devm_kvasprintf LINUX_BACKPORT(devm_kvasprintf)extern char *devm_kvasprintf (struct device *dev,gfp_t gfp,const char *fmt,va_list ap);
@@ -261,7 +261,7 @@ extern char *devm_kasprintf(struct device *dev, gfp_t gfp, const char *fmt, ...);#endif /* < 3.17 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,1 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,1 ,0 )#define dev_of_node LINUX_BACKPORT(dev_of_node)static inline struct device_node *dev_of_node (struct device *dev) {
backport/backport-include/linux/dma-buf.h +6 -6
@@ -1,14 +1,14 @@#ifndef _BACKPORT_DMA_BUF_H__#define _BACKPORT_DMA_BUF_H__#include <linux/version.h> -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,3 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,3 ,0 )#include_next <linux/dma-buf.h> -#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */ +#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */ #include <linux/dma-direction.h> #include <linux/dma-attrs.h> #include <linux/dma-mapping.h> -#if !defined(DEFINE_DMA_BUF_EXPORT_INFO ) &&LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,3 ,0 ) +#if !defined(DEFINE_DMA_BUF_EXPORT_INFO ) &&LINUX_VERSION_IS_GEQ (3 ,3 ,0 )/** * helper macro for exporters; zeros and fills in most common values */
@@ -31,14 +31,14 @@ struct dma_buf_export_info {static inline struct dma_buf *backport_dma_buf_export (const struct dma_buf_export_info *exp_info) { -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,4 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,4 ,0 )return dma_buf_export (exp_info->priv, (struct dma_buf_ops *)exp_info->ops, exp_info->size, exp_info->flags); -#elif LINUX_VERSION_CODE <KERNEL_VERSION (3 ,10 ,0 ) +#elif LINUX_VERSION_IS_LESS (3 ,10 ,0 )return dma_buf_export (exp_info->priv, exp_info->ops, exp_info->size, exp_info->flags); -#elif LINUX_VERSION_CODE <KERNEL_VERSION (3 ,17 ,0 ) +#elif LINUX_VERSION_IS_LESS (3 ,17 ,0 )return dma_buf_export_named (exp_info->priv, exp_info->ops, exp_info->size, exp_info->flags, exp_info->exp_name);
backport/backport-include/linux/dma-mapping.h +3 -3
@@ -3,7 +3,7 @@#include_next <linux/dma-mapping.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,2 ,0 )#define dma_zalloc_coherent LINUX_BACKPORT(dma_zalloc_coherent)static inline void *dma_zalloc_coherent (struct device *dev,size_t size,dma_addr_t *dma_handle,gfp_t flag)
@@ -15,7 +15,7 @@ static inline void *dma_zalloc_coherent(struct device *dev, size_t size, }#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,13 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,13 ,0 )/* * Set both the DMA mask and the coherent DMA mask to the same thing. * Note that we don't check the return value from dma_set_coherent_mask()
@@ -30,6 +30,6 @@ static inline int dma_set_mask_and_coherent(struct device *dev, u64 mask)dma_set_coherent_mask (dev, mask);return rc; } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,13,0) */ #endif /* __BACKPORT_LINUX_DMA_MAPPING_H */
backport/backport-include/linux/dynamic_debug.h +1 -1
@@ -3,7 +3,7 @@#include <linux/version.h> #include_next <linux/dynamic_debug.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,2 ,0 )/* backports 07613b0b */ #if defined(CONFIG_DYNAMIC_DEBUG )#if (RHEL_RELEASE_CODE <RHEL_RELEASE_VERSION (6 ,4 ))
backport/backport-include/linux/err.h +1 -1
@@ -3,7 +3,7 @@#include_next <linux/err.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,12 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,12 ,0 )#define PTR_ERR_OR_ZERO (p) PTR_RET(p)#endif
backport/backport-include/linux/etherdevice.h +16 -16
@@ -8,7 +8,7 @@*/ #include <asm/unaligned.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,4 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,4 ,0 )#define eth_hw_addr_random LINUX_BACKPORT(eth_hw_addr_random)static inline void eth_hw_addr_random (struct net_device *dev) {
@@ -17,7 +17,7 @@ static inline void eth_hw_addr_random(struct net_device *dev) }#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,6 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,6 ,0 )#include <linux/random.h> /** * eth_broadcast_addr - Assign broadcast address
@@ -45,9 +45,9 @@ static inline void eth_random_addr(u8 *addr) addr[0 ] &=0xfe ;/* clear multicast bit */ addr[0] |= 0x02; /* set local assignment bit (IEEE802) */ } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,6,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,7 ,0 )/* This backports: *
@@ -64,7 +64,7 @@ static inline void eth_zero_addr(u8 *addr) }#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,5 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,5 ,0 )#define ether_addr_equal LINUX_BACKPORT(ether_addr_equal)static inline bool ether_addr_equal (const u8 *addr1,const u8 *addr2) {
@@ -72,7 +72,7 @@ static inline bool ether_addr_equal(const u8 *addr1, const u8 *addr2) }#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )#define eth_prepare_mac_addr_change LINUX_BACKPORT(eth_prepare_mac_addr_change)extern int eth_prepare_mac_addr_change (struct net_device *dev,void *p);
@@ -80,7 +80,7 @@ extern int eth_prepare_mac_addr_change(struct net_device *dev, void *p);extern void eth_commit_mac_addr_change (struct net_device *dev,void *p);#endif /* < 3.9 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,12 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,12 ,0 )/** * eth_hw_addr_inherit - Copy dev_addr from another net_device * @dst: pointer to net_device to copy dev_addr to
@@ -95,9 +95,9 @@ static inline void eth_hw_addr_inherit(struct net_device *dst, dst->addr_assign_type = src->addr_assign_type; memcpy(dst->dev_addr, src->dev_addr, ETH_ALEN); } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,13,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,5 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,5 ,0 )/** * ether_addr_equal_64bits - Compare two Ethernet addresses * @addr1: Pointer to an array of 8 bytes
@@ -127,9 +127,9 @@ static inline bool ether_addr_equal_64bits(const u8 addr1[6+2],return ether_addr_equal (addr1, addr2); #endif } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,5,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,14 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,14 ,0 )/** * ether_addr_equal_unaligned - Compare two not u16 aligned Ethernet addresses * @addr1: Pointer to a six-byte array containing the Ethernet address
@@ -171,14 +171,14 @@ static inline void ether_addr_copy(u8 *dst, const u8 *src) a[2 ] = b[2 ]; #endif } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,14,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,18 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,18 ,0 )#define eth_get_headlen LINUX_BACKPORT(eth_get_headlen)int eth_get_headlen (unsigned char *data,unsigned int max_len); -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,18,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,19 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,19 ,0 )#define eth_skb_pad LINUX_BACKPORT(eth_skb_pad)/** * eth_skb_pad - Pad buffer to mininum number of octets for Ethernet frame
@@ -191,6 +191,6 @@ static inline int eth_skb_pad(struct sk_buff *skb) {return skb_put_padto (skb,ETH_ZLEN ); } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,19,0) */ #endif /* _BACKPORT_LINUX_ETHERDEVICE_H */
backport/backport-include/linux/export.h +2 -2
@@ -3,7 +3,7 @@#include <linux/version.h> -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 )) +#if LINUX_VERSION_IS_GEQ (3 ,2 ,0 )#include_next <linux/export.h>#else #ifndef pr_fmt
@@ -14,6 +14,6 @@#undef pr_fmt#undef backport_undef_pr_fmt#endif -#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) */ +#endif /* LINUX_VERSION_IS_GEQ(3,2,0) */ #endif /* _COMPAT_LINUX_EXPORT_H */
backport/backport-include/linux/firmware.h +1 -1
@@ -2,7 +2,7 @@#define __BACKPORT_LINUX_FIRMWARE_H#include_next <linux/firmware.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,14 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,14 ,0 )#define request_firmware_direct (fw, name, device) request_firmware(fw, name, device)#endif
backport/backport-include/linux/freezer.h +2 -2
@@ -3,7 +3,7 @@#include_next <linux/freezer.h>#ifdef CONFIG_FREEZER -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,11 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,11 ,0 )/* * Like schedule_hrtimeout_range(), but should not block the freezer. Do not * call this with locks held.
@@ -18,7 +18,7 @@ static inline int freezable_schedule_hrtimeout_range(ktime_t *expires,freezer_count (); return __retval; } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,11,0) */ #else /* !CONFIG_FREEZER */
backport/backport-include/linux/fs.h +4 -4
@@ -8,12 +8,12 @@*/ #include <linux/uidgid.h> -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,4 ,0 )) +#if LINUX_VERSION_IS_LESS (3 ,4 ,0 )#define simple_open LINUX_BACKPORT(simple_open)extern int simple_open (struct inode *inode,struct file *file);#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )/** * backport of: *
@@ -43,8 +43,8 @@ static inline struct inode *file_inode(struct file *f) } while(0)#endif /* replace_fops */ -#if (LINUX_VERSION_CODE <KERNEL_VERSION (4 ,5 ,0 ) && \ -LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 )) +#if (LINUX_VERSION_IS_LESS (4 ,5 ,0 ) && \ +LINUX_VERSION_IS_GEQ (3 ,2 ,0 ))#define no_seek_end_llseek LINUX_BACKPORT(no_seek_end_llseek)extern loff_t no_seek_end_llseek (struct file *,loff_t ,int );#endif /* < 4.5 && >= 3.2 */
backport/backport-include/linux/gpio.h +1 -1
@@ -2,7 +2,7 @@#define __BACKPORT_LINUX_GPIO_H#include_next <linux/gpio.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,5 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,5 ,0 )#define devm_gpio_request_one LINUX_BACKPORT(devm_gpio_request_one)#define devm_gpio_request LINUX_BACKPORT(devm_gpio_request)#ifdef CONFIG_GPIOLIB
backport/backport-include/linux/hashtable.h +1 -1
@@ -3,7 +3,7 @@#include_next <linux/hashtable.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )/** * backport: *
backport/backport-include/linux/hid.h +3 -3
@@ -3,12 +3,12 @@#include_next <linux/hid.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,8 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,8 ,0 )#define hid_ignore LINUX_BACKPORT(hid_ignore)extern bool hid_ignore (struct hid_device *);#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,1 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,1 ,0 )#define HID_TYPE_USBNONE 2#endif
@@ -79,7 +79,7 @@ extern bool hid_ignore(struct hid_device *); dev_dbg(&(hid)->dev, fmt, ##arg) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0) +#if LINUX_VERSION_IS_LESS(3,12,0) #define hid_alloc_report_buf LINUX_BACKPORT(hid_alloc_report_buf) u8 *hid_alloc_report_buf(struct hid_report *report, gfp_t flags);#endif
backport/backport-include/linux/hrtimer.h +1 -1
@@ -4,7 +4,7 @@#include_next <linux/hrtimer.h>#include <linux/interrupt.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,10 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,10 ,0 )static inline void backport_hrtimer_start (struct hrtimer *timer,s64 time,const enum hrtimer_mode mode) {
backport/backport-include/linux/hwmon.h +2 -2
@@ -3,7 +3,7 @@#include_next <linux/hwmon.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,13 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,13 ,0 )/* * Backports *
@@ -29,6 +29,6 @@ struct device * devm_hwmon_device_register_with_groups(struct device *dev, const char *name, void *drvdata, const struct attribute_group **groups); -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,13,0) */ #endif /* __BACKPORT_LINUX_HWMON_H */
backport/backport-include/linux/i2c-mux.h +2 -2
@@ -3,10 +3,10 @@#include_next <linux/i2c-mux.h>#include <linux/version.h> -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,5 ,0 )) +#if LINUX_VERSION_IS_LESS (3 ,5 ,0 )#define i2c_add_mux_adapter (parent, mux_dev, mux_priv, force_nr, chan_id, class, select, deselect) \ i2c_add_mux_adapter(parent, mux_priv, force_nr, chan_id, select, deselect) -#elif (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 )) +#elif LINUX_VERSION_IS_LESS (3 ,7 ,0 )#define i2c_add_mux_adapter (parent, mux_dev, mux_priv, force_nr, chan_id, class, select, deselect) \ i2c_add_mux_adapter(parent, mux_dev, mux_priv, force_nr, chan_id, select, deselect)#endif
backport/backport-include/linux/idr.h +2 -2
@@ -5,7 +5,7 @@#include_next <linux/idr.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,1 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,1 ,0 )#define ida_simple_get LINUX_BACKPORT(ida_simple_get)int ida_simple_get (struct ida *ida,unsigned int start,unsigned int end,gfp_t gfp_mask);
@@ -14,7 +14,7 @@ int ida_simple_get(struct ida *ida, unsigned int start, unsigned int end,void ida_simple_remove (struct ida *ida,unsigned int id);#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )#include <linux/errno.h> /** * backport of idr idr_alloc() usage
backport/backport-include/linux/if_vlan.h +2 -2
@@ -2,7 +2,7 @@#define __BACKPORT_LINUX_IF_VLAN_H_#include_next <linux/if_vlan.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,10 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,10 ,0 )#define vlan_insert_tag (__skb, __vlan_proto, __vlan_tci) vlan_insert_tag(__skb, __vlan_tci)#define __vlan_put_tag (__skb, __vlan_proto, __vlan_tci) __vlan_put_tag(__skb, __vlan_tci)#define vlan_put_tag (__skb, __vlan_proto, __vlan_tci) vlan_put_tag(__skb, __vlan_tci)
@@ -20,7 +20,7 @@#define VLAN_PRIO_SHIFT 13#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,16 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,16 ,0 )#define __vlan_find_dev_deep_rcu (real_dev, vlan_proto, vlan_id) __vlan_find_dev_deep(real_dev, vlan_proto, vlan_id)#endif
backport/backport-include/linux/irq.h +1 -1
@@ -3,7 +3,7 @@#include_next <linux/irq.h> #ifdef CONFIG_HAVE_GENERIC_HARDIRQS -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) +#if LINUX_VERSION_IS_LESS(3,11,0) #define irq_get_trigger_type LINUX_BACKPORT(irq_get_trigger_type) static inline u32 irq_get_trigger_type(unsigned int irq) {
backport/backport-include/linux/irqdomain.h +1 -1
@@ -2,7 +2,7 @@#define __BACKPORT_LINUX_IRQDOMAIN_H#include <linux/version.h> -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,1 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,1 ,0 )#include_next <linux/irqdomain.h>#endif
backport/backport-include/linux/jiffies.h +1 -1
@@ -22,7 +22,7 @@* This function is available, but not exported in kernel < 3.17, add * an own version. */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,17 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,17 ,0 )#define nsecs_to_jiffies LINUX_BACKPORT(nsecs_to_jiffies)extern unsigned long nsecs_to_jiffies (u64 n);#endif /* 3.17 */
backport/backport-include/linux/kconfig.h +1 -1
@@ -1,7 +1,7 @@#ifndef __BACKPORT_LINUX_KCONFIG_H#define __BACKPORT_LINUX_KCONFIG_H#include <linux/version.h> -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,1 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,1 ,0 )#include_next <linux/kconfig.h>#endif
backport/backport-include/linux/kernel.h +6 -6
@@ -150,25 +150,25 @@ )#endif /* rounddown */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,2 ,0 )/* kernels before 3.2 didn't have error checking for the function */ #define hex2bin LINUX_BACKPORT(hex2bin)int __must_check hex2bin (u8 *dst,const char *src,size_t count);#endif /* < 3.2 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,18 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,18 ,0 )#undef clamp#define clamp (val, lo, hi) min((typeof(val))max(val, lo), hi)#endif /* < 3.18 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,6 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,6 ,0 )#define kstrtobool LINUX_BACKPORT(kstrtobool)int __must_check kstrtobool (const char *s,bool *res);#define kstrtobool_from_user LINUX_BACKPORT(kstrtobool_from_user)int __must_check kstrtobool_from_user (const char __user *s,size_t count,bool *res);#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,5 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,5 ,0 )#undef abs/**
@@ -196,12 +196,12 @@ int __must_check kstrtobool_from_user(const char __user *s, size_t count, bool *#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,14 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,14 ,0 )static inline u32 reciprocal_scale (u32 val,u32 ep_ro) {return (u32)(((u64 ) val * ep_ro) >>32 ); } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,14,0) */ #endif /* __BACKPORT_KERNEL_H */
backport/backport-include/linux/kfifo.h +1 -1
@@ -4,7 +4,7 @@#include <linux/version.h> #include_next <linux/kfifo.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,13 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,13 ,0 )#undef kfifo_put/** * kfifo_put - put data into the fifo
backport/backport-include/linux/ktime.h +1 -1
@@ -4,7 +4,7 @@#include <linux/timekeeping.h> #include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,17 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,17 ,0 )#define ktime_get_raw LINUX_BACKPORT(ktime_get_raw)extern ktime_t ktime_get_raw (void );
backport/backport-include/linux/leds.h +6 -6
@@ -6,7 +6,7 @@#include <backport/leds-disabled.h> #ifndef CPTCFG_BPAUTO_BUILD_LEDS -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,6 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,6 ,0 )/* * Backports *
@@ -27,10 +27,10 @@* Signed-off-by: Bryan Wu <[email protected]> */ #define led_set_brightness (_dev, _switch) led_brightness_set(_dev, _switch) -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,6,0) */ #endif /* CPTCFG_BPAUTO_BUILD_LEDS */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,2 ,0 )/* * There is no LINUX_BACKPORT() guard here because we want it to point to * the original function which is exported normally.
@@ -42,8 +42,8 @@ static inline void led_trigger_remove(struct led_classdev *led_cdev) {}#endif #endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,5 ,0 ) && \ -LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,19 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,5 ,0 ) && \ +LINUX_VERSION_IS_GEQ (3 ,19 ,0 )#define led_set_brightness_sync LINUX_BACKPORT(led_set_brightness_sync)/** * led_set_brightness_sync - set LED brightness synchronously
@@ -60,7 +60,7 @@ extern int led_set_brightness_sync(struct led_classdev *led_cdev, enum led_brightness value);#endif /* < 4.5 && >= 3.19 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,5 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,5 ,0 )#define devm_led_trigger_register LINUX_BACKPORT(devm_led_trigger_register)extern int devm_led_trigger_register (struct device *dev,struct led_trigger *trigger);
backport/backport-include/linux/list.h +1 -1
@@ -3,7 +3,7 @@#include_next <linux/list.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )/** * backport: *
backport/backport-include/linux/lockdep.h +2 -2
@@ -3,7 +3,7 @@#include_next <linux/lockdep.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )#undef lockdep_assert_held#ifdef CONFIG_LOCKDEP #define lockdep_assert_held (l) do { \
@@ -12,6 +12,6 @@#else #define lockdep_assert_held (l) do { (void)(l); } while (0)#endif /* CONFIG_LOCKDEP */ -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,9,0) */ #endif /* __BACKPORT_LINUX_LOCKDEP_H */
backport/backport-include/linux/math64.h +1 -1
@@ -2,7 +2,7 @@#define __BACKPORT_LINUX_MATH64_H#include_next <linux/math64.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,12 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,12 ,0 )#if BITS_PER_LONG ==64 /**
backport/backport-include/linux/mdio.h +2 -2
@@ -24,7 +24,7 @@#define MDIO_EEE_10GKR 0x0040/* 10G KR EEE cap */ #endif /* MDIO_EEE_100TX */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,7 ,0 )/** * mmd_eee_adv_to_ethtool_adv_t * @eee_adv: value of the MMD EEE Advertisement/Link Partner Ability registers
@@ -82,6 +82,6 @@ static inline u16 ethtool_adv_to_mmd_eee_adv_t(u32 adv)return reg; } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,7,0) */ #endif /* __BACKPORT_LINUX_MDIO_H */
backport/backport-include/linux/mei_cl_bus.h +3 -3
@@ -2,15 +2,15 @@#define __BACKPORT_LINUX_MEI_CL_BUS_H#include_next <linux/mei_cl_bus.h> -#if (LINUX_VERSION_CODE <KERNEL_VERSION (4 ,3 ,0 )) +#if LINUX_VERSION_IS_LESS (4 ,3 ,0 )#define mei_cldev_register_event_cb (cldev, event_mask, read_cb, context) \ mei_cl_register_event_cb(cldev, read_cb, context) -#elif (LINUX_VERSION_CODE <KERNEL_VERSION (4 ,4 ,0 )) +#elif LINUX_VERSION_IS_LESS (4 ,4 ,0 )#define mei_cldev_register_event_cb (cldev, event_mask, read_cb, context) \ mei_cl_register_event_cb(cldev, event_mask, read_cb, context)#endif -#if (LINUX_VERSION_CODE <KERNEL_VERSION (4 ,4 ,0 )) +#if LINUX_VERSION_IS_LESS (4 ,4 ,0 )#define __mei_cldev_driver_register (cldrv, owner) __mei_cl_driver_register(cldrv, owner)#define mei_cldev_driver_register (cldrv) mei_cl_driver_register(cldrv)#define mei_cldev_driver_unregister (cldrv) mei_cl_driver_unregister(cldrv)
backport/backport-include/linux/mii.h +1 -1
@@ -3,7 +3,7 @@#include_next <linux/mii.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,3 ,0 )#include <linux/ethtool.h> #define ethtool_adv_to_mii_adv_t LINUX_BACKPORT(ethtool_adv_to_mii_adv_t)
backport/backport-include/linux/mm.h +6 -6
@@ -22,19 +22,19 @@#define VM_DONTDUMP VM_NODUMP#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,15 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,15 ,0 )#define kvfree LINUX_BACKPORT(kvfree)void kvfree (const void *addr);#endif /* < 3.15 */ -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,20 ,0 )) +#if LINUX_VERSION_IS_LESS (3 ,20 ,0 )#define get_user_pages_locked LINUX_BACKPORT(get_user_pages_locked)long get_user_pages_locked (unsigned long start,unsigned long nr_pages,int write,int force,struct page **pages,int *locked);#define get_user_pages_unlocked LINUX_BACKPORT(get_user_pages_unlocked)long get_user_pages_unlocked (unsigned long start,unsigned long nr_pages,int write,int force,struct page **pages); -#elif (LINUX_VERSION_CODE <KERNEL_VERSION (4 ,6 ,0 )) +#elif LINUX_VERSION_IS_LESS (4 ,6 ,0 )static inline long backport_get_user_pages_locked (unsigned long start,unsigned long nr_pages,int write,int force,struct page **pages,int *locked)
@@ -54,7 +54,7 @@ long backport_get_user_pages_unlocked(unsigned long start, unsigned long nr_page#define get_user_pages_unlocked LINUX_BACKPORT(get_user_pages_unlocked)#endif -#if (LINUX_VERSION_CODE <KERNEL_VERSION (4 ,6 ,0 )) +#if LINUX_VERSION_IS_LESS (4 ,6 ,0 ) static inline long backport_get_user_pages(unsigned long start, unsigned long nr_pages, int write, int force, struct page **pages,
@@ -114,8 +114,8 @@ static inline unsigned long *frame_vector_pfns(struct frame_vector *vec) }#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,1 ,9 ) && \ -LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,6 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,1 ,9 ) && \ +LINUX_VERSION_IS_GEQ (3 ,6 ,0 )#define page_is_pfmemalloc LINUX_BACKPORT(page_is_pfmemalloc)static inline bool page_is_pfmemalloc (struct page *page) {
backport/backport-include/linux/mmc/host.h +2 -2
@@ -4,13 +4,13 @@#include <linux/version.h> #include <linux/mmc/card.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,16 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,16 ,0 )#define mmc_card_hs LINUX_BACKPORT(mmc_card_hs)static inline int mmc_card_hs (struct mmc_card *card) {return card->host->ios.timing ==MMC_TIMING_SD_HS || card->host->ios.timing ==MMC_TIMING_MMC_HS ; } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,16,0) */ #endif /* _BACKPORTLINUX_MMC_HOST_H */
backport/backport-include/linux/module.h +1 -1
@@ -61,7 +61,7 @@ extern void backport_dependency_symbol(void);void cleanup_module (void ) __attribute__((alias ("__exit_compat" )));#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,3 ,0 )#undef param_check_bool#define param_check_bool (name, p) __param_check(name, p, bool)#endif
backport/backport-include/linux/moduleparam.h +3 -3
@@ -2,7 +2,7 @@#define __BACKPORT_LINUX_MODULEPARAM_H#include_next <linux/moduleparam.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,2 ,0 )#define kernel_param_lock LINUX_BACKPORT(kernel_param_lock)static inline void kernel_param_lock (struct module *mod) {
@@ -15,7 +15,7 @@ static inline void kernel_param_unlock(struct module *mod) }#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,8 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,8 ,0 )#undef __MODULE_INFO#ifdef MODULE #define __MODULE_INFO (tag, name, info) \
@@ -29,7 +29,7 @@ static const char __UNIQUE_ID(name)[] \#endif #endif /* < 3.8 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,17 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,17 ,0 )extern struct kernel_param_ops param_ops_ullong;extern int param_set_ullong (const char *val,const struct kernel_param *kp);extern int param_get_ullong (char *buffer,const struct kernel_param *kp);
backport/backport-include/linux/net.h +2 -2
@@ -64,7 +64,7 @@ do { \* may affect tracing. My recommendation is that if you have a need for * static keys you just require at least 3.5 to remain sane. */ -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,5 ,0 ) && !defined(net_get_random_once) +#if LINUX_VERSION_IS_GEQ (3 ,5 ,0 ) && !defined(net_get_random_once)#define __BACKPORT_NET_GET_RANDOM_ONCE 1#endif #endif /* ___NET_RANDOM_STATIC_KEY_INIT */
@@ -97,7 +97,7 @@ bool __net_get_random_once(void *buf, int nbytes, bool *done,#endif /* __BACKPORT_NET_GET_RANDOM_ONCE */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,2 ,0 )#define sock_create_kern (net, family, type, proto, res) \ __sock_create(net, family, type, proto, res, 1)#endif
backport/backport-include/linux/netdev_features.h +3 -3
@@ -3,7 +3,7 @@#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,3 ,0 )#include <linux/netdevice.h> #include <linux/types.h>
@@ -20,7 +20,7 @@ typedef u32 netdev_features_t;#else #include_next <linux/netdev_features.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,10 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,10 ,0 )/* See commit f646968f8f on next-20130423 */ #define NETIF_F_HW_VLAN_CTAG_TX_BIT NETIF_F_HW_VLAN_TX_BIT#define NETIF_F_HW_VLAN_CTAG_RX_BIT NETIF_F_HW_VLAN_RX_BIT
@@ -31,7 +31,7 @@ typedef u32 netdev_features_t;#define NETIF_F_HW_VLAN_CTAG_TX NETIF_F_HW_VLAN_TX#endif -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,3,0) */ #if !defined(NETIF_F_RXCSUM )#define NETIF_F_RXCSUM 0
backport/backport-include/linux/netdevice.h +27 -27
145 lines not on this page · raw message
backport/backport-include/linux/netlink.h +1 -1
@@ -4,7 +4,7 @@#include <linux/version.h> /* this is for patches we apply */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,7 ,0 )#define netlink_notify_portid (__notify) (__notify->pid)#define NETLINK_CB_PORTID (__skb) NETLINK_CB(__skb).pid#else
backport/backport-include/linux/nl80211.h +1 -1
@@ -3,7 +3,7 @@#include_next <linux/nl80211.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,3 ,0 )#define NL80211_FEATURE_SK_TX_STATUS 0#endif
backport/backport-include/linux/of.h +20 -20
@@ -4,7 +4,7 @@#include <linux/version.h> #include_next <linux/of.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,7 ,0 )#ifdef CONFIG_OF extern struct device_node *of_get_child_by_name (const struct device_node *node,const char *name);
@@ -16,9 +16,9 @@ static inline struct device_node *of_get_child_by_name(return NULL ; }#endif /* CONFIG_OF */ -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,7,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,7 ,0 )#ifndef CONFIG_OF static inline struct device_node *of_find_node_by_name (struct device_node *from,const char *name)
@@ -26,9 +26,9 @@ static inline struct device_node *of_find_node_by_name(struct device_node *from,return NULL ; }#endif /* CONFIG_OF */ -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,7,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,8 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,8 ,0 )#define of_property_read_u8_array LINUX_BACKPORT(of_property_read_u8_array)#ifdef CONFIG_OF extern int of_property_read_u8_array(const struct device_node *np,
@@ -40,9 +40,9 @@ static inline int of_property_read_u8_array(const struct device_node *np,return -ENOSYS ; }#endif /* CONFIG_OF */ -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,8,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,1 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,1 ,0 )#define of_property_read_u32_array LINUX_BACKPORT(of_property_read_u32_array)#ifdef CONFIG_OF extern int of_property_read_u32_array(const struct device_node *np,
@@ -74,9 +74,9 @@ static inline const void *of_get_property(const struct device_node *node, }#endif -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,1,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,10 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,10 ,0 )#define of_property_read_u32_index LINUX_BACKPORT(of_property_read_u32_index)#ifdef CONFIG_OF extern int of_property_read_u32_index(const struct device_node *np,
@@ -89,9 +89,9 @@ static inline int of_property_read_u32_index(const struct device_node *np,return -ENOSYS ; }#endif /* CONFIG_OF */ -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,10,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,15 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,15 ,0 )#define of_property_count_elems_of_size LINUX_BACKPORT(of_property_count_elems_of_size)#ifdef CONFIG_OF extern int of_property_count_elems_of_size(const struct device_node *np,
@@ -103,10 +103,10 @@ static inline int of_property_count_elems_of_size(const struct device_node *np,return -ENOSYS ; }#endif /* CONFIG_OF */ -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,15,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,15 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,15 ,0 )/** * of_property_count_u32_elems - Count the number of u32 elements in a property *
@@ -124,9 +124,9 @@ static inline int of_property_count_u32_elems(const struct device_node *np, {return of_property_count_elems_of_size (np, propname,sizeof (u32)); } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,15,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,3 ,0 )#ifndef CONFIG_OF #define of_node_get LINUX_BACKPORT(of_node_get)/* Dummy ref counting routines - to be implemented later */
@@ -136,7 +136,7 @@ static inline struct device_node *of_node_get(struct device_node *node) }static inline void of_node_put (struct device_node *node) { }#endif /* CONFIG_OF */ -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,3,0) */ #ifndef of_match_ptr#ifdef CONFIG_OF
@@ -152,7 +152,7 @@ static inline void of_node_put(struct device_node *node) { } dn = of_find_compatible_node(dn, type, compatible))#endif /* for_each_compatible_node */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,3 ,0 )#ifndef CONFIG_OF static inline struct device_node *of_find_compatible_node( struct device_node *from,
@@ -164,7 +164,7 @@ static inline struct device_node *of_find_compatible_node(#endif #endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,18 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,18 ,0 )#define of_property_read_u64_array LINUX_BACKPORT(of_property_read_u64_array)#ifdef CONFIG_OF /* This is static in the kernel, but we need it in multiple places */
@@ -182,9 +182,9 @@ static inline int of_property_read_u64_array(const struct device_node *np,return -ENOSYS ; }#endif /* CONFIG_OF */ -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,15,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,6 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,6 ,0 )#define of_node_full_name LINUX_BACKPORT(of_node_full_name)#ifdef CONFIG_OF static inline const char *of_node_full_name (const struct device_node *np)
backport/backport-include/linux/of_address.h +2 -2
@@ -3,7 +3,7 @@#include_next <linux/of_address.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,4 ,0 ) && !defined(CONFIG_OF_ADDRESS ) +#if LINUX_VERSION_IS_LESS (4 ,4 ,0 ) && !defined(CONFIG_OF_ADDRESS )#ifndef OF_BAD_ADDR #define OF_BAD_ADDR ((u64)-1)#endif
@@ -13,6 +13,6 @@ static inline u64 of_translate_address(struct device_node *np, {return OF_BAD_ADDR ; } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0) */ +#endif /* LINUX_VERSION_IS_LESS(4,4,0) */ #endif /* __BACKPORT_OF_IRQ_H */
backport/backport-include/linux/of_irq.h +2 -2
@@ -3,13 +3,13 @@#include_next <linux/of_irq.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,5 ,0 ) && !defined(CONFIG_OF ) +#if LINUX_VERSION_IS_LESS (3 ,5 ,0 ) && !defined(CONFIG_OF )#define irq_of_parse_and_map LINUX_BACKPORT(irq_of_parse_and_map)static inline unsigned int irq_of_parse_and_map (struct device_node *dev,int index) {return 0 ; } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0) */ +#endif /* LINUX_VERSION_IS_LESS(4,5,0) */ #endif /* __BACKPORT_OF_IRQ_H */
backport/backport-include/linux/of_platform.h +6 -6
@@ -6,7 +6,7 @@/* upstream now includes this here and some people rely on it */ #include <linux/of_device.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,4 ,0 ) && !defined(CONFIG_OF_DEVICE ) +#if LINUX_VERSION_IS_LESS (3 ,4 ,0 ) && !defined(CONFIG_OF_DEVICE )struct of_dev_auxdata ;#define of_platform_populate LINUX_BACKPORT(of_platform_populate) static inline int of_platform_populate(struct device_node *root,
@@ -16,13 +16,13 @@ static inline int of_platform_populate(struct device_node *root, {return -ENODEV ; } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,4,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,11 ,0 ) && !defined(CONFIG_OF_DEVICE ) +#if LINUX_VERSION_IS_LESS (3 ,11 ,0 ) && !defined(CONFIG_OF_DEVICE )extern const struct of_device_id of_default_bus_match_table[]; -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,11,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,3 ,0 ) && !defined(CONFIG_OF_DEVICE ) +#if LINUX_VERSION_IS_LESS (4 ,3 ,0 ) && !defined(CONFIG_OF_DEVICE )struct of_dev_auxdata ;#define of_platform_default_populate \ LINUX_BACKPORT(of_platform_default_populate)
@@ -33,6 +33,6 @@ of_platform_default_populate(struct device_node *root, {return -ENODEV ; } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) */ +#endif /* LINUX_VERSION_IS_LESS(4,3,0) */ #endif /* __BACKPORT_LINUX_OF_PLATFORM_H */
backport/backport-include/linux/olpc-ec.h +2 -2
@@ -3,8 +3,8 @@#include <linux/version.h> -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,6 ,0 )) +#if LINUX_VERSION_IS_GEQ (3 ,6 ,0 )#include_next <linux/olpc-ec.h> -#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(3,6,0)) */ +#endif /* LINUX_VERSION_IS_GEQ(3,6,0) */ #endif /* _COMPAT_LINUX_OLPC_EC_H */
backport/backport-include/linux/page_ref.h +1 -1
@@ -1,7 +1,7 @@#ifndef __BP_PAGE_REF_H#define __BP_PAGE_REF_H#include <linux/version.h> -#if LINUX_VERSION_CODE >=KERNEL_VERSION (4 ,6 ,0 ) +#if LINUX_VERSION_IS_GEQ (4 ,6 ,0 )#include_next <linux/page_ref.h>#else static inline void page_ref_inc (struct page *page)
backport/backport-include/linux/pci.h +11 -11
@@ -17,7 +17,7 @@ pci_unregister_driver)#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,7 ,0 )#define pcie_capability_read_word LINUX_BACKPORT(pcie_capability_read_word)int pcie_capability_read_word (struct pci_dev *dev,int pos,u16 *val);#define pcie_capability_read_dword LINUX_BACKPORT(pcie_capability_read_dword)
@@ -78,7 +78,7 @@ static inline int pcie_capability_clear_dword(struct pci_dev *dev, int pos, .subvendor = (subvend), .subdevice = (subdev)#endif /* PCI_DEVICE_SUB */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,2 ,0 )#define pci_dev_flags LINUX_BACKPORT(pci_dev_flags)#define PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG LINUX_BACKPORT(PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG)#define PCI_DEV_FLAGS_NO_D3 LINUX_BACKPORT(PCI_DEV_FLAGS_NO_D3)
@@ -93,14 +93,14 @@ enum pci_dev_flags {/* Provide indication device is assigned by a Virtual Machine Manager */ PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) 4, }; -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,2,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,8 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,8 ,0 )#define pci_sriov_set_totalvfs LINUX_BACKPORT(pci_sriov_set_totalvfs)int pci_sriov_set_totalvfs (struct pci_dev *dev,u16 numvfs); -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,8,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,10 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,10 ,0 )/* Taken from drivers/pci/pci.h */ struct pci_sriov { int pos; /* capability position */
@@ -132,9 +132,9 @@ static inline int pci_vfs_assigned(struct pci_dev *dev) }#endif -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,10,0) */ -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,14 ,0 )) +#if LINUX_VERSION_IS_LESS (3 ,14 ,0 )#define pci_enable_msi_range LINUX_BACKPORT(pci_enable_msi_range)#ifdef CONFIG_PCI_MSI int pci_enable_msi_range (struct pci_dev *dev,int minvec,int maxvec);
@@ -146,7 +146,7 @@ static inline int pci_enable_msi_range(struct pci_dev *dev, int minvec,#endif #ifdef CONFIG_PCI -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,14 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,14 ,0 )#define pci_enable_msix_range LINUX_BACKPORT(pci_enable_msix_range)#ifdef CONFIG_PCI_MSI int pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries,
@@ -159,13 +159,13 @@ static inline int pci_enable_msix_range(struct pci_dev *dev,#endif #endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,13 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,13 ,0 )#define pci_device_is_present LINUX_BACKPORT(pci_device_is_present)bool pci_device_is_present (struct pci_dev *pdev);#endif #ifdef CONFIG_PCI -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,14 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,14 ,0 )#define pci_enable_msix_exact LINUX_BACKPORT(pci_enable_msix_exact)#ifdef CONFIG_PCI_MSI static inline int pci_enable_msix_exact(struct pci_dev *dev,
backport/backport-include/linux/phy.h +3 -3
@@ -4,12 +4,12 @@#include <linux/compiler.h> #include <linux/version.h> -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 )) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )#define phy_connect (dev, bus_id, handler, interface) \ phy_connect(dev, bus_id, handler, 0, interface)#endif -#if (LINUX_VERSION_CODE <KERNEL_VERSION (4 ,5 ,0 )) +#if LINUX_VERSION_IS_LESS (4 ,5 ,0 )#define phydev_name LINUX_BACKPORT(phydev_name)static inline const char *phydev_name (const struct phy_device *phydev) {
@@ -58,7 +58,7 @@ static inline void backport_mdiobus_unregister(struct mii_bus *bus)#define mdiobus_unregister LINUX_BACKPORT(mdiobus_unregister)#endif /* < 4.5 */ -#if (LINUX_VERSION_CODE <KERNEL_VERSION (4 ,5 ,0 )) +#if LINUX_VERSION_IS_LESS (4 ,5 ,0 )#define phydev_get_addr LINUX_BACKPORT(phydev_get_addr)static inline int phydev_get_addr (struct phy_device *phydev) {
backport/backport-include/linux/platform_data/media/si4713.h +1 -1
@@ -1,7 +1,7 @@#ifndef __BACKPORT_SI4713_H#define __BACKPORT_SI4713_H#include <linux/version.h> -#if LINUX_VERSION_CODE >=KERNEL_VERSION (4 ,5 ,0 ) +#if LINUX_VERSION_IS_GEQ (4 ,5 ,0 )#include_next <linux/platform_data/media/si4713.h>#else #include <media/si4713.h>
backport/backport-include/linux/platform_data/media/soc_camera_platform.h +1 -1
@@ -1,7 +1,7 @@#ifndef __BACKPORT_SOC_CAMERA_H__#define __BACKPORT_SOC_CAMERA_H__#include <linux/version.h> -#if LINUX_VERSION_CODE >=KERNEL_VERSION (4 ,5 ,0 ) +#if LINUX_VERSION_IS_GEQ (4 ,5 ,0 )#include_next <linux/platform_data/media/soc_camera_platform.h>#else #include <media/soc_camera_platform.h>
backport/backport-include/linux/platform_data/media/timb_radio.h +1 -1
@@ -1,7 +1,7 @@#ifndef __BACKPORT_TIMB_RADIO_#define __BACKPORT_TIMB_RADIO_#include <linux/version.h> -#if LINUX_VERSION_CODE >=KERNEL_VERSION (4 ,5 ,0 ) +#if LINUX_VERSION_IS_GEQ (4 ,5 ,0 )#include_next <linux/platform_data/media/timb_radio.h>#else #include <media/timb_radio.h>
backport/backport-include/linux/platform_data/media/timb_video.h +1 -1
@@ -1,7 +1,7 @@#ifndef __BACKPORT_TIMB_VIDEO_#define __BACKPORT_TIMB_VIDEO_#include <linux/version.h> -#if LINUX_VERSION_CODE >=KERNEL_VERSION (4 ,5 ,0 ) +#if LINUX_VERSION_IS_GEQ (4 ,5 ,0 )#include_next <linux/platform_data/media/timb_video.h>#else #include <media/timb_video.h>
backport/backport-include/linux/pm_qos.h +2 -2
@@ -3,11 +3,11 @@#include <linux/version.h> -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 )) +#if LINUX_VERSION_IS_GEQ (3 ,2 ,0 )#include_next <linux/pm_qos.h>#else #include <linux/pm_qos_params.h> -#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) */ +#endif /* LINUX_VERSION_IS_GEQ(3,2,0) */ #ifndef PM_QOS_DEFAULT_VALUE #define PM_QOS_DEFAULT_VALUE -1
backport/backport-include/linux/pm_runtime.h +2 -2
@@ -2,7 +2,7 @@#define __BACKPORT_PM_RUNTIME_H#include_next <linux/pm_runtime.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )#define pm_runtime_active LINUX_BACKPORT(pm_runtime_active)#ifdef CONFIG_PM static inline bool pm_runtime_active (struct device *dev)
@@ -14,6 +14,6 @@ static inline bool pm_runtime_active(struct device *dev)static inline bool pm_runtime_active (struct device *dev) {return true; }#endif /* CONFIG_PM */ -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,9,0) */ #endif /* __BACKPORT_PM_RUNTIME_H */
backport/backport-include/linux/poll.h +1 -1
@@ -3,7 +3,7 @@#include_next <linux/poll.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,4 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,4 ,0 )#define poll_does_not_wait LINUX_BACKPORT(poll_does_not_wait)static inline bool poll_does_not_wait (const poll_table *p) {
backport/backport-include/linux/printk.h +3 -3
@@ -6,7 +6,7 @@/* see pr_fmt at end of file */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )/* backports 7a555613 */ #if defined(CONFIG_DYNAMIC_DEBUG ) #define dynamic_hex_dump(prefix_str, prefix_type, rowsize, \
@@ -30,7 +30,7 @@ do { \ groupsize, buf, len, ascii)#endif /* defined(CONFIG_DYNAMIC_DEBUG) */ -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,9,0) */ #ifndef pr_warn#define pr_warn pr_warning
@@ -139,7 +139,7 @@ do { \#endif /* pr_debug_ratelimited */ /* replace hex_dump_to_buffer() with a version which returns the length */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,0 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,0 ,0 )#define hex_dump_to_buffer LINUX_BACKPORT(hex_dump_to_buffer) extern int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize, char *linebuf, size_t linebuflen,
backport/backport-include/linux/proc_fs.h +2 -2
@@ -3,7 +3,7 @@#include_next <linux/proc_fs.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,10 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,10 ,0 )#ifdef CONFIG_PROC_FS /*
@@ -24,6 +24,6 @@ static inline void proc_set_size(struct proc_dir_entry *de, loff_t size) {}static inline void proc_set_user (struct proc_dir_entry *de,kuid_t uid,kgid_t gid) {}#endif /* CONFIG_PROC_FS */ -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,10,0) */ #endif /* __BACKPORT_PROC_FS_H */
backport/backport-include/linux/ptp_clock_kernel.h +4 -4
@@ -4,7 +4,7 @@#include <linux/version.h> #include_next <linux/ptp_clock_kernel.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,5 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,5 ,0 )#include <linux/posix-clock.h> #define PTP_MAX_TIMESTAMPS 128
@@ -31,10 +31,10 @@ struct ptp_clock { };extern int ptp_clock_index (struct ptp_clock *ptp); -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,5,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 ) && !defined(CONFIG_SUSE_KERNEL ) +#if LINUX_VERSION_IS_LESS (3 ,7 ,0 ) && !defined(CONFIG_SUSE_KERNEL )#define ptp_clock_register (info,parent) ptp_clock_register(info) -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,7,0) */ #endif /* __BACKPORT_PTP_CLOCK_KERNEL_H */
backport/backport-include/linux/random.h +6 -6
@@ -3,16 +3,16 @@#include_next <linux/random.h>#include <linux/version.h> -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,3 ,0 ) &&LINUX_VERSION_CODE <KERNEL_VERSION (3 ,4 ,10 )) || \ - (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,1 ,0 ) &&LINUX_VERSION_CODE <KERNEL_VERSION (3 ,2 ,27 )) || \ -LINUX_VERSION_CODE <KERNEL_VERSION (3 ,0 ,41 ) +#if (LINUX_VERSION_IS_GEQ (3 ,3 ,0 ) &&LINUX_VERSION_IS_LESS (3 ,4 ,10 )) || \ + (LINUX_VERSION_IS_GEQ (3 ,1 ,0 ) &&LINUX_VERSION_IS_LESS (3 ,2 ,27 )) || \ +LINUX_VERSION_IS_LESS (3 ,0 ,41 )#define add_device_randomness LINUX_BACKPORT(add_device_randomness)static inline void add_device_randomness (const void *buf,unsigned int size) { }#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,8 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,8 ,0 )/* backports 496f2f9 */ #define prandom_seed (_seed) srandom32(_seed)#define prandom_u32 () random32()
@@ -22,7 +22,7 @@ static inline void add_device_randomness(const void *buf, unsigned int size)void prandom_bytes (void *buf,int bytes);#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,14 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,14 ,0 )/** * prandom_u32_max - returns a pseudo-random number in interval [0, ep_ro) * @ep_ro: right open interval endpoint
@@ -40,6 +40,6 @@ static inline u32 prandom_u32_max(u32 ep_ro) {return (u32)(((u64 )prandom_u32 () * ep_ro) >>32 ); } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,14,0) */ #endif /* __BACKPORT_RANDOM_H */
backport/backport-include/linux/rculist.h +1 -1
@@ -2,7 +2,7 @@#define __BACKPORT_RCULIST_H#include_next <linux/rculist.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )#include <backport/magic.h> #define hlist_for_each_entry_rcu4 (tpos, pos, head, member) \ for (pos = rcu_dereference_raw(hlist_first_rcu(head)); \
backport/backport-include/linux/regmap.h +4 -4
@@ -3,8 +3,8 @@#include_next <linux/regmap.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,5 ,0 ) && \ -LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,5 ,0 ) && \ +LINUX_VERSION_IS_GEQ (3 ,2 ,0 )#define dev_get_regmap LINUX_BACKPORT(dev_get_regmap)static inline struct regmap *dev_get_regmap (struct device *dev,const char *name)
@@ -13,8 +13,8 @@ struct regmap *dev_get_regmap(struct device *dev, const char *name) }#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,4 ,0 ) && \ -LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,4 ,0 ) && \ +LINUX_VERSION_IS_GEQ (3 ,2 ,0 )#if defined(CONFIG_REGMAP )#define devm_regmap_init LINUX_BACKPORT(devm_regmap_init) struct regmap *devm_regmap_init(struct device *dev,
backport/backport-include/linux/regulator/driver.h +4 -4
@@ -18,8 +18,8 @@#include <linux/version.h> #include_next <linux/regulator/driver.h> -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,13 ,0 )) && \ - (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,5 ,0 )) +#if LINUX_VERSION_IS_LESS (3 ,13 ,0 ) && \ +LINUX_VERSION_IS_GEQ (3 ,5 ,0 )#define devm_regulator_register LINUX_BACKPORT(devm_regulator_register)struct regulator_dev * devm_regulator_register(struct device *dev,
@@ -27,7 +27,7 @@ devm_regulator_register(struct device *dev, const struct regulator_config *config);#define devm_regulator_unregister LINUX_BACKPORT(devm_regulator_unregister)void devm_regulator_unregister (struct device *dev,struct regulator_dev *rdev); -#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)) && -(LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) */ +#endif /* LINUX_VERSION_IS_LESS(3,13,0) && +LINUX_VERSION_IS_GEQ(3,5,0) */ #endif /* __BACKPORT_LINUX_REGULATOR_DRIVER_H_ */
backport/backport-include/linux/rfkill.h +1 -1
@@ -2,7 +2,7 @@#define __COMPAT_RFKILL_H#include <linux/version.h> -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,10 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,10 ,0 )#include_next <linux/rfkill.h>#else /* API only slightly changed since then */
backport/backport-include/linux/rtnetlink.h +1 -1
@@ -13,7 +13,7 @@ lockdep_rtnl_is_held())#endif -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,19 ,0 )) +#if LINUX_VERSION_IS_LESS (3 ,19 ,0 )#define ndo_dflt_fdb_add (ndm, tb, dev, addr, vid, flags) \ ndo_dflt_fdb_add(ndm, tb, dev, addr, flags)#endif
backport/backport-include/linux/scatterlist.h +4 -4
@@ -6,7 +6,7 @@int sg_nents (struct scatterlist *sg);#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )/* * sg page iterator
@@ -76,9 +76,9 @@ void backport_sg_miter_stop(struct sg_mapping_iter *miter);for (__sg_page_iter_start ((piter), (sglist), (nents), (pgoffset)); \ __sg_page_iter_next(piter);) -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0) */ +#endif /* LINUX_VERSION_IS_LESS(3, 9, 0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,11 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,11 ,0 )size_t sg_copy_buffer (struct scatterlist *sgl,unsigned int nents,void *buf,size_t buflen,off_t skip,bool to_buffer);
@@ -100,6 +100,6 @@ size_t sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents,return sg_copy_buffer (sgl, nents, buf, buflen, skip, false); } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) */ +#endif /* LINUX_VERSION_IS_LESS(3, 11, 0) */ #endif /* __BACKPORT_SCATTERLIST_H */
backport/backport-include/linux/security.h +1 -1
@@ -2,7 +2,7 @@#define __BACKPORT_LINUX_SECURITY_H#include_next <linux/security.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,1 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,1 ,0 )/* * This has been defined in include/linux/security.h for some time, but was * only given an EXPORT_SYMBOL for 3.1. Add a compat_* definition to avoid
backport/backport-include/linux/seq_file.h +3 -3
@@ -3,7 +3,7 @@#include_next <linux/seq_file.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,7 ,0 )#include <linux/user_namespace.h> #include <linux/file.h> #include <linux/fs.h>
@@ -23,7 +23,7 @@ static inline struct user_namespace *seq_user_ns(struct seq_file *seq)#endif /* CONFIG_USER_NS */ #endif /* < 3.7 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,19 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,19 ,0 )#define seq_has_overflowed LINUX_BACKPORT(seq_has_overflowed)/** * seq_has_overflowed - check if the buffer has overflowed
@@ -41,7 +41,7 @@ static inline bool seq_has_overflowed(struct seq_file *m) }#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,3 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,3 ,0 )#define seq_hex_dump LINUX_BACKPORT(seq_hex_dump) void seq_hex_dump(struct seq_file *m, const char *prefix_str, int prefix_type, int rowsize, int groupsize, const void *buf, size_t len,
backport/backport-include/linux/skbuff.h +25 -25
152 lines not on this page · raw message
backport/backport-include/linux/slab.h +1 -1
@@ -3,7 +3,7 @@#include_next <linux/slab.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,4 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,4 ,0 )/* This backports: * * commit a8203725dfded5c1f79dca3368a4a273e24b59bb
backport/backport-include/linux/spi/spi.h +1 -1
@@ -18,7 +18,7 @@#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )/** * spi_message_init_with_transfers - Initialize spi_message and append transfers * @m: spi_message to be initialized
backport/backport-include/linux/static_key.h +2 -2
@@ -3,7 +3,7 @@#include <linux/version.h> -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,3 ,0 )/* kernels >= 3.3 */ +#if LINUX_VERSION_IS_GEQ (3 ,3 ,0 )/* kernels >= 3.3 */ /* * XXX: NOTE! *
@@ -13,7 +13,7 @@* kernels 3.3..3.4 don't have it and include <linux/jump_label.h> instead, * and for newer kernels include <linux/static_key.h>. */ -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,5 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,5 ,0 )#include_next <linux/static_key.h>#else #include <linux/jump_label.h>
backport/backport-include/linux/string.h +12 -12
@@ -3,24 +3,24 @@#include_next <linux/string.h>#include <linux/version.h> -#if (LINUX_VERSION_CODE <KERNEL_VERSION (4 ,5 ,0 )) +#if LINUX_VERSION_IS_LESS (4 ,5 ,0 )#define memdup_user_nul LINUX_BACKPORT(memdup_user_nul)extern void *memdup_user_nul (const void __user *,size_t );#endif /* this was added in v3.2.65, v3.4.106, v3.10.60, v3.12.33, v3.14.24, * v3.17.3 and v3.18 */ -#if !(LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,17 ,3 ) || \ - (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,14 ,24 ) && \ -LINUX_VERSION_CODE <KERNEL_VERSION (3 ,15 ,0 )) || \ - (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,12 ,33 ) && \ -LINUX_VERSION_CODE <KERNEL_VERSION (3 ,13 ,0 )) || \ - (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,10 ,60 ) && \ -LINUX_VERSION_CODE <KERNEL_VERSION (3 ,11 ,0 )) || \ - (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,4 ,106 ) && \ -LINUX_VERSION_CODE <KERNEL_VERSION (3 ,5 ,0 )) || \ - (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,65 ) && \ -LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 ))) +#if !(LINUX_VERSION_IS_GEQ (3 ,17 ,3 ) || \ + (LINUX_VERSION_IS_GEQ (3 ,14 ,24 ) && \ +LINUX_VERSION_IS_LESS (3 ,15 ,0 )) || \ + (LINUX_VERSION_IS_GEQ (3 ,12 ,33 ) && \ +LINUX_VERSION_IS_LESS (3 ,13 ,0 )) || \ + (LINUX_VERSION_IS_GEQ (3 ,10 ,60 ) && \ +LINUX_VERSION_IS_LESS (3 ,11 ,0 )) || \ + (LINUX_VERSION_IS_GEQ (3 ,4 ,106 ) && \ +LINUX_VERSION_IS_LESS (3 ,5 ,0 )) || \ + (LINUX_VERSION_IS_GEQ (3 ,2 ,65 ) && \ +LINUX_VERSION_IS_LESS (3 ,3 ,0 )))#define memzero_explicit LINUX_BACKPORT(memzero_explicit)void memzero_explicit (void *s,size_t count);#endif
backport/backport-include/linux/thermal.h +4 -4
@@ -35,11 +35,11 @@ static inline void thermal_notify_framework(struct thermal_zone_device *tz, { }#else /* < 3.8.0 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,10 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,10 ,0 )#define thermal_notify_framework notify_thermal_framework -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,10,0) */ -#if (LINUX_VERSION_CODE <KERNEL_VERSION (4 ,3 ,0 )) +#if LINUX_VERSION_IS_LESS (4 ,3 ,0 )typedef struct thermal_zone_device_ops old_thermal_zone_device_ops_t ;
@@ -108,7 +108,7 @@ void backport_thermal_zone_device_unregister(struct thermal_zone_device *);#define thermal_zone_device_unregister \ LINUX_BACKPORT(thermal_zone_device_unregister) -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) */ +#endif /* LINUX_VERSION_IS_LESS(4,3,0) */ #endif /* ! < 3.8.0 */ #endif /* __BACKPORT_LINUX_THERMAL_H */
backport/backport-include/linux/time64.h +3 -3
@@ -1,12 +1,12 @@#ifndef __BACKPORT_LINUX_TIME64_H#define __BACKPORT_LINUX_TIME64_H -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,17 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,17 ,0 )#include_next <linux/time64.h>#else #include <linux/time.h> #endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,17 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,17 ,0 )#define timespec64_equal timespec_equal#define timespec64_compare timespec_compare#define set_normalized_timespec64 set_normalized_timespec
@@ -19,6 +19,6 @@#define ns_to_timespec64 ns_to_timespec#define timespec64_add_ns timespec_add_ns#define timespec64 timespec -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,17,0) */ #endif /* __BACKPORT_LINUX_TIME64_H */
backport/backport-include/linux/timecounter.h +1 -1
@@ -1,7 +1,7 @@#ifndef __BACKPORT_LINUX_TIMECOUNTER_H#define __BACKPORT_LINUX_TIMECOUNTER_H -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,20 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,20 ,0 )#include_next <linux/timecounter.h>#else #include <linux/clocksource.h>
backport/backport-include/linux/timekeeping.h +3 -3
@@ -3,11 +3,11 @@#include <linux/version.h> #include <linux/types.h> -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,17 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,17 ,0 )#include_next <linux/timekeeping.h>#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,17 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,17 ,0 )#define ktime_get_ns LINUX_BACKPORT(ktime_get_ns)extern ktime_t ktime_get (void );#define ktime_get_ns LINUX_BACKPORT(ktime_get_ns)
@@ -24,7 +24,7 @@ static inline u64 ktime_get_boot_ns(void) }#endif /* < 3.17 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,19 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,19 ,0 )static inline time64_t ktime_get_seconds (void ) {struct timespec t;
backport/backport-include/linux/tty.h +6 -6
@@ -10,7 +10,7 @@#define EXTPROC 0200000#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,7 ,0 )/* Backports tty_lock: Localise the lock */ #define tty_lock (__tty) tty_lock()#define tty_unlock (__tty) tty_unlock()
@@ -19,15 +19,15 @@ tty_register_device(driver, index, device)#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,10 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,10 ,0 )extern void tty_port_tty_wakeup (struct tty_port *port);extern void tty_port_tty_hangup (struct tty_port *port,bool check_clocal); -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,10,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,1 ,0 ) && \ -LINUX_VERSION_CODE >=KERNEL_VERSION (4 ,0 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,1 ,0 ) && \ +LINUX_VERSION_IS_GEQ (4 ,0 ,0 )extern int tty_set_termios (struct tty_struct *tty,struct ktermios *kt); -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */ +#endif /* LINUX_VERSION_IS_LESS(4,1,0) */ #ifndef N_NCI #define N_NCI 25/* NFC NCI UART */
backport/backport-include/linux/tty_flip.h +1 -1
@@ -3,7 +3,7 @@#include_next <linux/tty_flip.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )#define tty_flip_buffer_push (port) tty_flip_buffer_push((port)->tty)#define tty_insert_flip_string (port, chars, size) tty_insert_flip_string((port)->tty, chars, size)#endif
backport/backport-include/linux/types.h +1 -1
@@ -3,7 +3,7 @@#include <linux/version.h> #include_next <linux/types.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,17 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,17 ,0 )typedef __s64 time64_t ;#endif
backport/backport-include/linux/u64_stats_sync.h +6 -6
@@ -3,7 +3,7 @@#include <linux/version.h> #include <generated/utsrelease.h> -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,6 ,0 )) +#if LINUX_VERSION_IS_GEQ (3 ,6 ,0 )#include_next <linux/u64_stats_sync.h>#else
@@ -112,9 +112,9 @@ static inline bool u64_stats_fetch_retry(const struct u64_stats_sync *syncp,#endif } -#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) */ +#endif /* LINUX_VERSION_IS_GEQ(3,6,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,15 ,0 ) && \ +#if LINUX_VERSION_IS_LESS (3 ,15 ,0 ) && \ !(LINUX_VERSION_CODE ==KERNEL_VERSION (3 ,13 ,11 ) &&UTS_UBUNTU_RELEASE_ABI >30 )static inline unsigned int u64_stats_fetch_begin_irq (const struct u64_stats_sync *syncp) {
@@ -141,14 +141,14 @@ static inline bool u64_stats_fetch_retry_irq(const struct u64_stats_sync *syncp,#endif } -#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */ +#endif /* LINUX_VERSION_IS_GEQ(3,15,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,13 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,13 ,0 )#if BITS_PER_LONG ==32 && defined(CONFIG_SMP )# define u64_stats_init (syncp) seqcount_init(syncp.seq)#else # define u64_stats_init (syncp) do { } while (0)#endif -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,13,0) */ #endif /* __BACKPORT_LINUX_U64_STATS_SYNC_H */
backport/backport-include/linux/uidgid.h +2 -2
@@ -1,4 +1,4 @@ -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,5 ,0 )) +#if LINUX_VERSION_IS_GEQ (3 ,5 ,0 )#include_next <linux/uidgid.h>#else
@@ -218,4 +218,4 @@ static inline bool kgid_has_mapping(struct user_namespace *ns, kgid_t gid)#endif /* CONFIG_USER_NS */ #endif /* _LINUX_UIDGID_H */ -#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */ +#endif /* LINUX_VERSION_IS_GEQ(3,5,0) */
backport/backport-include/linux/usb.h +2 -2
@@ -76,7 +76,7 @@#define USB_SUBCLASS_VENDOR_SPEC 0xff#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,2 ,0 )#define usb_translate_errors LINUX_BACKPORT(usb_translate_errors)static inline int usb_translate_errors (int error_code) {
@@ -90,6 +90,6 @@ static inline int usb_translate_errors(int error_code)return -EIO ; } } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,2,0) */ #endif /* __BACKPORT_USB_H */
backport/backport-include/linux/usb/ch9.h +2 -2
@@ -4,7 +4,7 @@#include <linux/version.h> #include_next <linux/usb/ch9.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,2 ,0 )#include <linux/types.h> /* __u8 etc */ #include <asm/byteorder.h> /* le16_to_cpu */
@@ -21,7 +21,7 @@ static inline int usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd) }#endif /* < 3.2 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,6 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,6 ,0 )#define USB_SPEED_SUPER_PLUS 6#endif
backport/backport-include/linux/version.h +1 -2
@@ -13,6 +13,5 @@#define LINUX_VERSION_IS_LESS (x1,x2,x3) (LINUX_VERSION_CODE < KERNEL_VERSION(x1,x2,x3))#define LINUX_VERSION_IS_GEQ (x1,x2,x3) (LINUX_VERSION_CODE >= KERNEL_VERSION(x1,x2,x3))#define LINUX_VERSION_IN_RANGE (x1,x2,x3, y1,y2,y3) \ - (LINUX_VERSION_CODE >= KERNEL_VERSION(x1,x2,x3) && \ - LINUX_VERSION_CODE < KERNEL_VERSION(y1,y2,y3)) + (LINUX_VERSION_IS_GEQ(x1,x2,x3) && LINUX_VERSION_IS_LESS(y1,y2,y3))#endif /* _BP_LINUX_VERSION_H */
backport/backport-include/linux/wait.h +5 -5
@@ -2,7 +2,7 @@#define __BACKPORT_LINUX_WAIT_H#include_next <linux/wait.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,17 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,17 ,0 )extern int bit_wait (void *);extern int bit_wait_io (void *);
@@ -23,7 +23,7 @@ backport_wait_on_bit_io(void *word, int bit, unsigned mode)#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,18 ,12 ) +#if LINUX_VERSION_IS_LESS (3 ,18 ,12 )#define WQ_FLAG_WOKEN 0x02#define wait_woken LINUX_BACKPORT(wait_woken)
@@ -37,8 +37,8 @@ int woken_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);* This was introuced in kernel 3.17 and we are only able to backport this * function on these kernel versions. */ -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,17 ,0 ) -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,18 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,17 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,18 ,0 )#define out_of_line_wait_on_bit_timeout LINUX_BACKPORT(out_of_line_wait_on_bit_timeout)int out_of_line_wait_on_bit_timeout (void *,int ,wait_bit_action_f *,unsigned ,unsigned long );
@@ -46,7 +46,7 @@ int out_of_line_wait_on_bit_timeout(void *, int, wait_bit_action_f *, unsigned,extern int bit_wait_timeout (struct wait_bit_key *);#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,20 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,20 ,0 )#define wait_on_bit_timeout LINUX_BACKPORT(wait_on_bit_timeout)/** * wait_on_bit_timeout - wait for a bit to be cleared or a timeout elapses
backport/backport-include/linux/watchdog.h +1 -1
@@ -2,7 +2,7 @@#define __BACKPORT_WATCHDOG_H#include_next <linux/watchdog.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,1 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,1 ,0 )#define watchdog_device LINUX_BACKPORT(watchdog_device)struct watchdog_device { };
backport/backport-include/linux/workqueue.h +4 -4
@@ -3,7 +3,7 @@#include_next <linux/workqueue.h>#include <linux/version.h> -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 )) +#if LINUX_VERSION_IS_LESS (3 ,7 ,0 )#define mod_delayed_work LINUX_BACKPORT(mod_delayed_work)bool mod_delayed_work (struct workqueue_struct *wq,struct delayed_work *dwork,unsigned long delay);
@@ -14,7 +14,7 @@ bool mod_delayed_work(struct workqueue_struct *wq, struct delayed_work *dwork,#define create_freezable_workqueue create_freezeable_workqueue#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,3 ,0 )#define __WQ_ORDERED 0/* * commit b196be89cdc14a88cc637cdad845a75c5886c82d
@@ -54,13 +54,13 @@ backport_alloc_workqueue(const char *fmt, unsigned int flags,void backport_destroy_workqueue (struct workqueue_struct *wq);#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,11 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,11 ,0 )/* power efficient workqueues were added in commit 0668106ca386. */ #define system_power_efficient_wq system_wq#define system_freezable_power_efficient_wq system_freezable_wq#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,1 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,1 ,0 )#define drain_workqueue (wq) flush_workqueue(wq)#endif
backport/backport-include/net/addrconf.h +2 -2
@@ -5,7 +5,7 @@#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )static inline bool ipv6_addr_is_solict_mult (const struct in6_addr *addr) {#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS ) &&BITS_PER_LONG ==64
@@ -20,6 +20,6 @@ static inline bool ipv6_addr_is_solict_mult(const struct in6_addr *addr) (addr->s6_addr[12] ^ 0xff)) == 0;#endif } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,9,0) */ #endif /* _BACKPORT_NET_ADDRCONF_H */
backport/backport-include/net/flow_keys.h +1 -1
@@ -1,4 +1,4 @@ -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,3 ,0 )) +#if LINUX_VERSION_IS_GEQ (3 ,3 ,0 )#include_next <net/flow_keys.h>#else
backport/backport-include/net/genetlink.h +6 -6
@@ -4,7 +4,7 @@#include <linux/version.h> /* this is for patches we apply */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,7 ,0 )#define genl_info_snd_portid (__genl_info) (__genl_info->snd_pid)#else #define genl_info_snd_portid (__genl_info) (__genl_info->snd_portid)
@@ -14,11 +14,11 @@#define GENLMSG_DEFAULT_SIZE (NLMSG_DEFAULT_SIZE - GENL_HDRLEN)#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,1 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,1 ,0 )#define genl_dump_check_consistent (cb, user_hdr, family)#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,13 ,0 ) &&RHEL_RELEASE_CODE <RHEL_RELEASE_VERSION (7 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,13 ,0 ) &&RHEL_RELEASE_CODE <RHEL_RELEASE_VERSION (7 ,0 )static inline int __real_genl_register_family (struct genl_family *family) {return genl_register_family (family);
@@ -86,7 +86,7 @@ _genl_register_family_with_ops_grps(struct genl_family *family,#define genl_unregister_family backport_genl_unregister_familyint genl_unregister_family (struct genl_family *family); -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,3 ,0 )extern void genl_notify (struct sk_buff *skb,struct net *net,u32 pid,u32 group,struct nlmsghdr *nlh,gfp_t flags);#endif
@@ -146,7 +146,7 @@ backport_genlmsg_multicast_allns(struct genl_family *family,#define __genl_const#else /* < 3.13 */ #define __genl_const const -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,4 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,4 ,0 )#define genl_notify (_fam, _skb, _info, _group, _flags) \ genl_notify(_fam, _skb, genl_info_net(_info), \ genl_info_snd_portid(_info), \
@@ -154,7 +154,7 @@ backport_genlmsg_multicast_allns(struct genl_family *family,#endif /* < 4.4 */ #endif /* < 3.13 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,10 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,10 ,0 )/** * genl_family_attrbuf - return family's attrbuf * @family: the family
backport/backport-include/net/inet_frag.h +8 -8
@@ -3,7 +3,7 @@#include_next <net/inet_frag.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )/* Memory Tracking Functions. */ #define frag_mem_limit LINUX_BACKPORT(frag_mem_limit)static inline int frag_mem_limit (struct netns_frags *nf)
@@ -26,10 +26,10 @@ static inline int sum_frag_mem_limit(struct netns_frags *nf)#define inet_frag_maybe_warn_overflow LINUX_BACKPORT(inet_frag_maybe_warn_overflow)void inet_frag_maybe_warn_overflow (struct inet_frag_queue *q,const char *prefix); -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,9,0) */ /* the type of the paramater changed with kernel 4.3 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )#define sub_frag_mem_limit LINUX_BACKPORT(sub_frag_mem_limit)static inline void sub_frag_mem_limit (struct netns_frags *nf,int i) {
@@ -41,7 +41,7 @@ static inline void add_frag_mem_limit(struct netns_frags *nf, int i) {atomic_add (i, &nf->mem); } -#elif LINUX_VERSION_CODE <KERNEL_VERSION (4 ,3 ,0 ) +#elif LINUX_VERSION_IS_LESS (4 ,3 ,0 )#define sub_frag_mem_limit LINUX_BACKPORT(sub_frag_mem_limit)static inline void sub_frag_mem_limit (struct netns_frags *nf,int i) {
@@ -53,10 +53,10 @@ static inline void add_frag_mem_limit(struct netns_frags *nf, int i) {__percpu_counter_add (&nf->mem, i, frag_percpu_counter_batch); } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) */ +#endif /* LINUX_VERSION_IS_LESS(4,3,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,4 ,0 ) && \ -LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,4 ,0 ) && \ +LINUX_VERSION_IS_GEQ (3 ,9 ,0 )#define inet_frags_uninit_net LINUX_BACKPORT(inet_frags_uninit_net)static inline void inet_frags_uninit_net (struct netns_frags *nf) {
@@ -64,7 +64,7 @@ static inline void inet_frags_uninit_net(struct netns_frags *nf) }#endif /* < 4.4 && >= 3.9 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,4 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,4 ,0 )static inline int backport_inet_frags_init_net (struct netns_frags *nf) {inet_frags_init_net (nf);
backport/backport-include/net/ip.h +1 -1
@@ -3,7 +3,7 @@#include_next <net/ip.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,1 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,1 ,0 )/* Backports 56f8a75c */ static inline bool ip_is_fragment (const struct iphdr *iph) {
backport/backport-include/net/ip6_fib.h +2 -2
@@ -9,7 +9,7 @@* This function is avaliable with one argument since kernel 3.10, but the * secound one was added in 4.2. */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,2 ,0 )#define rt6_nexthop LINUX_BACKPORT(rt6_nexthop)static inline struct in6_addr *rt6_nexthop (struct rt6_info *rt,struct in6_addr *daddr)
@@ -21,6 +21,6 @@ static inline struct in6_addr *rt6_nexthop(struct rt6_info *rt, else return daddr; } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) */ +#endif /* LINUX_VERSION_IS_LESS(4,2,0) */ #endif /* __BACKPORT_NET_IP6_ROUTE_H */
backport/backport-include/net/ipv6.h +4 -4
@@ -5,7 +5,7 @@#include <net/addrconf.h> #include <net/inet_frag.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,7 ,0 )/* * Equivalent of ipv4 struct ip */
@@ -21,9 +21,9 @@ struct frag_queue {unsigned int csum;__u16 nhoffset; }; -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,7,0) */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,6 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,6 ,0 )#define ipv6_addr_hash LINUX_BACKPORT(ipv6_addr_hash)static inline u32 ipv6_addr_hash (const struct in6_addr *a) {
@@ -39,7 +39,7 @@ static inline u32 ipv6_addr_hash(const struct in6_addr *a) }#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,5 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,5 ,0 )#define ipv6_addr_prefix_copy LINUX_BACKPORT(ipv6_addr_prefix_copy) static inline void ipv6_addr_prefix_copy(struct in6_addr *addr, const struct in6_addr *pfx,
backport/backport-include/net/iw_handler.h +9 -9
@@ -2,7 +2,7 @@#define __BACKPORT_IW_HANDLER_H#include_next <net/iw_handler.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,1 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,1 ,0 )static inline char *iwe_stream_add_event_check (struct iw_request_info *info,char *stream,char *ends,struct iw_event *iwe,int event_len)
@@ -24,16 +24,16 @@ iwe_stream_add_point_check(struct iw_request_info *info, char *stream,return ERR_PTR (-E2BIG ); return res; } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */ +#endif /* LINUX_VERSION_IS_LESS(4,1,0) */ /* this was added in v3.2.79, v3.18.30, v4.1.21, v4.4.6 and 4.5 */ -#if !(LINUX_VERSION_CODE >=KERNEL_VERSION (4 ,4 ,6 ) || \ - (LINUX_VERSION_CODE >=KERNEL_VERSION (4 ,1 ,21 ) && \ -LINUX_VERSION_CODE <KERNEL_VERSION (4 ,2 ,0 )) || \ - (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,18 ,30 ) && \ -LINUX_VERSION_CODE <KERNEL_VERSION (3 ,19 ,0 )) || \ - (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,79 ) && \ -LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 ))) +#if !(LINUX_VERSION_IS_GEQ (4 ,4 ,6 ) || \ + (LINUX_VERSION_IS_GEQ (4 ,1 ,21 ) && \ +LINUX_VERSION_IS_LESS (4 ,2 ,0 )) || \ + (LINUX_VERSION_IS_GEQ (3 ,18 ,30 ) && \ +LINUX_VERSION_IS_LESS (3 ,19 ,0 )) || \ + (LINUX_VERSION_IS_GEQ (3 ,2 ,79 ) && \ +LINUX_VERSION_IS_LESS (3 ,3 ,0 )))#define wireless_nlevent_flush LINUX_BACKPORT(wireless_nlevent_flush)static inline void wireless_nlevent_flush (void ) {}#endif
backport/backport-include/net/net_namespace.h +3 -3
@@ -3,7 +3,7 @@#include_next <net/net_namespace.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,20 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,20 ,0 )/* * In older kernels we simply fail this function. */
@@ -14,7 +14,7 @@ static inline struct net *get_net_ns_by_fd(int fd) }#endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) +#if LINUX_VERSION_IS_LESS(4,1,0) typedef struct { #ifdef CONFIG_NET_NS struct net *net;
@@ -39,6 +39,6 @@ static inline struct net *possible_read_pnet(const possible_net_t *pnet)#else #define possible_write_pnet (pnet, net) write_pnet(pnet, net)#define possible_read_pnet (pnet) read_pnet(pnet) -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */ +#endif /* LINUX_VERSION_IS_LESS(4,1,0) */ #endif /* _COMPAT_NET_NET_NAMESPACE_H */
backport/backport-include/net/netlink.h +7 -7
@@ -4,7 +4,7 @@#include <linux/version.h> #include <linux/in6.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,7 ,0 )/** * nla_put_s8 - Add a s8 netlink attribute to a socket buffer * @skb: socket buffer to add attribute to
@@ -86,7 +86,7 @@ static inline s64 nla_get_s64(const struct nlattr *nla) }#endif /* < 3.7.0 */ -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,5 ,0 )) +#if LINUX_VERSION_IS_LESS (3 ,5 ,0 )/* * This backports: * commit 569a8fc38367dfafd87454f27ac646c8e6b54bca
@@ -115,7 +115,7 @@ static inline int nla_put_be64(struct sk_buff *skb, int attrtype, __be64 value) }#endif /* < 3.5 */ -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 )) +#if LINUX_VERSION_IS_LESS (3 ,7 ,0 )#define NLA_S8 (NLA_BINARY + 1)#define NLA_S16 (NLA_BINARY + 2)#define NLA_S32 (NLA_BINARY + 3)
@@ -126,7 +126,7 @@ static inline int nla_put_be64(struct sk_buff *skb, int attrtype, __be64 value)#define NLA_TYPE_MAX (__NLA_TYPE_MAX - 1)#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,1 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,1 ,0 )#define nla_put_in_addr LINUX_BACKPORT(nla_put_in_addr)static inline int nla_put_in_addr (struct sk_buff *skb,int attrtype,__be32 addr)
@@ -155,7 +155,7 @@ static inline struct in6_addr nla_get_in6_addr(const struct nlattr *nla) }#endif /* < 4.1 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,4 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,4 ,0 )/** * nla_get_le32 - return payload of __le32 attribute * @nla: __le32 netlink attribute
@@ -177,7 +177,7 @@ static inline __le64 nla_get_le64(const struct nlattr *nla) }#endif /* < 4.4 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,7 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,7 ,0 )/** * nla_need_padding_for_64bit - test 64-bit alignment of the next attribute * @skb: socket buffer the message is stored in
@@ -275,7 +275,7 @@ static inline int nla_put_s64(struct sk_buff *skb, int attrtype, s64 value, }#endif /* < 4.7 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,10 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,10 ,0 )/** * nla_memdup - duplicate attribute memory (kmemdup) * @src: netlink attribute to duplicate from
backport/backport-include/net/sch_generic.h +3 -3
@@ -2,8 +2,8 @@#define __BACKPORT_NET_SCH_GENERIC_H#include_next <net/sch_generic.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 ) -#if !((LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,9 ) &&LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 )) || (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,0 ,23 ) &&LINUX_VERSION_CODE <KERNEL_VERSION (3 ,1 ,0 ))) +#if LINUX_VERSION_IS_LESS (3 ,3 ,0 ) +#if !((LINUX_VERSION_IS_GEQ (3 ,2 ,9 ) &&LINUX_VERSION_IS_LESS (3 ,3 ,0 )) || (LINUX_VERSION_IS_GEQ (3 ,0 ,23 ) &&LINUX_VERSION_IS_LESS (3 ,1 ,0 )))/* mask qdisc_cb_private_validate as RHEL6 backports this */ #define qdisc_cb_private_validate (a,b) compat_qdisc_cb_private_validate(a,b)static inline void qdisc_cb_private_validate (const struct sk_buff *skb,int sz)
@@ -11,7 +11,7 @@ static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)BUILD_BUG_ON (sizeof (skb->cb) <sizeof (struct qdisc_skb_cb ) + sz); }#endif -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,3,0) */ #ifndef TCQ_F_CAN_BYPASS #define TCQ_F_CAN_BYPASS 4
backport/backport-include/net/sock.h +5 -5
@@ -3,7 +3,7 @@#include_next <net/sock.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,9 ,0 )#include <backport/magic.h> #define sk_for_each3 (__sk, node, list) \
@@ -27,7 +27,7 @@#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,10 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,10 ,0 )/* * backport SOCK_SELECT_ERR_QUEUE -- see commit * "net: add option to enable error queue packets waking select"
@@ -43,11 +43,11 @@ BUILD_BUG_ON((size) > FIELD_SIZEOF(struct sk_buff, cb))#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,2 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,2 ,0 )#define sk_alloc (net, family, priority, prot, kern) sk_alloc(net, family, priority, prot)#endif -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,5 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,5 ,0 )#define sk_set_bit LINUX_BACKPORT(sk_set_bit)static inline void sk_set_bit (int nr,struct sock *sk) {
@@ -55,7 +55,7 @@ static inline void sk_set_bit(int nr, struct sock *sk) }#endif /* < 4.5 */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,5 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,5 ,0 )#define sk_clear_bit LINUX_BACKPORT(sk_clear_bit)static inline void sk_clear_bit (int nr,struct sock *sk) {
backport/backport-include/net/tso.h +1 -1
@@ -3,7 +3,7 @@#include <net/ip.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,4 ,0 ) +#if LINUX_VERSION_IS_LESS (4 ,4 ,0 )#define tso_t LINUX_BACKPORT(tso_t) struct tso_t {
backport/backport-include/sound/core.h +1 -1
@@ -2,7 +2,7 @@#define _BACKPORT_SOUND_CORE_H#include_next <sound/core.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,15 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,15 ,0 )#define snd_card_new LINUX_BACKPORT(snd_card_new) static inline int snd_card_new(struct device *parent, int idx, const char *xid,
backport/backport-include/sound/pcm.h +2 -2
@@ -3,7 +3,7 @@#include_next <sound/pcm.h>#include <linux/version.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,19 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,19 ,0 )/** * snd_pcm_stop_xrun - stop the running streams as XRUN * @substream: the PCM substream instance
@@ -24,6 +24,6 @@ static inline int snd_pcm_stop_xrun(struct snd_pcm_substream *substream)snd_pcm_stream_unlock_irqrestore (substream, flags);return ret; } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,19,0) */ #endif /* __BACKPORT_SOUND_PCM_H */
backport/backport-include/uapi/linux/genetlink.h +1 -1
@@ -1,7 +1,7 @@#ifndef __BACKPORT_UAPI_LINUX_GENETLINK_H#define __BACKPORT_UAPI_LINUX_GENETLINK_H#include <linux/version.h> -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,7 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,7 ,0 )#include_next <uapi/linux/genetlink.h>#else #include_next <linux/genetlink.h>
backport/backport-include/uapi/linux/sockios.h +2 -2
@@ -25,7 +25,7 @@* supported and meats the expected form. */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,14 ,0 ) +#if LINUX_VERSION_IS_LESS (3 ,14 ,0 )#define SIOCGHWTSTAMP 0x89b1/* get config */ -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) */ +#endif /* LINUX_VERSION_IS_LESS(3,14,0) */ #endif /* __BACKPORT_LINUX_SOCKIOS_H */
backport/compat/backport-3.13.c +4 -4
@@ -17,7 +17,7 @@#include <linux/device.h> #include <linux/hwmon.h> -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,5 ,0 )) +#if LINUX_VERSION_IS_GEQ (3 ,5 ,0 )#ifdef CONFIG_REGULATOR #include <linux/module.h> #include <linux/regulator/driver.h>
@@ -90,7 +90,7 @@ void devm_regulator_unregister(struct device *dev, struct regulator_dev *rdev) }EXPORT_SYMBOL_GPL (devm_regulator_unregister);#endif /* CONFIG_REGULATOR */ -#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) */ +#endif /* LINUX_VERSION_IS_GEQ(3,5,0) */ /************* generic netlink backport *****************/ #if RHEL_RELEASE_CODE <RHEL_RELEASE_VERSION (7 ,0 )
@@ -111,10 +111,10 @@ int __backport_genl_register_family(struct genl_family *family)__copy (netnsok);__copy (pre_doit);__copy (post_doit); -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,10 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,10 ,0 )__copy (parallel_ops);#endif -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,11 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,11 ,0 )__copy (module);#endif #undef __copy
backport/compat/backport-3.18.c +13 -13
@@ -167,7 +167,7 @@ struct sk_buff *skb_clone_sk(struct sk_buff *skb) }EXPORT_SYMBOL_GPL (skb_clone_sk); -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,3 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,3 ,0 )/* * skb_complete_wifi_ack() needs to get backported, because the version from * 3.18 added the sock_hold() and sock_put() calles missing in older versions.
@@ -198,7 +198,7 @@ void skb_complete_wifi_ack(struct sk_buff *skb, bool acked)EXPORT_SYMBOL_GPL (skb_complete_wifi_ack);#endif -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,17 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,17 ,0 ) int __sched out_of_line_wait_on_bit_timeout(void *word,int bit,wait_bit_action_f *action,unsigned mode,unsigned long timeout)
@@ -288,17 +288,17 @@ int of_property_read_u64_array(const struct device_node *np,EXPORT_SYMBOL_GPL (of_property_read_u64_array);#endif /* CONFIG_OF */ -#if !(LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,17 ,3 ) || \ - (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,14 ,24 ) && \ -LINUX_VERSION_CODE <KERNEL_VERSION (3 ,15 ,0 )) || \ - (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,12 ,33 ) && \ -LINUX_VERSION_CODE <KERNEL_VERSION (3 ,13 ,0 )) || \ - (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,10 ,60 ) && \ -LINUX_VERSION_CODE <KERNEL_VERSION (3 ,11 ,0 )) || \ - (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,4 ,106 ) && \ -LINUX_VERSION_CODE <KERNEL_VERSION (3 ,5 ,0 )) || \ - (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,65 ) && \ -LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 ))) +#if !(LINUX_VERSION_IS_GEQ (3 ,17 ,3 ) || \ + (LINUX_VERSION_IS_GEQ (3 ,14 ,24 ) && \ +LINUX_VERSION_IS_LESS (3 ,15 ,0 )) || \ + (LINUX_VERSION_IS_GEQ (3 ,12 ,33 ) && \ +LINUX_VERSION_IS_LESS (3 ,13 ,0 )) || \ + (LINUX_VERSION_IS_GEQ (3 ,10 ,60 ) && \ +LINUX_VERSION_IS_LESS (3 ,11 ,0 )) || \ + (LINUX_VERSION_IS_GEQ (3 ,4 ,106 ) && \ +LINUX_VERSION_IS_LESS (3 ,5 ,0 )) || \ + (LINUX_VERSION_IS_GEQ (3 ,2 ,65 ) && \ +LINUX_VERSION_IS_LESS (3 ,3 ,0 )))/** * memzero_explicit - Fill a region of memory (e.g. sensitive * keying data) with 0s.
backport/compat/backport-3.19.c +1 -1
@@ -16,7 +16,7 @@#include <linux/skbuff.h> #include <linux/debugfs.h> -#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,18 ,12 ) +#if LINUX_VERSION_IS_LESS (3 ,18 ,12 )static inline bool is_kthread_should_stop (void ) {return (current->flags &PF_KTHREAD ) &&kthread_should_stop ();
backport/compat/backport-4.1.c +2 -2
@@ -21,7 +21,7 @@ netdev_features_t passthru_features_check(struct sk_buff *skb,EXPORT_SYMBOL_GPL (passthru_features_check);#ifdef CONFIG_TTY -#if LINUX_VERSION_CODE >=KERNEL_VERSION (4 ,0 ,0 ) +#if LINUX_VERSION_IS_GEQ (4 ,0 ,0 )static void unset_locked_termios (struct ktermios *termios,struct ktermios *old,struct ktermios *locked)
@@ -80,5 +80,5 @@ int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)return 0 ; }EXPORT_SYMBOL_GPL (tty_set_termios); -#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) */ +#endif /* LINUX_VERSION_IS_GEQ(4,0,0) */ #endif /* CONFIG_TTY */
backport/compat/backport-4.3.c +4 -4
@@ -96,7 +96,7 @@ static int backport_thermal_get_crit_temp(struct thermal_zone_device *dev,return ret; } -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,19 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,19 ,0 )static int backport_thermal_set_emul_temp (struct thermal_zone_device *dev,unsigned long temp) {
@@ -105,7 +105,7 @@ static int backport_thermal_set_emul_temp(struct thermal_zone_device *dev,return wrapper->driver_ops->set_emul_temp (dev, (int )temp); } -#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */ +#endif /* LINUX_VERSION_IS_GEQ(3, 19, 0) */ struct thermal_zone_device *backport_thermal_zone_device_register( const char *type, int trips, int mask, void *devdata,
@@ -146,9 +146,9 @@ struct thermal_zone_device *backport_thermal_zone_device_register(assign_ops (get_trip_hyst);assign_ops (set_trip_hyst);assign_ops (get_crit_temp); -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,19 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,19 ,0 )assign_ops (set_emul_temp); -#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */ +#endif /* LINUX_VERSION_IS_GEQ(3, 19, 0) */ #undef assign_ops ret = old_thermal_zone_device_register(type, trips, mask, devdata,
backport/compat/backport-4.4.c +1 -1
@@ -20,7 +20,7 @@#include <asm/unaligned.h> #ifdef CONFIG_DEBUG_FS -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) +#if LINUX_VERSION_IS_LESS(4,3,0) static ssize_t debugfs_read_file_bool(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) {
backport/compat/backport-4.5.c +3 -3
@@ -20,7 +20,7 @@#include <linux/string.h> #include <asm/uaccess.h> -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,19 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,19 ,0 )int led_set_brightness_sync (struct led_classdev *led_cdev,enum led_brightness value) {
@@ -40,7 +40,7 @@ int led_set_brightness_sync(struct led_classdev *led_cdev,EXPORT_SYMBOL_GPL (led_set_brightness_sync);#endif /* >= 3.19 */ -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,2 ,0 )/** * no_seek_end_llseek - llseek implementation for fixed-sized devices * @file: file structure to seek on
@@ -52,7 +52,7 @@ loff_t no_seek_end_llseek(struct file *file, loff_t offset, int whence) {switch (whence) {case SEEK_SET :case SEEK_CUR : -#if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,6 ,0 ) +#if LINUX_VERSION_IS_GEQ (3 ,6 ,0 )return generic_file_llseek_size (file, offset, whence, ~0ULL ,0 );#else
backport/compat/compat-3.3.c +3 -3
@@ -25,10 +25,10 @@ static void __copy_skb_header(struct sk_buff *new, const struct sk_buff *old) new->mac_header = old->mac_header;skb_dst_copy (new, old); new->rxhash = old->rxhash; -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,1 ,0 )) +#if LINUX_VERSION_IS_GEQ (3 ,1 ,0 ) new->ooo_okay = old->ooo_okay;#endif -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 )) +#if LINUX_VERSION_IS_GEQ (3 ,2 ,0 ) new->l4_rxhash = old->l4_rxhash;#endif #ifdef CONFIG_XFRM
@@ -145,7 +145,7 @@ struct sk_buff *__pskb_copy(struct sk_buff *skb, int headroom, gfp_t gfp_mask)#endif for (i =0 ; i <skb_shinfo (skb)->nr_frags; i++) {skb_shinfo (n)->frags[i] =skb_shinfo (skb)->frags[i]; -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 )) +#if LINUX_VERSION_IS_GEQ (3 ,2 ,0 )skb_frag_ref (skb, i);#else get_page (skb_shinfo (skb)->frags[i].page);
backport/compat/compat-3.4.c +4 -4
@@ -14,13 +14,13 @@#include <linux/compat.h> #include <asm/uaccess.h> -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 )) +#if LINUX_VERSION_IS_GEQ (3 ,2 ,0 )#include <linux/regmap.h> #include <linux/i2c.h> #include <linux/spi/spi.h> -#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) */ +#endif /* LINUX_VERSION_IS_GEQ(3,2,0) */ -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 )) +#if LINUX_VERSION_IS_GEQ (3 ,2 ,0 )#if defined(CONFIG_REGMAP )static void devm_regmap_release (struct device *dev,void *res)
@@ -172,7 +172,7 @@ EXPORT_SYMBOL_GPL(devm_regmap_init_i2c);#endif /* defined(CONFIG_REGMAP_I2C) */ #endif /* defined(CONFIG_REGMAP) */ -#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) */ +#endif /* LINUX_VERSION_IS_GEQ(3,2,0) */ int simple_open (struct inode *inode,struct file *file) {
backport/compat/compat-3.5.c +2 -2
@@ -15,7 +15,7 @@#include <linux/gpio.h> #include <linux/ptp_clock_kernel.h> -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 )) +#if LINUX_VERSION_IS_GEQ (3 ,2 ,0 )#include <linux/device.h> /**
@@ -47,7 +47,7 @@ int devres_release(struct device *dev, dr_release_t release, return 0; }EXPORT_SYMBOL_GPL (devres_release); -#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) */ +#endif /* LINUX_VERSION_IS_GEQ(3,2,0) */ /* * Commit 7a4e7408c5cadb240e068a662251754a562355e3
backport/compat/compat-3.7.c +2 -2
@@ -254,7 +254,7 @@ EXPORT_SYMBOL_GPL(pcie_capability_clear_and_set_dword);#endif #ifdef CONFIG_OF -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,0 )) +#if LINUX_VERSION_IS_LESS (3 ,7 ,0 )/** * of_get_child_by_name - Find the child node by name for a given parent * @node: parent node
@@ -277,7 +277,7 @@ struct device_node *of_get_child_by_name(const struct device_node *node,return child; }EXPORT_SYMBOL_GPL (of_get_child_by_name); -#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)) */ +#endif /* LINUX_VERSION_IS_LESS(3,7,0) */ #endif /* CONFIG_OF */ int sg_nents (struct scatterlist *sg)
backport/compat/compat-3.8.c +2 -2
@@ -22,7 +22,7 @@#include <linux/pci.h> #include <linux/pci_regs.h> -#if (LINUX_VERSION_CODE <KERNEL_VERSION (3 ,7 ,8 )) +#if LINUX_VERSION_IS_LESS (3 ,7 ,8 )void netdev_set_default_ethtool_ops (struct net_device *dev,const struct ethtool_ops *ops) {
@@ -275,7 +275,7 @@ static bool hid_match_one_id(struct hid_device *hdev, const struct hid_device_id *id) {return (id->bus ==HID_BUS_ANY || id->bus == hdev->bus) && -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) +#if LINUX_VERSION_IS_GEQ(3,8,0) (id->group ==HID_GROUP_ANY || id->group == hdev->group) && #endif (id->vendor == HID_ANY_ID || id->vendor == hdev->vendor) &&
patches/0001-group-attr/0001-group_attr_class.cocci +2 -2
@@ -46,7 +46,7 @@ fresh identifier group_dev_attr = attribute_group.group ## "_dev_attrs"; @@ struct class group_class = { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) ++#if LINUX_VERSION_IS_GEQ(3,11,0) .dev_groups = groups, +#else + .dev_attrs = group_dev_attr,
@@ -58,7 +58,7 @@ declarer name ATTRIBUTE_GROUPS_BACKPORT; identifier attribute_group.group; @@ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) ++#if LINUX_VERSION_IS_GEQ(3,11,0) ATTRIBUTE_GROUPS(group); +#else +#define BP_ATTR_GRP_STRUCT device_attribute
patches/0001-group-attr/0002-group_attr_bus.cocci +2 -2
@@ -44,7 +44,7 @@ fresh identifier group_dev_attr = attribute_group.group ## "_dev_attrs"; @@ struct bus_type group_bus = { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) ++#if LINUX_VERSION_IS_GEQ(3,12,0) .dev_groups = groups, +#else + .dev_attrs = group_dev_attr,
@@ -56,7 +56,7 @@ declarer name ATTRIBUTE_GROUPS_BACKPORT; identifier attribute_group.group; @@ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) ++#if LINUX_VERSION_IS_GEQ(3,12,0) ATTRIBUTE_GROUPS(group); +#else +#define BP_ATTR_GRP_STRUCT device_attribute
patches/0001-group-attr/0003-class_groups.cocci +2 -2
@@ -20,7 +20,7 @@ fresh identifier group_dev_attr = attribute_group.group ## "_dev_attrs"; @@ struct class group_class = { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0) ++#if LINUX_VERSION_IS_GEQ(4,10,0) .class_groups = groups, +#else + .class_attrs = group_dev_attr,
@@ -32,7 +32,7 @@ declarer name ATTRIBUTE_GROUPS_BACKPORT; identifier attribute_group.group; @@ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0) ++#if LINUX_VERSION_IS_GEQ(4,10,0) ATTRIBUTE_GROUPS(group); +#else +#define BP_ATTR_GRP_STRUCT class_attribute
patches/0001-v4l2-dma_mmap_coherent-revert.patch +4 -4
@@ -29,8 +29,8 @@ Date: Thu Jun 14 11:32:21 2012 -0300 return buf; } -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) ++#if LINUX_VERSION_IS_LESS(3,9,0) ++#if LINUX_VERSION_IS_GEQ(3,2,0) +static int +backport_vb2_mmap_pfn_range(struct vm_area_struct *vma, unsigned long paddr, + unsigned long size,
@@ -73,7 +73,7 @@ Date: Thu Jun 14 11:32:21 2012 -0300 + return backport_vb2_mmap_pfn_range(vma, buf->dma_addr, buf->size, + &vb2_common_vm_ops, &buf->handler); +} -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) */ ++#endif /* LINUX_VERSION_IS_GEQ(3,2,0) */ +#else static int vb2_dc_mmap(void *buf_priv, struct vm_area_struct *vma) {
@@ -82,7 +82,7 @@ Date: Thu Jun 14 11:32:21 2012 -0300 return 0; } -+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)) */ ++#endif /* LINUX_VERSION_IS_LESS(3,9,0) */ /*********************************************/ /* DMABUF ops for exporters */
patches/0002-disable-dump-adjust-on-old-kernels.patch +1 -1
@@ -32,7 +32,7 @@ Date: Fri Mar 1 14:03:49 2013 +0100 cb->nlh->nlmsg_seq, NLM_F_MULTI, state); if (ret < 0) { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) ++#if LINUX_VERSION_IS_GEQ(3,1,0) /* * If sending the wiphy data didn't fit (ENOBUFS * or EMSGSIZE returned), this SKB is still
patches/0002-gpio-parent.cocci +4 -4
@@ -9,17 +9,17 @@ struct gpio_chip *chip; expression E1; @@ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0) ++#if LINUX_VERSION_IS_GEQ(4,5,0) chip->parent = E1; +#else +chip->dev = E1; -+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0) */ ++#endif /* LINUX_VERSION_IS_GEQ(4,5,0) */ @r2@ struct gpio_chip chip; expression E2; @@ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0) ++#if LINUX_VERSION_IS_GEQ(4,5,0) chip.parent = E2; +#else +chip.dev = E2; -+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0) */ ++#endif /* LINUX_VERSION_IS_GEQ(4,5,0) */
patches/0006-ieee802154-6lowpan-namespace.patch +6 -6
@@ -8,7 +8,7 @@ idea yet. struct net *net; fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) ++#if LINUX_VERSION_IS_GEQ(3,15,0) net = container_of(fq->q.net, struct net, ieee802154_lowpan.frags); +#else + net = &init_net;
@@ -20,7 +20,7 @@ idea yet. static struct ctl_table lowpan_frags_ns_ctl_table[] = { { .procname = "6lowpanfrag_high_thresh", -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) ++#if LINUX_VERSION_IS_GEQ(3,15,0) .data = &init_net.ieee802154_lowpan.frags.high_thresh, +#else + .data = &ieee802154_lowpan.frags.high_thresh,
@@ -28,7 +28,7 @@ idea yet. .maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_dointvec_minmax, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) ++#if LINUX_VERSION_IS_GEQ(3,15,0) .extra1 = &init_net.ieee802154_lowpan.frags.low_thresh +#else + .extra1 = &ieee802154_lowpan.frags.low_thresh
@@ -36,7 +36,7 @@ idea yet. }, { .procname = "6lowpanfrag_low_thresh", -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) ++#if LINUX_VERSION_IS_GEQ(3,15,0) .data = &init_net.ieee802154_lowpan.frags.low_thresh, +#else + .data = &ieee802154_lowpan.frags.low_thresh,
@@ -45,7 +45,7 @@ idea yet. .mode = 0644, .proc_handler = proc_dointvec_minmax, .extra1 = &zero, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) ++#if LINUX_VERSION_IS_GEQ(3,15,0) .extra2 = &init_net.ieee802154_lowpan.frags.high_thresh +#else + .extra2 = &ieee802154_lowpan.frags.high_thresh
@@ -53,7 +53,7 @@ idea yet. }, { .procname = "6lowpanfrag_time", -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) ++#if LINUX_VERSION_IS_GEQ(3,15,0) .data = &init_net.ieee802154_lowpan.frags.timeout, +#else + .data = &ieee802154_lowpan.frags.timeout,
patches/0007-lowpan-inet_frag_lru_move.patch +4 -4
@@ -8,7 +8,7 @@ and then domain specific inet_frag_lru_move() define. fq->d_size = arg->d_size; fq->saddr = *arg->src; fq->daddr = *arg->dst; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) ++#if LINUX_VERSION_IS_LESS(3,9,0) + spin_lock_init(&fq->lru_lock); +#endif }
@@ -28,12 +28,12 @@ and then domain specific inet_frag_lru_move() define. u16 d_size; struct ieee802154_addr saddr; struct ieee802154_addr daddr; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) ++#if LINUX_VERSION_IS_LESS(3,9,0) + spinlock_t lru_lock; +#endif }; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) ++#if LINUX_VERSION_IS_LESS(3,9,0) +/* + * XXX: this is a *domain* specific inet_frag_lru_move backport,
Lines of this file are not shown. View the raw message.
patches/0012-driver-quirks/drivers_net_wireless_cw1200_sdio.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0014-netlink_seq/net_wireless_nl80211.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0015-rename_pm_qos_request/drivers_net_wireless_ipw2x00_ipw2100.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0016-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0017-get_ts_info/get_ts_info.cocci +4 -4
Lines of this file are not shown. View the raw message.
patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch +4 -4
Lines of this file are not shown. View the raw message.
patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0021-umode_t-api-change/ath10k.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0021-umode_t-api-change/ath9k.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0021-umode_t-api-change/drivers_net_wireless_ath_ath9k_debug.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0022-define-tracing/ath6kl.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0022-define-tracing/cfg80211.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0022-define-tracing/mt7601u.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0022-define-tracing/wil6210.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0024-led-blink-api/mac80211.patch +2 -2
Lines of this file are not shown. View the raw message.
patches/0028-select_queue/mac80211.patch +4 -4
Lines of this file are not shown. View the raw message.
patches/0028-select_queue/mwifiex.patch +2 -2
Lines of this file are not shown. View the raw message.
patches/0029-struct_hid_ll_driver-extensions/net_bluetooth_hidp_core.patch +2 -2
Lines of this file are not shown. View the raw message.
patches/0030-qdisc_tx_busylock/bluetooth.patch +2 -2
Lines of this file are not shown. View the raw message.
patches/0030-qdisc_tx_busylock/ieee802154.patch +2 -2
Lines of this file are not shown. View the raw message.
patches/0032-sriov_configure/igb_sriov_configure.patch +2 -2
Lines of this file are not shown. View the raw message.
patches/0032-sriov_configure/sriov_configure.cocci +4 -4
Lines of this file are not shown. View the raw message.
patches/0033-ndo_vlan_rx_vid/cdc_mbim.patch +10 -10
Lines of this file are not shown. View the raw message.
patches/0033-ndo_vlan_rx_vid/igb_ndo_vlan_rx_vid.patch +16 -16
Lines of this file are not shown. View the raw message.
patches/0034-ndo_set_vf_spoofchk/set_vf_spoofchk.cocci +6 -6
Lines of this file are not shown. View the raw message.
patches/0035-skb_no_fcs/skb_no_fcs.cocci +2 -2
Lines of this file are not shown. View the raw message.
patches/0036-ethtool_eee/ethtool_eee.cocci +8 -8
Lines of this file are not shown. View the raw message.
patches/0037-ethtool_get_module/get_module.cocci +8 -8
Lines of this file are not shown. View the raw message.
patches/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch +13 -13
Lines of this file are not shown. View the raw message.
patches/0040-ethtool_cmd_mdix/ethtool_cmd_mdix.cocci +4 -4
Lines of this file are not shown. View the raw message.
patches/0042-pci_error_handlers/atl1e.patch +2 -2
Lines of this file are not shown. View the raw message.
patches/0042-pci_error_handlers/igb_pci_error_handlers.cocci +2 -2
Lines of this file are not shown. View the raw message.
patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch +2 -2
Lines of this file are not shown. View the raw message.
patches/0043-ndo_set_vf_rate/set_vf_rate.cocci +6 -6
Lines of this file are not shown. View the raw message.
patches/0044-no_user_ns_in_net/ieee802154.patch +2 -2
Lines of this file are not shown. View the raw message.
patches/0047-write_iter/bluetooth.patch +5 -5
Lines of this file are not shown. View the raw message.
patches/0049-no-pfmemalloc/no-pfmemalloc.cocci +2 -2
Lines of this file are not shown. View the raw message.
patches/0050-iov_iter/bluetooth.patch +14 -14
Lines of this file are not shown. View the raw message.
patches/0052-deactivate-ptp-pin/igb.patch +9 -9
Lines of this file are not shown. View the raw message.
patches/0053-remove_wait_on_bit_timeout/btusb.patch +4 -4
Lines of this file are not shown. View the raw message.
patches/0053-remove_wait_on_bit_timeout/hci_intel.patch +7 -7
Lines of this file are not shown. View the raw message.
patches/0054-struct-proto_ops-sig.cocci +18 -18
Lines of this file are not shown. View the raw message.
patches/0055-name_assign_type/brcmfmac.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0056-ndo_features_check/features_check.cocci +4 -4
Lines of this file are not shown. View the raw message.
patches/0058-ptp_getsettime64/ptp_getsettime64.cocci +6 -6
Lines of this file are not shown. View the raw message.
patches/0059-skb_xmit_more/skb_no_xmit_more.cocci +2 -2
Lines of this file are not shown. View the raw message.
patches/0060-trace_field_struct/mt7601u.patch +2 -2
Lines of this file are not shown. View the raw message.
patches/0062-acpi-gpio-remove/hci_bcm.patch +7 -7
Lines of this file are not shown. View the raw message.
patches/0062-acpi-gpio-remove/hci_intel.patch +6 -6
Lines of this file are not shown. View the raw message.
patches/0065-ndisc_send_na-argument.cocci +1 -1
Lines of this file are not shown. View the raw message.
patches/0066-remove-netdev_ieee802154_ptr/cfg802154.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0068-proto-hash/ieee802154.patch +5 -5
Lines of this file are not shown. View the raw message.
patches/0069-iwlwifi-pd-string-fix.patch +5 -5
Lines of this file are not shown. View the raw message.
patches/0071-skb-head_frag/wireless.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0072-netdevice-ndo_fdb_add/igb.patch +1 -1
Lines of this file are not shown. View the raw message.
patches/0074-netdevice-mtu-range-ifdefs.cocci +2 -2
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 4 lines
2.9.3 -- To unsubscribe from this list: send the line "unsubscribe backports" in
Part of the diff is not shown here. View the raw message.
It's some churn, but I think worthwhile - any objections?
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 2 lines · Johannes Berg
It's some churn, but I think worthwhile - any objections?
No objections from me, seems a bit easier to read and a bit less code.
- Steve
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 1 line · Johannes Berg
It's some churn, but I think worthwhile - any objections?
I find comparison operators more clear, but it is probably just a matter of getting used to it. What makes it worthwile? As you already did the churn I do not have any objections. Just curious.
Regards,
Arend
Quoted 4 lines
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 7 lines · Arend Van Spriel
Quoted 1 line · Johannes Berg
It's some churn, but I think worthwhile - any objections?
I find comparison operators more clear, but it is probably just a matter of getting used to it. What makes it worthwile? As you already did the churn I do not have any objections. Just curious.
So to be honest, I actually pushed the change more or less by accident, I'm happy to back it out again.
My reasoning was something along these lines: First, I find it awkward to always type the long form when we always have the same patterns. Especially with the IN_RANGE() part, which I haven't even fully converted I think. So that's my immediate motivation for adding it, but as the de-facto maintainer now I'd also want people to really be able to figure out which pattern they should use, regardless of whether they're looking at old or new bits, so unifying it (towards the new one because I'm a lazy bastard) seemed like a good idea.
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 11 lines · Johannes Berg
Quoted 7 lines · Arend Van Spriel
Quoted 1 line · Johannes Berg
It's some churn, but I think worthwhile - any objections?
I find comparison operators more clear, but it is probably just a matter of getting used to it. What makes it worthwile? As you already did the churn I do not have any objections. Just curious.
So to be honest, I actually pushed the change more or less by accident, I'm happy to back it out again.
I suspect the churn was not in pushing the change :-p I am fine with it.
Quoted 8 lines
My reasoning was something along these lines: First, I find it awkward to always type the long form when we always have the same patterns. Especially with the
IN_RANGE()part, which I haven't even fully converted I think. So that's my immediate motivation for adding it, but as the de-facto maintainer now I'd also want people to really be able to figure out which pattern they should use, regardless of whether they're looking at old or new bits, so unifying it (towards the new one because I'm a lazy bastard) seemed like a good idea.
Agree that a mix of old and new macros is not what we want. I am lazy too so thanks.
Regards,
Arend
--
To unsubscribe from this list: send the line "unsubscribe backports" in