Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tags 'compiler-attributes-for-linus-v5.0-rc3' and 'clang-format-for-linus-v5.0-rc3' of git://github.com/ojeda/linux

Pull misc clang fixes from Miguel Ojeda:

- A fix for OPTIMIZER_HIDE_VAR from Michael S Tsirkin

- Update clang-format with the latest for_each macro list from Jason
Gunthorpe

* tag 'compiler-attributes-for-linus-v5.0-rc3' of git://github.com/ojeda/linux:
include/linux/compiler*.h: fix OPTIMIZER_HIDE_VAR

* tag 'clang-format-for-linus-v5.0-rc3' of git://github.com/ojeda/linux:
clang-format: Update .clang-format with the latest for_each macro list

+48 -12
+42 -1
.clang-format
··· 72 72 - 'apei_estatus_for_each_section' 73 73 - 'ata_for_each_dev' 74 74 - 'ata_for_each_link' 75 + - '__ata_qc_for_each' 76 + - 'ata_qc_for_each' 77 + - 'ata_qc_for_each_raw' 78 + - 'ata_qc_for_each_with_internal' 75 79 - 'ax25_for_each' 76 80 - 'ax25_uid_for_each' 77 81 - 'bio_for_each_integrity_vec' ··· 89 85 - 'blk_queue_for_each_rl' 90 86 - 'bond_for_each_slave' 91 87 - 'bond_for_each_slave_rcu' 88 + - 'bpf_for_each_spilled_reg' 92 89 - 'btree_for_each_safe128' 93 90 - 'btree_for_each_safe32' 94 91 - 'btree_for_each_safe64' ··· 108 103 - 'drm_atomic_crtc_for_each_plane' 109 104 - 'drm_atomic_crtc_state_for_each_plane' 110 105 - 'drm_atomic_crtc_state_for_each_plane_state' 106 + - 'drm_atomic_for_each_plane_damage' 107 + - 'drm_connector_for_each_possible_encoder' 111 108 - 'drm_for_each_connector_iter' 112 109 - 'drm_for_each_crtc' 113 110 - 'drm_for_each_encoder' ··· 128 121 - 'for_each_bio' 129 122 - 'for_each_board_func_rsrc' 130 123 - 'for_each_bvec' 124 + - 'for_each_card_components' 125 + - 'for_each_card_links' 126 + - 'for_each_card_links_safe' 127 + - 'for_each_card_prelinks' 128 + - 'for_each_card_rtds' 129 + - 'for_each_card_rtds_safe' 130 + - 'for_each_cgroup_storage_type' 131 131 - 'for_each_child_of_node' 132 132 - 'for_each_clear_bit' 133 133 - 'for_each_clear_bit_from' 134 134 - 'for_each_cmsghdr' 135 135 - 'for_each_compatible_node' 136 + - 'for_each_component_dais' 137 + - 'for_each_component_dais_safe' 138 + - 'for_each_comp_order' 136 139 - 'for_each_console' 137 140 - 'for_each_cpu' 138 141 - 'for_each_cpu_and' ··· 150 133 - 'for_each_cpu_wrap' 151 134 - 'for_each_dev_addr' 152 135 - 'for_each_dma_cap_mask' 136 + - 'for_each_dpcm_be' 137 + - 'for_each_dpcm_be_rollback' 138 + - 'for_each_dpcm_be_safe' 139 + - 'for_each_dpcm_fe' 153 140 - 'for_each_drhd_unit' 154 141 - 'for_each_dss_dev' 155 142 - 'for_each_efi_memory_desc' ··· 170 149 - 'for_each_iommu' 171 150 - 'for_each_ip_tunnel_rcu' 172 151 - 'for_each_irq_nr' 152 + - 'for_each_link_codecs' 173 153 - 'for_each_lru' 174 154 - 'for_each_matching_node' 175 155 - 'for_each_matching_node_and_match' ··· 182 160 - 'for_each_mem_range_rev' 183 161 - 'for_each_migratetype_order' 184 162 - 'for_each_msi_entry' 163 + - 'for_each_msi_entry_safe' 185 164 - 'for_each_net' 186 165 - 'for_each_netdev' 187 166 - 'for_each_netdev_continue' ··· 206 183 - 'for_each_node_with_property' 207 184 - 'for_each_of_allnodes' 208 185 - 'for_each_of_allnodes_from' 186 + - 'for_each_of_cpu_node' 209 187 - 'for_each_of_pci_range' 210 188 - 'for_each_old_connector_in_state' 211 189 - 'for_each_old_crtc_in_state' 212 190 - 'for_each_oldnew_connector_in_state' 213 191 - 'for_each_oldnew_crtc_in_state' 214 192 - 'for_each_oldnew_plane_in_state' 193 + - 'for_each_oldnew_plane_in_state_reverse' 215 194 - 'for_each_oldnew_private_obj_in_state' 216 195 - 'for_each_old_plane_in_state' 217 196 - 'for_each_old_private_obj_in_state' ··· 231 206 - 'for_each_process' 232 207 - 'for_each_process_thread' 233 208 - 'for_each_property_of_node' 209 + - 'for_each_registered_fb' 234 210 - 'for_each_reserved_mem_region' 235 - - 'for_each_resv_unavail_range' 211 + - 'for_each_rtd_codec_dai' 212 + - 'for_each_rtd_codec_dai_rollback' 236 213 - 'for_each_rtdcom' 237 214 - 'for_each_rtdcom_safe' 238 215 - 'for_each_set_bit' 239 216 - 'for_each_set_bit_from' 240 217 - 'for_each_sg' 241 218 - 'for_each_sg_page' 219 + - 'for_each_sibling_event' 242 220 - '__for_each_thread' 243 221 - 'for_each_thread' 244 222 - 'for_each_zone' ··· 279 251 - 'hlist_nulls_for_each_entry_from' 280 252 - 'hlist_nulls_for_each_entry_rcu' 281 253 - 'hlist_nulls_for_each_entry_safe' 254 + - 'i3c_bus_for_each_i2cdev' 255 + - 'i3c_bus_for_each_i3cdev' 282 256 - 'ide_host_for_each_port' 283 257 - 'ide_port_for_each_dev' 284 258 - 'ide_port_for_each_present_dev' ··· 297 267 - 'kvm_for_each_memslot' 298 268 - 'kvm_for_each_vcpu' 299 269 - 'list_for_each' 270 + - 'list_for_each_codec' 271 + - 'list_for_each_codec_safe' 300 272 - 'list_for_each_entry' 301 273 - 'list_for_each_entry_continue' 302 274 - 'list_for_each_entry_continue_rcu' 303 275 - 'list_for_each_entry_continue_reverse' 304 276 - 'list_for_each_entry_from' 277 + - 'list_for_each_entry_from_rcu' 305 278 - 'list_for_each_entry_from_reverse' 306 279 - 'list_for_each_entry_lockless' 307 280 - 'list_for_each_entry_rcu' ··· 324 291 - 'media_device_for_each_intf' 325 292 - 'media_device_for_each_link' 326 293 - 'media_device_for_each_pad' 294 + - 'nanddev_io_for_each_page' 327 295 - 'netdev_for_each_lower_dev' 328 296 - 'netdev_for_each_lower_private' 329 297 - 'netdev_for_each_lower_private_rcu' ··· 391 357 - 'sk_nulls_for_each' 392 358 - 'sk_nulls_for_each_from' 393 359 - 'sk_nulls_for_each_rcu' 360 + - 'snd_array_for_each' 394 361 - 'snd_pcm_group_for_each_entry' 395 362 - 'snd_soc_dapm_widget_for_each_path' 396 363 - 'snd_soc_dapm_widget_for_each_path_safe' 397 364 - 'snd_soc_dapm_widget_for_each_sink_path' 398 365 - 'snd_soc_dapm_widget_for_each_source_path' 399 366 - 'tb_property_for_each' 367 + - 'tcf_exts_for_each_action' 400 368 - 'udp_portaddr_for_each_entry' 401 369 - 'udp_portaddr_for_each_entry_rcu' 402 370 - 'usb_hub_for_each_child' ··· 407 371 - 'v4l2_m2m_for_each_dst_buf_safe' 408 372 - 'v4l2_m2m_for_each_src_buf' 409 373 - 'v4l2_m2m_for_each_src_buf_safe' 374 + - 'virtio_device_for_each_vq' 375 + - 'xa_for_each' 376 + - 'xas_for_each' 377 + - 'xas_for_each_conflict' 378 + - 'xas_for_each_marked' 410 379 - 'zorro_for_each_dev' 411 380 412 381 #IncludeBlocks: Preserve # Unknown to clang-format-5.0
+2 -3
include/linux/compiler-clang.h
··· 3 3 #error "Please don't include <linux/compiler-clang.h> directly, include <linux/compiler.h> instead." 4 4 #endif 5 5 6 - /* Some compiler specific definitions are overwritten here 7 - * for Clang compiler 8 - */ 6 + /* Compiler specific definitions for Clang compiler */ 7 + 9 8 #define uninitialized_var(x) x = *(&(x)) 10 9 11 10 /* same as gcc, this was present in clang-2.6 so we can assume it works
-4
include/linux/compiler-gcc.h
··· 58 58 (typeof(ptr)) (__ptr + (off)); \ 59 59 }) 60 60 61 - /* Make the optimizer believe the variable can be manipulated arbitrarily. */ 62 - #define OPTIMIZER_HIDE_VAR(var) \ 63 - __asm__ ("" : "=r" (var) : "0" (var)) 64 - 65 61 /* 66 62 * A trick to suppress uninitialized variable warning without generating any 67 63 * code
+1 -3
include/linux/compiler-intel.h
··· 5 5 6 6 #ifdef __ECC 7 7 8 - /* Some compiler specific definitions are overwritten here 9 - * for Intel ECC compiler 10 - */ 8 + /* Compiler specific definitions for Intel ECC compiler */ 11 9 12 10 #include <asm/intrinsics.h> 13 11
+3 -1
include/linux/compiler.h
··· 161 161 #endif 162 162 163 163 #ifndef OPTIMIZER_HIDE_VAR 164 - #define OPTIMIZER_HIDE_VAR(var) barrier() 164 + /* Make the optimizer believe the variable can be manipulated arbitrarily. */ 165 + #define OPTIMIZER_HIDE_VAR(var) \ 166 + __asm__ ("" : "=r" (var) : "0" (var)) 165 167 #endif 166 168 167 169 /* Not-quite-unique ID. */