Showing the changes to include/linux (47 of 915 files). Show all
Unified · Split
| @@ -54,7 +54,6 @@ enum wb_reason { · 53 unmodified lines | |||
| 54 | WB_REASON_SYNC, | 54 | WB_REASON_SYNC, |
| 55 | WB_REASON_PERIODIC, | 55 | WB_REASON_PERIODIC, |
| 56 | WB_REASON_LAPTOP_TIMER, | 56 | WB_REASON_LAPTOP_TIMER, |
| 57 | WB_REASON_FREE_MORE_MEM, | ||
| 58 | WB_REASON_FS_FREE_SPACE, | 57 | WB_REASON_FS_FREE_SPACE, |
| 59 | /* | 58 | /* |
| 60 | * There is no bdi forker thread any more and works are done | 59 | * There is no bdi forker thread any more and works are done |
| @@ -319,7 +319,7 @@ struct bio_integrity_payload { · 318 unmodified lines | |||
| 319 | struct work_struct bip_work; /* I/O completion */ | 319 | struct work_struct bip_work; /* I/O completion */ |
| 320 | 320 | ||
| 321 | struct bio_vec *bip_vec; | 321 | struct bio_vec *bip_vec; |
| 322 | struct bio_vec bip_inline_vecs[0];/* embedded bvec array */ | 322 | struct bio_vec bip_inline_vecs[];/* embedded bvec array */ |
| 323 | }; | 323 | }; |
| 324 | 324 | ||
| 325 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | 325 | #if defined(CONFIG_BLK_DEV_INTEGRITY) |
| @@ -173,7 +173,7 @@ struct blk_mq_hw_ctx { · 172 unmodified lines | |||
| 173 | * blocking (BLK_MQ_F_BLOCKING). Must be the last member - see also | 173 | * blocking (BLK_MQ_F_BLOCKING). Must be the last member - see also |
| 174 | * blk_mq_hw_ctx_size(). | 174 | * blk_mq_hw_ctx_size(). |
| 175 | */ | 175 | */ |
| 176 | struct srcu_struct srcu[0]; | 176 | struct srcu_struct srcu[]; |
| 177 | }; | 177 | }; |
| 178 | 178 | ||
| 179 | /** | 179 | /** |
| @@ -198,7 +198,7 @@ struct bio { · 197 unmodified lines | |||
| 198 | * double allocations for a small number of bio_vecs. This member | 198 | * double allocations for a small number of bio_vecs. This member |
| 199 | * MUST obviously be kept at the very end of the bio. | 199 | * MUST obviously be kept at the very end of the bio. |
| 200 | */ | 200 | */ |
| 201 | struct bio_vec bi_inline_vecs[0]; | 201 | struct bio_vec bi_inline_vecs[]; |
| 202 | }; | 202 | }; |
| 203 | 203 | ||
| 204 | #define BIO_RESET_BYTES offsetof(struct bio, bi_max_vecs) | 204 | #define BIO_RESET_BYTES offsetof(struct bio, bi_max_vecs) |
| @@ -189,6 +189,8 @@ struct buffer_head *__getblk_gfp(struct block_device *bdev, sector_t block, · 188 unmodified lines | |||
| 189 | void __brelse(struct buffer_head *); | 189 | void __brelse(struct buffer_head *); |
| 190 | void __bforget(struct buffer_head *); | 190 | void __bforget(struct buffer_head *); |
| 191 | void __breadahead(struct block_device *, sector_t block, unsigned int size); | 191 | void __breadahead(struct block_device *, sector_t block, unsigned int size); |
| 192 | void __breadahead_gfp(struct block_device *, sector_t block, unsigned int size, | ||
| 193 | gfp_t gfp); | ||
| 192 | struct buffer_head *__bread_gfp(struct block_device *, | 194 | struct buffer_head *__bread_gfp(struct block_device *, |
| 193 | sector_t block, unsigned size, gfp_t gfp); | 195 | sector_t block, unsigned size, gfp_t gfp); |
| 194 | void invalidate_bh_lrus(void); | 196 | void invalidate_bh_lrus(void); |
| @@ -319,6 +321,12 @@ sb_breadahead(struct super_block *sb, sector_t block) · 124 unmodified lines | |||
| 319 | __breadahead(sb->s_bdev, block, sb->s_blocksize); | 321 | __breadahead(sb->s_bdev, block, sb->s_blocksize); |
| 320 | } | 322 | } |
| 321 | 323 | ||
| 324 | static inline void | ||
| 325 | sb_breadahead_unmovable(struct super_block *sb, sector_t block) | ||
| 326 | { | ||
| 327 | __breadahead_gfp(sb->s_bdev, block, sb->s_blocksize, 0); | ||
| 328 | } | ||
| 329 | |||
| 322 | static inline struct buffer_head * | 330 | static inline struct buffer_head * |
| 323 | sb_getblk(struct super_block *sb, sector_t block) | 331 | sb_getblk(struct super_block *sb, sector_t block) |
| 324 | { | 332 | { |
| @@ -189,7 +189,7 @@ struct __packed pucan_rx_msg { · 188 unmodified lines | |||
| 189 | u8 client; | 189 | u8 client; |
| 190 | __le16 flags; | 190 | __le16 flags; |
| 191 | __le32 can_id; | 191 | __le32 can_id; |
| 192 | u8 d[0]; | 192 | u8 d[]; |
| 193 | }; | 193 | }; |
| 194 | 194 | ||
| 195 | /* uCAN error types */ | 195 | /* uCAN error types */ |
| @@ -266,7 +266,7 @@ struct __packed pucan_tx_msg { · 70 unmodified lines | |||
| 266 | u8 client; | 266 | u8 client; |
| 267 | __le16 flags; | 267 | __le16 flags; |
| 268 | __le32 can_id; | 268 | __le32 can_id; |
| 269 | u8 d[0]; | 269 | u8 d[]; |
| 270 | }; | 270 | }; |
| 271 | 271 | ||
| 272 | /* build the cmd opcode_channel field with respect to the correct endianness */ | 272 | /* build the cmd opcode_channel field with respect to the correct endianness */ |
| @@ -28,7 +28,7 @@ struct cpu_rmap { · 27 unmodified lines | |||
| 28 | struct { | 28 | struct { |
| 29 | u16 index; | 29 | u16 index; |
| 30 | u16 dist; | 30 | u16 dist; |
| 31 | } near[0]; | 31 | } near[]; |
| 32 | }; | 32 | }; |
| 33 | #define CPU_RMAP_DIST_INF 0xffff | 33 | #define CPU_RMAP_DIST_INF 0xffff |
| 34 | 34 | ||
| @@ -103,8 +103,8 @@ void debugfs_create_u8(const char *name, umode_t mode, struct dentry *parent, · 102 unmodified lines | |||
| 103 | u8 *value); | 103 | u8 *value); |
| 104 | void debugfs_create_u16(const char *name, umode_t mode, struct dentry *parent, | 104 | void debugfs_create_u16(const char *name, umode_t mode, struct dentry *parent, |
| 105 | u16 *value); | 105 | u16 *value); |
| 106 | struct dentry *debugfs_create_u32(const char *name, umode_t mode, | 106 | void debugfs_create_u32(const char *name, umode_t mode, struct dentry *parent, |
| 107 | struct dentry *parent, u32 *value); | 107 | u32 *value); |
| 108 | void debugfs_create_u64(const char *name, umode_t mode, struct dentry *parent, | 108 | void debugfs_create_u64(const char *name, umode_t mode, struct dentry *parent, |
| 109 | u64 *value); | 109 | u64 *value); |
| 110 | struct dentry *debugfs_create_ulong(const char *name, umode_t mode, | 110 | struct dentry *debugfs_create_ulong(const char *name, umode_t mode, |
| @@ -250,12 +250,8 @@ static inline void debugfs_create_u8(const char *name, umode_t mode, · 139 unmodified lines | |||
| 250 | static inline void debugfs_create_u16(const char *name, umode_t mode, | 250 | static inline void debugfs_create_u16(const char *name, umode_t mode, |
| 251 | struct dentry *parent, u16 *value) { } | 251 | struct dentry *parent, u16 *value) { } |
| 252 | 252 | ||
| 253 | static inline struct dentry *debugfs_create_u32(const char *name, umode_t mode, | 253 | static inline void debugfs_create_u32(const char *name, umode_t mode, |
| 254 | struct dentry *parent, | 254 | struct dentry *parent, u32 *value) { } |
| 255 | u32 *value) | ||
| 256 | { | ||
| 257 | return ERR_PTR(-ENODEV); | ||
| 258 | } | ||
| 259 | 255 | ||
| 260 | static inline void debugfs_create_u64(const char *name, umode_t mode, | 256 | static inline void debugfs_create_u64(const char *name, umode_t mode, |
| 261 | struct dentry *parent, u64 *value) { } | 257 | struct dentry *parent, u64 *value) { } |
| @@ -29,7 +29,7 @@ struct pubkey_hdr { · 28 unmodified lines | |||
| 29 | uint32_t timestamp; /* key made, always 0 for now */ | 29 | uint32_t timestamp; /* key made, always 0 for now */ |
| 30 | uint8_t algo; | 30 | uint8_t algo; |
| 31 | uint8_t nmpi; | 31 | uint8_t nmpi; |
| 32 | char mpi[0]; | 32 | char mpi[]; |
| 33 | } __packed; | 33 | } __packed; |
| 34 | 34 | ||
| 35 | struct signature_hdr { | 35 | struct signature_hdr { |
| @@ -39,7 +39,7 @@ struct signature_hdr { · 3 unmodified lines | |||
| 39 | uint8_t hash; | 39 | uint8_t hash; |
| 40 | uint8_t keyid[8]; | 40 | uint8_t keyid[8]; |
| 41 | uint8_t nmpi; | 41 | uint8_t nmpi; |
| 42 | char mpi[0]; | 42 | char mpi[]; |
| 43 | } __packed; | 43 | } __packed; |
| 44 | 44 | ||
| 45 | #if defined(CONFIG_SIGNATURE) || defined(CONFIG_SIGNATURE_MODULE) | 45 | #if defined(CONFIG_SIGNATURE) || defined(CONFIG_SIGNATURE_MODULE) |
| @@ -7,7 +7,7 @@ struct linux_dirent64 { · 6 unmodified lines | |||
| 7 | s64 d_off; | 7 | s64 d_off; |
| 8 | unsigned short d_reclen; | 8 | unsigned short d_reclen; |
| 9 | unsigned char d_type; | 9 | unsigned char d_type; |
| 10 | char d_name[0]; | 10 | char d_name[]; |
| 11 | }; | 11 | }; |
| 12 | 12 | ||
| 13 | #endif | 13 | #endif |
| @@ -329,13 +329,12 @@ struct dma_buf { · 328 unmodified lines | |||
| 329 | 329 | ||
| 330 | /** | 330 | /** |
| 331 | * struct dma_buf_attach_ops - importer operations for an attachment | 331 | * struct dma_buf_attach_ops - importer operations for an attachment |
| 332 | * @move_notify: [optional] notification that the DMA-buf is moving | ||
| 333 | * | 332 | * |
| 334 | * Attachment operations implemented by the importer. | 333 | * Attachment operations implemented by the importer. |
| 335 | */ | 334 | */ |
| 336 | struct dma_buf_attach_ops { | 335 | struct dma_buf_attach_ops { |
| 337 | /** | 336 | /** |
| 338 | * @move_notify | 337 | * @move_notify: [optional] notification that the DMA-buf is moving |
| 339 | * | 338 | * |
| 340 | * If this callback is provided the framework can avoid pinning the | 339 | * If this callback is provided the framework can avoid pinning the |
| 341 | * backing store while mappings exists. | 340 | * backing store while mappings exists. |
| @@ -83,9 +83,9 @@ enum dma_transfer_direction { · 82 unmodified lines | |||
| 83 | /** | 83 | /** |
| 84 | * Interleaved Transfer Request | 84 | * Interleaved Transfer Request |
| 85 | * ---------------------------- | 85 | * ---------------------------- |
| 86 | * A chunk is collection of contiguous bytes to be transfered. | 86 | * A chunk is collection of contiguous bytes to be transferred. |
| 87 | * The gap(in bytes) between two chunks is called inter-chunk-gap(ICG). | 87 | * The gap(in bytes) between two chunks is called inter-chunk-gap(ICG). |
| 88 | * ICGs may or maynot change between chunks. | 88 | * ICGs may or may not change between chunks. |
| 89 | * A FRAME is the smallest series of contiguous {chunk,icg} pairs, | 89 | * A FRAME is the smallest series of contiguous {chunk,icg} pairs, |
| 90 | * that when repeated an integral number of times, specifies the transfer. | 90 | * that when repeated an integral number of times, specifies the transfer. |
| 91 | * A transfer template is specification of a Frame, the number of times | 91 | * A transfer template is specification of a Frame, the number of times |
| @@ -341,13 +341,11 @@ struct dma_chan { · 249 unmodified lines | |||
| 341 | * @chan: driver channel device | 341 | * @chan: driver channel device |
| 342 | * @device: sysfs device | 342 | * @device: sysfs device |
| 343 | * @dev_id: parent dma_device dev_id | 343 | * @dev_id: parent dma_device dev_id |
| 344 | * @idr_ref: reference count to gate release of dma_device dev_id | ||
| 345 | */ | 344 | */ |
| 346 | struct dma_chan_dev { | 345 | struct dma_chan_dev { |
| 347 | struct dma_chan *chan; | 346 | struct dma_chan *chan; |
| 348 | struct device device; | 347 | struct device device; |
| 349 | int dev_id; | 348 | int dev_id; |
| 350 | atomic_t *idr_ref; | ||
| 351 | }; | 349 | }; |
| 352 | 350 | ||
| 353 | /** | 351 | /** |
| @@ -835,6 +833,8 @@ struct dma_device { · 481 unmodified lines | |||
| 835 | int dev_id; | 833 | int dev_id; |
| 836 | struct device *dev; | 834 | struct device *dev; |
| 837 | struct module *owner; | 835 | struct module *owner; |
| 836 | struct ida chan_ida; | ||
| 837 | struct mutex chan_mutex; /* to protect chan_ida */ | ||
| 838 | 838 | ||
| 839 | u32 src_addr_widths; | 839 | u32 src_addr_widths; |
| 840 | u32 dst_addr_widths; | 840 | u32 dst_addr_widths; |
| @@ -1069,7 +1069,7 @@ static inline int dmaengine_terminate_all(struct dma_chan *chan) · 228 unmodified lines | |||
| 1069 | * dmaengine_synchronize() needs to be called before it is safe to free | 1069 | * dmaengine_synchronize() needs to be called before it is safe to free |
| 1070 | * any memory that is accessed by previously submitted descriptors or before | 1070 | * any memory that is accessed by previously submitted descriptors or before |
| 1071 | * freeing any resources accessed from within the completion callback of any | 1071 | * freeing any resources accessed from within the completion callback of any |
| 1072 | * perviously submitted descriptors. | 1072 | * previously submitted descriptors. |
| 1073 | * | 1073 | * |
| 1074 | * This function can be called from atomic context as well as from within a | 1074 | * This function can be called from atomic context as well as from within a |
| 1075 | * complete callback of a descriptor submitted on the same channel. | 1075 | * complete callback of a descriptor submitted on the same channel. |
| @@ -1091,7 +1091,7 @@ static inline int dmaengine_terminate_async(struct dma_chan *chan) · 15 unmodified lines | |||
| 1091 | * | 1091 | * |
| 1092 | * Synchronizes to the DMA channel termination to the current context. When this | 1092 | * Synchronizes to the DMA channel termination to the current context. When this |
| 1093 | * function returns it is guaranteed that all transfers for previously issued | 1093 | * function returns it is guaranteed that all transfers for previously issued |
| 1094 | * descriptors have stopped and and it is safe to free the memory assoicated | 1094 | * descriptors have stopped and it is safe to free the memory associated |
| 1095 | * with them. Furthermore it is guaranteed that all complete callback functions | 1095 | * with them. Furthermore it is guaranteed that all complete callback functions |
| 1096 | * for a previously submitted descriptor have finished running and it is safe to | 1096 | * for a previously submitted descriptor have finished running and it is safe to |
| 1097 | * free resources accessed from within the complete callbacks. | 1097 | * free resources accessed from within the complete callbacks. |
| @@ -101,7 +101,7 @@ struct enclosure_device { · 100 unmodified lines | |||
| 101 | struct device edev; | 101 | struct device edev; |
| 102 | struct enclosure_component_callbacks *cb; | 102 | struct enclosure_component_callbacks *cb; |
| 103 | int components; | 103 | int components; |
| 104 | struct enclosure_component component[0]; | 104 | struct enclosure_component component[]; |
| 105 | }; | 105 | }; |
| 106 | 106 | ||
| 107 | static inline struct enclosure_device * | 107 | static inline struct enclosure_device * |
| @@ -36,7 +36,7 @@ struct em_cap_state { · 35 unmodified lines | |||
| 36 | struct em_perf_domain { | 36 | struct em_perf_domain { |
| 37 | struct em_cap_state *table; | 37 | struct em_cap_state *table; |
| 38 | int nr_cap_states; | 38 | int nr_cap_states; |
| 39 | unsigned long cpus[0]; | 39 | unsigned long cpus[]; |
| 40 | }; | 40 | }; |
| 41 | 41 | ||
| 42 | #ifdef CONFIG_ENERGY_MODEL | 42 | #ifdef CONFIG_ENERGY_MODEL |
| @@ -35,7 +35,7 @@ struct compat_ethtool_rxnfc { · 34 unmodified lines | |||
| 35 | compat_u64 data; | 35 | compat_u64 data; |
| 36 | struct compat_ethtool_rx_flow_spec fs; | 36 | struct compat_ethtool_rx_flow_spec fs; |
| 37 | u32 rule_cnt; | 37 | u32 rule_cnt; |
| 38 | u32 rule_locs[0]; | 38 | u32 rule_locs[]; |
| 39 | }; | 39 | }; |
| 40 | 40 | ||
| 41 | #endif /* CONFIG_COMPAT */ | 41 | #endif /* CONFIG_COMPAT */ |
| @@ -462,7 +462,7 @@ int ethtool_check_ops(const struct ethtool_ops *ops); · 420 unmodified lines | |||
| 462 | 462 | ||
| 463 | struct ethtool_rx_flow_rule { | 463 | struct ethtool_rx_flow_rule { |
| 464 | struct flow_rule *rule; | 464 | struct flow_rule *rule; |
| 465 | unsigned long priv[0]; | 465 | unsigned long priv[]; |
| 466 | }; | 466 | }; |
| 467 | 467 | ||
| 468 | struct ethtool_rx_flow_spec_input { | 468 | struct ethtool_rx_flow_spec_input { |
| @@ -76,7 +76,7 @@ struct gen_pool_chunk { · 75 unmodified lines | |||
| 76 | void *owner; /* private data to retrieve at alloc time */ | 76 | void *owner; /* private data to retrieve at alloc time */ |
| 77 | unsigned long start_addr; /* start address of memory chunk */ | 77 | unsigned long start_addr; /* start address of memory chunk */ |
| 78 | unsigned long end_addr; /* end address of memory chunk (inclusive) */ | 78 | unsigned long end_addr; /* end address of memory chunk (inclusive) */ |
| 79 | unsigned long bits[0]; /* bitmap for allocating memory chunk */ | 79 | unsigned long bits[]; /* bitmap for allocating memory chunk */ |
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | /* | 82 | /* |
| @@ -29,7 +29,7 @@ struct i2c_mux_core { · 28 unmodified lines | |||
| 29 | 29 | ||
| 30 | int num_adapters; | 30 | int num_adapters; |
| 31 | int max_adapters; | 31 | int max_adapters; |
| 32 | struct i2c_adapter *adapter[0]; | 32 | struct i2c_adapter *adapter[]; |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | struct i2c_mux_core *i2c_mux_alloc(struct i2c_adapter *parent, | 35 | struct i2c_mux_core *i2c_mux_alloc(struct i2c_adapter *parent, |
| @@ -2,7 +2,7 @@ · 1 unmodified line | |||
| 2 | /* | 2 | /* |
| 3 | * i2c.h - definitions for the Linux i2c bus interface | 3 | * i2c.h - definitions for the Linux i2c bus interface |
| 4 | * Copyright (C) 1995-2000 Simon G. Vogl | 4 | * Copyright (C) 1995-2000 Simon G. Vogl |
| 5 | * Copyright (C) 2013-2019 Wolfram Sang <wsa@the-dreams.de> | 5 | * Copyright (C) 2013-2019 Wolfram Sang <wsa@kernel.org> |
| 6 | * | 6 | * |
| 7 | * With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and | 7 | * With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and |
| 8 | * Frodo Looijaard <frodol@dds.nl> | 8 | * Frodo Looijaard <frodol@dds.nl> |
| @@ -462,12 +462,6 @@ i2c_new_scanned_device(struct i2c_adapter *adap, · 453 unmodified lines | |||
| 462 | unsigned short const *addr_list, | 462 | unsigned short const *addr_list, |
| 463 | int (*probe)(struct i2c_adapter *adap, unsigned short addr)); | 463 | int (*probe)(struct i2c_adapter *adap, unsigned short addr)); |
| 464 | 464 | ||
| 465 | struct i2c_client * | ||
| 466 | i2c_new_probed_device(struct i2c_adapter *adap, | ||
| 467 | struct i2c_board_info *info, | ||
| 468 | unsigned short const *addr_list, | ||
| 469 | int (*probe)(struct i2c_adapter *adap, unsigned short addr)); | ||
| 470 | |||
| 471 | /* Common custom probe functions */ | 465 | /* Common custom probe functions */ |
| 472 | int i2c_probe_func_quick_read(struct i2c_adapter *adap, unsigned short addr); | 466 | int i2c_probe_func_quick_read(struct i2c_adapter *adap, unsigned short addr); |
| 473 | 467 | ||
| @@ -38,7 +38,7 @@ struct ip_sf_socklist { · 37 unmodified lines | |||
| 38 | unsigned int sl_max; | 38 | unsigned int sl_max; |
| 39 | unsigned int sl_count; | 39 | unsigned int sl_count; |
| 40 | struct rcu_head rcu; | 40 | struct rcu_head rcu; |
| 41 | __be32 sl_addr[0]; | 41 | __be32 sl_addr[]; |
| 42 | }; | 42 | }; |
| 43 | 43 | ||
| 44 | #define IP_SFLSIZE(count) (sizeof(struct ip_sf_socklist) + \ | 44 | #define IP_SFLSIZE(count) (sizeof(struct ip_sf_socklist) + \ |
| @@ -18,7 +18,7 @@ · 17 unmodified lines | |||
| 18 | struct ihex_binrec { | 18 | struct ihex_binrec { |
| 19 | __be32 addr; | 19 | __be32 addr; |
| 20 | __be16 len; | 20 | __be16 len; |
| 21 | uint8_t data[0]; | 21 | uint8_t data[]; |
| 22 | } __attribute__((packed)); | 22 | } __attribute__((packed)); |
| 23 | 23 | ||
| 24 | static inline uint16_t ihex_binrec_size(const struct ihex_binrec *p) | 24 | static inline uint16_t ihex_binrec_size(const struct ihex_binrec *p) |
| @@ -600,7 +600,7 @@ void iio_device_unregister(struct iio_dev *indio_dev); · 599 unmodified lines | |||
| 600 | * 0 on success, negative error number on failure. | 600 | * 0 on success, negative error number on failure. |
| 601 | */ | 601 | */ |
| 602 | #define devm_iio_device_register(dev, indio_dev) \ | 602 | #define devm_iio_device_register(dev, indio_dev) \ |
| 603 | __devm_iio_device_register((dev), (indio_dev), THIS_MODULE); | 603 | __devm_iio_device_register((dev), (indio_dev), THIS_MODULE) |
| 604 | int __devm_iio_device_register(struct device *dev, struct iio_dev *indio_dev, | 604 | int __devm_iio_device_register(struct device *dev, struct iio_dev *indio_dev, |
| 605 | struct module *this_mod); | 605 | struct module *this_mod); |
| 606 | void devm_iio_device_unregister(struct device *dev, struct iio_dev *indio_dev); | 606 | void devm_iio_device_unregister(struct device *dev, struct iio_dev *indio_dev); |
| @@ -573,8 +573,6 @@ enum { · 572 unmodified lines | |||
| 573 | #define IRQ_DEFAULT_INIT_FLAGS ARCH_IRQ_INIT_FLAGS | 573 | #define IRQ_DEFAULT_INIT_FLAGS ARCH_IRQ_INIT_FLAGS |
| 574 | 574 | ||
| 575 | struct irqaction; | 575 | struct irqaction; |
| 576 | extern int setup_irq(unsigned int irq, struct irqaction *new); | ||
| 577 | extern void remove_irq(unsigned int irq, struct irqaction *act); | ||
| 578 | extern int setup_percpu_irq(unsigned int irq, struct irqaction *new); | 576 | extern int setup_percpu_irq(unsigned int irq, struct irqaction *new); |
| 579 | extern void remove_percpu_irq(unsigned int irq, struct irqaction *act); | 577 | extern void remove_percpu_irq(unsigned int irq, struct irqaction *act); |
| 580 | 578 | ||
| @@ -1043,7 +1041,7 @@ struct irq_chip_generic { · 462 unmodified lines | |||
| 1043 | unsigned long unused; | 1041 | unsigned long unused; |
| 1044 | struct irq_domain *domain; | 1042 | struct irq_domain *domain; |
| 1045 | struct list_head list; | 1043 | struct list_head list; |
| 1046 | struct irq_chip_type chip_types[0]; | 1044 | struct irq_chip_type chip_types[]; |
| 1047 | }; | 1045 | }; |
| 1048 | 1046 | ||
| 1049 | /** | 1047 | /** |
| @@ -1079,7 +1077,7 @@ struct irq_domain_chip_generic { · 29 unmodified lines | |||
| 1079 | unsigned int irq_flags_to_clear; | 1077 | unsigned int irq_flags_to_clear; |
| 1080 | unsigned int irq_flags_to_set; | 1078 | unsigned int irq_flags_to_set; |
| 1081 | enum irq_gc_flags gc_flags; | 1079 | enum irq_gc_flags gc_flags; |
| 1082 | struct irq_chip_generic *gc[0]; | 1080 | struct irq_chip_generic *gc[]; |
| 1083 | }; | 1081 | }; |
| 1084 | 1082 | ||
| 1085 | /* Generic chip callback functions */ | 1083 | /* Generic chip callback functions */ |
| @@ -243,6 +243,7 @@ · 242 unmodified lines | |||
| 243 | 243 | ||
| 244 | #define GICR_TYPER_PLPIS (1U << 0) | 244 | #define GICR_TYPER_PLPIS (1U << 0) |
| 245 | #define GICR_TYPER_VLPIS (1U << 1) | 245 | #define GICR_TYPER_VLPIS (1U << 1) |
| 246 | #define GICR_TYPER_DIRTY (1U << 2) | ||
| 246 | #define GICR_TYPER_DirectLPIS (1U << 3) | 247 | #define GICR_TYPER_DirectLPIS (1U << 3) |
| 247 | #define GICR_TYPER_LAST (1U << 4) | 248 | #define GICR_TYPER_LAST (1U << 4) |
| 248 | #define GICR_TYPER_RVPEID (1U << 7) | 249 | #define GICR_TYPER_RVPEID (1U << 7) |
| @@ -686,6 +687,7 @@ struct rdists { · 437 unmodified lines | |||
| 686 | bool has_vlpis; | 687 | bool has_vlpis; |
| 687 | bool has_rvpeid; | 688 | bool has_rvpeid; |
| 688 | bool has_direct_lpi; | 689 | bool has_direct_lpi; |
| 690 | bool has_vpend_valid_dirty; | ||
| 689 | }; | 691 | }; |
| 690 | 692 | ||
| 691 | struct irq_domain; | 693 | struct irq_domain; |
| @@ -1048,7 +1048,7 @@ search_memslots(struct kvm_memslots *slots, gfn_t gfn) · 1047 unmodified lines | |||
| 1048 | start = slot + 1; | 1048 | start = slot + 1; |
| 1049 | } | 1049 | } |
| 1050 | 1050 | ||
| 1051 | if (gfn >= memslots[start].base_gfn && | 1051 | if (start < slots->used_slots && gfn >= memslots[start].base_gfn && |
| 1052 | gfn < memslots[start].base_gfn + memslots[start].npages) { | 1052 | gfn < memslots[start].base_gfn + memslots[start].npages) { |
| 1053 | atomic_set(&slots->lru_slot, start); | 1053 | atomic_set(&slots->lru_slot, start); |
| 1054 | return &memslots[start]; | 1054 | return &memslots[start]; |
| @@ -34,7 +34,7 @@ struct list_lru_one { · 33 unmodified lines | |||
| 34 | struct list_lru_memcg { | 34 | struct list_lru_memcg { |
| 35 | struct rcu_head rcu; | 35 | struct rcu_head rcu; |
| 36 | /* array of per cgroup lists, indexed by memcg_cache_id */ | 36 | /* array of per cgroup lists, indexed by memcg_cache_id */ |
| 37 | struct list_lru_one *lru[0]; | 37 | struct list_lru_one *lru[]; |
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | struct list_lru_node { | 40 | struct list_lru_node { |
| @@ -106,7 +106,7 @@ struct lruvec_stat { · 105 unmodified lines | |||
| 106 | */ | 106 | */ |
| 107 | struct memcg_shrinker_map { | 107 | struct memcg_shrinker_map { |
| 108 | struct rcu_head rcu; | 108 | struct rcu_head rcu; |
| 109 | unsigned long map[0]; | 109 | unsigned long map[]; |
| 110 | }; | 110 | }; |
| 111 | 111 | ||
| 112 | /* | 112 | /* |
| @@ -148,7 +148,7 @@ struct mem_cgroup_threshold_ary { · 35 unmodified lines | |||
| 148 | /* Size of entries[] */ | 148 | /* Size of entries[] */ |
| 149 | unsigned int size; | 149 | unsigned int size; |
| 150 | /* Array of thresholds */ | 150 | /* Array of thresholds */ |
| 151 | struct mem_cgroup_threshold entries[0]; | 151 | struct mem_cgroup_threshold entries[]; |
| 152 | }; | 152 | }; |
| 153 | 153 | ||
| 154 | struct mem_cgroup_thresholds { | 154 | struct mem_cgroup_thresholds { |
| @@ -1317,11 +1317,13 @@ struct nfs41_impl_id { · 1316 unmodified lines | |||
| 1317 | struct nfstime4 date; | 1317 | struct nfstime4 date; |
| 1318 | }; | 1318 | }; |
| 1319 | 1319 | ||
| 1320 | #define MAX_BIND_CONN_TO_SESSION_RETRIES 3 | ||
| 1320 | struct nfs41_bind_conn_to_session_args { | 1321 | struct nfs41_bind_conn_to_session_args { |
| 1321 | struct nfs_client *client; | 1322 | struct nfs_client *client; |
| 1322 | struct nfs4_sessionid sessionid; | 1323 | struct nfs4_sessionid sessionid; |
| 1323 | u32 dir; | 1324 | u32 dir; |
| 1324 | bool use_conn_in_rdma_mode; | 1325 | bool use_conn_in_rdma_mode; |
| 1326 | int retries; | ||
| 1325 | }; | 1327 | }; |
| 1326 | 1328 | ||
| 1327 | struct nfs41_bind_conn_to_session_res { | 1329 | struct nfs41_bind_conn_to_session_res { |
| @@ -83,7 +83,7 @@ struct wilco_ec_response { · 82 unmodified lines | |||
| 83 | u16 result; | 83 | u16 result; |
| 84 | u16 data_size; | 84 | u16 data_size; |
| 85 | u8 reserved[2]; | 85 | u8 reserved[2]; |
| 86 | u8 data[0]; | 86 | u8 data[]; |
| 87 | } __packed; | 87 | } __packed; |
| 88 | 88 | ||
| 89 | /** | 89 | /** |
| @@ -220,10 +220,8 @@ struct pnp_card { · 219 unmodified lines | |||
| 220 | #define global_to_pnp_card(n) list_entry(n, struct pnp_card, global_list) | 220 | #define global_to_pnp_card(n) list_entry(n, struct pnp_card, global_list) |
| 221 | #define protocol_to_pnp_card(n) list_entry(n, struct pnp_card, protocol_list) | 221 | #define protocol_to_pnp_card(n) list_entry(n, struct pnp_card, protocol_list) |
| 222 | #define to_pnp_card(n) container_of(n, struct pnp_card, dev) | 222 | #define to_pnp_card(n) container_of(n, struct pnp_card, dev) |
| 223 | #define pnp_for_each_card(card) \ | 223 | #define pnp_for_each_card(card) \ |
| 224 | for((card) = global_to_pnp_card(pnp_cards.next); \ | 224 | list_for_each_entry(card, &pnp_cards, global_list) |
| 225 | (card) != global_to_pnp_card(&pnp_cards); \ | ||
| 226 | (card) = global_to_pnp_card((card)->global_list.next)) | ||
| 227 | 225 | ||
| 228 | struct pnp_card_link { | 226 | struct pnp_card_link { |
| 229 | struct pnp_card *card; | 227 | struct pnp_card *card; |
| @@ -276,14 +274,9 @@ struct pnp_dev { · 46 unmodified lines | |||
| 276 | #define card_to_pnp_dev(n) list_entry(n, struct pnp_dev, card_list) | 274 | #define card_to_pnp_dev(n) list_entry(n, struct pnp_dev, card_list) |
| 277 | #define protocol_to_pnp_dev(n) list_entry(n, struct pnp_dev, protocol_list) | 275 | #define protocol_to_pnp_dev(n) list_entry(n, struct pnp_dev, protocol_list) |
| 278 | #define to_pnp_dev(n) container_of(n, struct pnp_dev, dev) | 276 | #define to_pnp_dev(n) container_of(n, struct pnp_dev, dev) |
| 279 | #define pnp_for_each_dev(dev) \ | 277 | #define pnp_for_each_dev(dev) list_for_each_entry(dev, &pnp_global, global_list) |
| 280 | for((dev) = global_to_pnp_dev(pnp_global.next); \ | 278 | #define card_for_each_dev(card, dev) \ |
| 281 | (dev) != global_to_pnp_dev(&pnp_global); \ | 279 | list_for_each_entry(dev, &(card)->devices, card_list) |
| 282 | (dev) = global_to_pnp_dev((dev)->global_list.next)) | ||
| 283 | #define card_for_each_dev(card,dev) \ | ||
| 284 | for((dev) = card_to_pnp_dev((card)->devices.next); \ | ||
| 285 | (dev) != card_to_pnp_dev(&(card)->devices); \ | ||
| 286 | (dev) = card_to_pnp_dev((dev)->card_list.next)) | ||
| 287 | #define pnp_dev_name(dev) (dev)->name | 280 | #define pnp_dev_name(dev) (dev)->name |
| 288 | 281 | ||
| 289 | static inline void *pnp_get_drvdata(struct pnp_dev *pdev) | 282 | static inline void *pnp_get_drvdata(struct pnp_dev *pdev) |
| @@ -437,14 +430,10 @@ struct pnp_protocol { · 147 unmodified lines | |||
| 437 | }; | 430 | }; |
| 438 | 431 | ||
| 439 | #define to_pnp_protocol(n) list_entry(n, struct pnp_protocol, protocol_list) | 432 | #define to_pnp_protocol(n) list_entry(n, struct pnp_protocol, protocol_list) |
| 440 | #define protocol_for_each_card(protocol,card) \ | 433 | #define protocol_for_each_card(protocol, card) \ |
| 441 | for((card) = protocol_to_pnp_card((protocol)->cards.next); \ | 434 | list_for_each_entry(card, &(protocol)->cards, protocol_list) |
| 442 | (card) != protocol_to_pnp_card(&(protocol)->cards); \ | 435 | #define protocol_for_each_dev(protocol, dev) \ |
| 443 | (card) = protocol_to_pnp_card((card)->protocol_list.next)) | 436 | list_for_each_entry(dev, &(protocol)->devices, protocol_list) |
| 444 | #define protocol_for_each_dev(protocol,dev) \ | ||
| 445 | for((dev) = protocol_to_pnp_dev((protocol)->devices.next); \ | ||
| 446 | (dev) != protocol_to_pnp_dev(&(protocol)->devices); \ | ||
| 447 | (dev) = protocol_to_pnp_dev((dev)->protocol_list.next)) | ||
| 448 | 437 | ||
| 449 | extern struct bus_type pnp_bus_type; | 438 | extern struct bus_type pnp_bus_type; |
| 450 | 439 | ||
| @@ -28,7 +28,7 @@ struct posix_acl { · 27 unmodified lines | |||
| 28 | refcount_t a_refcount; | 28 | refcount_t a_refcount; |
| 29 | struct rcu_head a_rcu; | 29 | struct rcu_head a_rcu; |
| 30 | unsigned int a_count; | 30 | unsigned int a_count; |
| 31 | struct posix_acl_entry a_entries[0]; | 31 | struct posix_acl_entry a_entries[]; |
| 32 | }; | 32 | }; |
| 33 | 33 | ||
| 34 | #define FOREACH_ACL_ENTRY(pa, acl, pe) \ | 34 | #define FOREACH_ACL_ENTRY(pa, acl, pe) \ |
| @@ -100,7 +100,7 @@ struct rio_switch { · 99 unmodified lines | |||
| 100 | u32 port_ok; | 100 | u32 port_ok; |
| 101 | struct rio_switch_ops *ops; | 101 | struct rio_switch_ops *ops; |
| 102 | spinlock_t lock; | 102 | spinlock_t lock; |
| 103 | struct rio_dev *nextdev[0]; | 103 | struct rio_dev *nextdev[]; |
| 104 | }; | 104 | }; |
| 105 | 105 | ||
| 106 | /** | 106 | /** |
| @@ -201,7 +201,7 @@ struct rio_dev { · 94 unmodified lines | |||
| 201 | u8 hopcount; | 201 | u8 hopcount; |
| 202 | struct rio_dev *prev; | 202 | struct rio_dev *prev; |
| 203 | atomic_t state; | 203 | atomic_t state; |
| 204 | struct rio_switch rswitch[0]; /* RIO switch info */ | 204 | struct rio_switch rswitch[]; /* RIO switch info */ |
| 205 | }; | 205 | }; |
| 206 | 206 | ||
| 207 | #define rio_dev_g(n) list_entry(n, struct rio_dev, global_list) | 207 | #define rio_dev_g(n) list_entry(n, struct rio_dev, global_list) |
| @@ -54,7 +54,7 @@ struct rs_codec { · 53 unmodified lines | |||
| 54 | */ | 54 | */ |
| 55 | struct rs_control { | 55 | struct rs_control { |
| 56 | struct rs_codec *codec; | 56 | struct rs_codec *codec; |
| 57 | uint16_t buffers[0]; | 57 | uint16_t buffers[]; |
| 58 | }; | 58 | }; |
| 59 | 59 | ||
| 60 | /* General purpose RS codec, 8-bit data width, symbol width 1-15 bit */ | 60 | /* General purpose RS codec, 8-bit data width, symbol width 1-15 bit */ |
| @@ -142,7 +142,7 @@ struct sched_domain { · 141 unmodified lines | |||
| 142 | * by attaching extra space to the end of the structure, | 142 | * by attaching extra space to the end of the structure, |
| 143 | * depending on how many CPUs the kernel has booted up with) | 143 | * depending on how many CPUs the kernel has booted up with) |
| 144 | */ | 144 | */ |
| 145 | unsigned long span[0]; | 145 | unsigned long span[]; |
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | static inline struct cpumask *sched_domain_span(struct sched_domain *sd) | 148 | static inline struct cpumask *sched_domain_span(struct sched_domain *sd) |
| @@ -4162,7 +4162,7 @@ struct skb_ext { · 4161 unmodified lines | |||
| 4162 | refcount_t refcnt; | 4162 | refcount_t refcnt; |
| 4163 | u8 offset[SKB_EXT_NUM]; /* in chunks of 8 bytes */ | 4163 | u8 offset[SKB_EXT_NUM]; /* in chunks of 8 bytes */ |
| 4164 | u8 chunks; /* same */ | 4164 | u8 chunks; /* same */ |
| 4165 | char data[0] __aligned(8); | 4165 | char data[] __aligned(8); |
| 4166 | }; | 4166 | }; |
| 4167 | 4167 | ||
| 4168 | struct skb_ext *__skb_ext_alloc(void); | 4168 | struct skb_ext *__skb_ext_alloc(void); |
| @@ -177,6 +177,8 @@ struct plat_stmmacenet_data { · 176 unmodified lines | |||
| 177 | struct stmmac_rxq_cfg rx_queues_cfg[MTL_MAX_RX_QUEUES]; | 177 | struct stmmac_rxq_cfg rx_queues_cfg[MTL_MAX_RX_QUEUES]; |
| 178 | struct stmmac_txq_cfg tx_queues_cfg[MTL_MAX_TX_QUEUES]; | 178 | struct stmmac_txq_cfg tx_queues_cfg[MTL_MAX_TX_QUEUES]; |
| 179 | void (*fix_mac_speed)(void *priv, unsigned int speed); | 179 | void (*fix_mac_speed)(void *priv, unsigned int speed); |
| 180 | int (*serdes_powerup)(struct net_device *ndev, void *priv); | ||
| 181 | void (*serdes_powerdown)(struct net_device *ndev, void *priv); | ||
| 180 | int (*init)(struct platform_device *pdev, void *priv); | 182 | int (*init)(struct platform_device *pdev, void *priv); |
| 181 | void (*exit)(struct platform_device *pdev, void *priv); | 183 | void (*exit)(struct platform_device *pdev, void *priv); |
| 182 | struct mac_device_info *(*setup)(void *priv); | 184 | struct mac_device_info *(*setup)(void *priv); |
| @@ -71,7 +71,13 @@ struct rpc_clnt { · 70 unmodified lines | |||
| 71 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) | 71 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) |
| 72 | struct dentry *cl_debugfs; /* debugfs directory */ | 72 | struct dentry *cl_debugfs; /* debugfs directory */ |
| 73 | #endif | 73 | #endif |
| 74 | struct rpc_xprt_iter cl_xpi; | 74 | /* cl_work is only needed after cl_xpi is no longer used, |
| 75 | * and that are of similar size | ||
| 76 | */ | ||
| 77 | union { | ||
| 78 | struct rpc_xprt_iter cl_xpi; | ||
| 79 | struct work_struct cl_work; | ||
| 80 | }; | ||
| 75 | const struct cred *cl_cred; | 81 | const struct cred *cl_cred; |
| 76 | }; | 82 | }; |
| 77 | 83 | ||
| @@ -236,4 +242,9 @@ static inline int rpc_reply_expected(struct rpc_task *task) · 158 unmodified lines | |||
| 236 | (task->tk_msg.rpc_proc->p_decode != NULL); | 242 | (task->tk_msg.rpc_proc->p_decode != NULL); |
| 237 | } | 243 | } |
| 238 | 244 | ||
| 245 | static inline void rpc_task_close_connection(struct rpc_task *task) | ||
| 246 | { | ||
| 247 | if (task->tk_xprt) | ||
| 248 | xprt_force_disconnect(task->tk_xprt); | ||
| 249 | } | ||
| 239 | #endif /* _LINUX_SUNRPC_CLNT_H */ | 250 | #endif /* _LINUX_SUNRPC_CLNT_H */ |
| @@ -170,6 +170,7 @@ extern bool svc_rdma_post_recvs(struct svcxprt_rdma *rdma); · 169 unmodified lines | |||
| 170 | extern void svc_rdma_recv_ctxt_put(struct svcxprt_rdma *rdma, | 170 | extern void svc_rdma_recv_ctxt_put(struct svcxprt_rdma *rdma, |
| 171 | struct svc_rdma_recv_ctxt *ctxt); | 171 | struct svc_rdma_recv_ctxt *ctxt); |
| 172 | extern void svc_rdma_flush_recv_queues(struct svcxprt_rdma *rdma); | 172 | extern void svc_rdma_flush_recv_queues(struct svcxprt_rdma *rdma); |
| 173 | extern void svc_rdma_release_rqst(struct svc_rqst *rqstp); | ||
| 173 | extern int svc_rdma_recvfrom(struct svc_rqst *); | 174 | extern int svc_rdma_recvfrom(struct svc_rqst *); |
| 174 | 175 | ||
| 175 | /* svc_rdma_rw.c */ | 176 | /* svc_rdma_rw.c */ |
| @@ -275,7 +275,7 @@ struct swap_info_struct { · 274 unmodified lines | |||
| 275 | */ | 275 | */ |
| 276 | struct work_struct discard_work; /* discard worker */ | 276 | struct work_struct discard_work; /* discard worker */ |
| 277 | struct swap_cluster_list discard_clusters; /* discard clusters list */ | 277 | struct swap_cluster_list discard_clusters; /* discard clusters list */ |
| 278 | struct plist_node avail_lists[0]; /* | 278 | struct plist_node avail_lists[]; /* |
| 279 | * entries in swap_avail_heads, one | 279 | * entries in swap_avail_heads, one |
| 280 | * entry per node. | 280 | * entry per node. |
| 281 | * Must be last as the number of the | 281 | * Must be last as the number of the |
| @@ -295,7 +295,7 @@ struct bts_header { · 294 unmodified lines | |||
| 295 | u32 magic; | 295 | u32 magic; |
| 296 | u32 version; | 296 | u32 version; |
| 297 | u8 future[24]; | 297 | u8 future[24]; |
| 298 | u8 actions[0]; | 298 | u8 actions[]; |
| 299 | } __attribute__ ((packed)); | 299 | } __attribute__ ((packed)); |
| 300 | 300 | ||
| 301 | /** | 301 | /** |
| @@ -305,7 +305,7 @@ struct bts_header { · 3 unmodified lines | |||
| 305 | struct bts_action { | 305 | struct bts_action { |
| 306 | u16 type; | 306 | u16 type; |
| 307 | u16 size; | 307 | u16 size; |
| 308 | u8 data[0]; | 308 | u8 data[]; |
| 309 | } __attribute__ ((packed)); | 309 | } __attribute__ ((packed)); |
| 310 | 310 | ||
| 311 | struct bts_action_send { | 311 | struct bts_action_send { |
| @@ -315,7 +315,7 @@ struct bts_action_send { · 3 unmodified lines | |||
| 315 | struct bts_action_wait { | 315 | struct bts_action_wait { |
| 316 | u32 msec; | 316 | u32 msec; |
| 317 | u32 size; | 317 | u32 size; |
| 318 | u8 data[0]; | 318 | u8 data[]; |
| 319 | } __attribute__ ((packed)); | 319 | } __attribute__ ((packed)); |
| 320 | 320 | ||
| 321 | struct bts_action_delay { | 321 | struct bts_action_delay { |
| @@ -28,7 +28,7 @@ struct tcpa_event { · 27 unmodified lines | |||
| 28 | u32 event_type; | 28 | u32 event_type; |
| 29 | u8 pcr_value[20]; /* SHA1 */ | 29 | u8 pcr_value[20]; /* SHA1 */ |
| 30 | u32 event_size; | 30 | u32 event_size; |
| 31 | u8 event_data[0]; | 31 | u8 event_data[]; |
| 32 | }; | 32 | }; |
| 33 | 33 | ||
| 34 | enum tcpa_event_types { | 34 | enum tcpa_event_types { |
| @@ -55,7 +55,7 @@ enum tcpa_event_types { · 20 unmodified lines | |||
| 55 | struct tcpa_pc_event { | 55 | struct tcpa_pc_event { |
| 56 | u32 event_id; | 56 | u32 event_id; |
| 57 | u32 event_size; | 57 | u32 event_size; |
| 58 | u8 event_data[0]; | 58 | u8 event_data[]; |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | enum tcpa_pc_event_ids { | 61 | enum tcpa_pc_event_ids { |
| @@ -102,7 +102,7 @@ struct tcg_pcr_event { · 40 unmodified lines | |||
| 102 | 102 | ||
| 103 | struct tcg_event_field { | 103 | struct tcg_event_field { |
| 104 | u32 event_size; | 104 | u32 event_size; |
| 105 | u8 event[0]; | 105 | u8 event[]; |
| 106 | } __packed; | 106 | } __packed; |
| 107 | 107 | ||
| 108 | struct tcg_pcr_event2_head { | 108 | struct tcg_pcr_event2_head { |
| @@ -156,8 +156,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) · 155 unmodified lines | |||
| 156 | * Note, the proto and args passed in includes "__data" as the first parameter. | 156 | * Note, the proto and args passed in includes "__data" as the first parameter. |
| 157 | * The reason for this is to handle the "void" prototype. If a tracepoint | 157 | * The reason for this is to handle the "void" prototype. If a tracepoint |
| 158 | * has a "void" prototype, then it is invalid to declare a function | 158 | * has a "void" prototype, then it is invalid to declare a function |
| 159 | * as "(void *, void)". The DECLARE_TRACE_NOARGS() will pass in just | 159 | * as "(void *, void)". |
| 160 | * "void *data", where as the DECLARE_TRACE() will pass in "void *data, proto". | ||
| 161 | */ | 160 | */ |
| 162 | #define __DO_TRACE(tp, proto, args, cond, rcuidle) \ | 161 | #define __DO_TRACE(tp, proto, args, cond, rcuidle) \ |
| 163 | do { \ | 162 | do { \ |
| @@ -373,25 +372,6 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) · 209 unmodified lines | |||
| 373 | # define __tracepoint_string | 372 | # define __tracepoint_string |
| 374 | #endif | 373 | #endif |
| 375 | 374 | ||
| 376 | /* | ||
| 377 | * The need for the DECLARE_TRACE_NOARGS() is to handle the prototype | ||
| 378 | * (void). "void" is a special value in a function prototype and can | ||
| 379 | * not be combined with other arguments. Since the DECLARE_TRACE() | ||
| 380 | * macro adds a data element at the beginning of the prototype, | ||
| 381 | * we need a way to differentiate "(void *data, proto)" from | ||
| 382 | * "(void *data, void)". The second prototype is invalid. | ||
| 383 | * | ||
| 384 | * DECLARE_TRACE_NOARGS() passes "void" as the tracepoint prototype | ||
| 385 | * and "void *__data" as the callback prototype. | ||
| 386 | * | ||
| 387 | * DECLARE_TRACE() passes "proto" as the tracepoint protoype and | ||
| 388 | * "void *__data, proto" as the callback prototype. | ||
| 389 | */ | ||
| 390 | #define DECLARE_TRACE_NOARGS(name) \ | ||
| 391 | __DECLARE_TRACE(name, void, , \ | ||
| 392 | cpu_online(raw_smp_processor_id()), \ | ||
| 393 | void *__data, __data) | ||
| 394 | |||
| 395 | #define DECLARE_TRACE(name, proto, args) \ | 375 | #define DECLARE_TRACE(name, proto, args) \ |
| 396 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \ | 376 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \ |
| 397 | cpu_online(raw_smp_processor_id()), \ | 377 | cpu_online(raw_smp_processor_id()), \ |
| @@ -164,7 +164,7 @@ struct vdpa_config_ops { · 163 unmodified lines | |||
| 164 | u64 (*get_vq_state)(struct vdpa_device *vdev, u16 idx); | 164 | u64 (*get_vq_state)(struct vdpa_device *vdev, u16 idx); |
| 165 | 165 | ||
| 166 | /* Device ops */ | 166 | /* Device ops */ |
| 167 | u16 (*get_vq_align)(struct vdpa_device *vdev); | 167 | u32 (*get_vq_align)(struct vdpa_device *vdev); |
| 168 | u64 (*get_features)(struct vdpa_device *vdev); | 168 | u64 (*get_features)(struct vdpa_device *vdev); |
| 169 | int (*set_features)(struct vdpa_device *vdev, u64 features); | 169 | int (*set_features)(struct vdpa_device *vdev, u64 features); |
| 170 | void (*set_config_cb)(struct vdpa_device *vdev, | 170 | void (*set_config_cb)(struct vdpa_device *vdev, |
| @@ -1,5 +1,9 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef _LINUX_VERMAGIC_H | ||
| 3 | #define _LINUX_VERMAGIC_H | ||
| 4 | |||
| 2 | #include <generated/utsrelease.h> | 5 | #include <generated/utsrelease.h> |
| 6 | #include <asm/vermagic.h> | ||
| 3 | 7 | ||
| 4 | /* Simply sanity version stamp for modules. */ | 8 | /* Simply sanity version stamp for modules. */ |
| 5 | #ifdef CONFIG_SMP | 9 | #ifdef CONFIG_SMP |
| @@ -24,9 +28,6 @@ · 18 unmodified lines | |||
| 24 | #else | 28 | #else |
| 25 | #define MODULE_VERMAGIC_MODVERSIONS "" | 29 | #define MODULE_VERMAGIC_MODVERSIONS "" |
| 26 | #endif | 30 | #endif |
| 27 | #ifndef MODULE_ARCH_VERMAGIC | ||
| 28 | #define MODULE_ARCH_VERMAGIC "" | ||
| 29 | #endif | ||
| 30 | #ifdef RANDSTRUCT_PLUGIN | 31 | #ifdef RANDSTRUCT_PLUGIN |
| 31 | #include <generated/randomize_layout_hash.h> | 32 | #include <generated/randomize_layout_hash.h> |
| 32 | #define MODULE_RANDSTRUCT_PLUGIN "RANDSTRUCT_PLUGIN_" RANDSTRUCT_HASHED_SEED | 33 | #define MODULE_RANDSTRUCT_PLUGIN "RANDSTRUCT_PLUGIN_" RANDSTRUCT_HASHED_SEED |
| @@ -41,3 +42,4 @@ · 8 unmodified lines | |||
| 41 | MODULE_ARCH_VERMAGIC \ | 42 | MODULE_ARCH_VERMAGIC \ |
| 42 | MODULE_RANDSTRUCT_PLUGIN | 43 | MODULE_RANDSTRUCT_PLUGIN |
| 43 | 44 | ||
| 45 | #endif /* _LINUX_VERMAGIC_H */ | ||
| @@ -9,7 +9,6 @@ · 8 unmodified lines | |||
| 9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
| 10 | #include <linux/mod_devicetable.h> | 10 | #include <linux/mod_devicetable.h> |
| 11 | #include <linux/gfp.h> | 11 | #include <linux/gfp.h> |
| 12 | #include <linux/vringh.h> | ||
| 13 | 12 | ||
| 14 | /** | 13 | /** |
| 15 | * virtqueue - a queue to register buffers for sending or receiving. | 14 | * virtqueue - a queue to register buffers for sending or receiving. |
| @@ -137,7 +137,7 @@ extern void vunmap(const void *addr); · 136 unmodified lines | |||
| 137 | 137 | ||
| 138 | extern int remap_vmalloc_range_partial(struct vm_area_struct *vma, | 138 | extern int remap_vmalloc_range_partial(struct vm_area_struct *vma, |
| 139 | unsigned long uaddr, void *kaddr, | 139 | unsigned long uaddr, void *kaddr, |
| 140 | unsigned long size); | 140 | unsigned long pgoff, unsigned long size); |
| 141 | 141 | ||
| 142 | extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, | 142 | extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, |
| 143 | unsigned long pgoff); | 143 | unsigned long pgoff); |
| @@ -14,8 +14,10 @@ · 13 unmodified lines | |||
| 14 | #include <linux/virtio_byteorder.h> | 14 | #include <linux/virtio_byteorder.h> |
| 15 | #include <linux/uio.h> | 15 | #include <linux/uio.h> |
| 16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
| 17 | #if IS_REACHABLE(CONFIG_VHOST_IOTLB) | ||
| 17 | #include <linux/dma-direction.h> | 18 | #include <linux/dma-direction.h> |
| 18 | #include <linux/vhost_iotlb.h> | 19 | #include <linux/vhost_iotlb.h> |
| 20 | #endif | ||
| 19 | #include <asm/barrier.h> | 21 | #include <asm/barrier.h> |
| 20 | 22 | ||
| 21 | /* virtio_ring with information needed for host access. */ | 23 | /* virtio_ring with information needed for host access. */ |
| @@ -254,6 +256,8 @@ static inline __virtio64 cpu_to_vringh64(const struct vringh *vrh, u64 val) · 232 unmodified lines | |||
| 254 | return __cpu_to_virtio64(vringh_is_little_endian(vrh), val); | 256 | return __cpu_to_virtio64(vringh_is_little_endian(vrh), val); |
| 255 | } | 257 | } |
| 256 | 258 | ||
| 259 | #if IS_REACHABLE(CONFIG_VHOST_IOTLB) | ||
| 260 | |||
| 257 | void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb); | 261 | void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb); |
| 258 | 262 | ||
| 259 | int vringh_init_iotlb(struct vringh *vrh, u64 features, | 263 | int vringh_init_iotlb(struct vringh *vrh, u64 features, |
| @@ -284,4 +288,6 @@ void vringh_notify_disable_iotlb(struct vringh *vrh); · 24 unmodified lines | |||
| 284 | 288 | ||
| 285 | int vringh_need_notify_iotlb(struct vringh *vrh); | 289 | int vringh_need_notify_iotlb(struct vringh *vrh); |
| 286 | 290 | ||
| 291 | #endif /* CONFIG_VHOST_IOTLB */ | ||
| 292 | |||
| 287 | #endif /* _LINUX_VRINGH_H */ | 293 | #endif /* _LINUX_VRINGH_H */ |
| @@ -73,7 +73,7 @@ struct simple_xattr { · 72 unmodified lines | |||
| 73 | struct list_head list; | 73 | struct list_head list; |
| 74 | char *name; | 74 | char *name; |
| 75 | size_t size; | 75 | size_t size; |
| 76 | char value[0]; | 76 | char value[]; |
| 77 | }; | 77 | }; |
| 78 | 78 | ||
| 79 | /* | 79 | /* |