# git rev-parse -q --verify 71a7507afbc3f27c346898f13ab9bfd918613c34^{commit} 71a7507afbc3f27c346898f13ab9bfd918613c34 already have revision, skipping fetch # git checkout -q -f -B kisskb 71a7507afbc3f27c346898f13ab9bfd918613c34 # git clean -qxdf # < git log -1 # commit 71a7507afbc3f27c346898f13ab9bfd918613c34 # Merge: ba54ff1fb662 f18caf261398 # Author: Linus Torvalds # Date: Fri Dec 16 03:54:54 2022 -0800 # # Merge tag 'driver-core-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core # # Pull driver core updates from Greg KH: # "Here is the set of driver core and kernfs changes for 6.2-rc1. # # The "big" change in here is the addition of a new macro, # container_of_const() that will preserve the "const-ness" of a pointer # passed into it. # # The "problem" of the current container_of() macro is that if you pass # in a "const *", out of it can comes a non-const pointer unless you # specifically ask for it. For many usages, we want to preserve the # "const" attribute by using the same call. For a specific example, this # series changes the kobj_to_dev() macro to use it, allowing it to be # used no matter what the const value is. This prevents every subsystem # from having to declare 2 different individual macros (i.e. # kobj_const_to_dev() and kobj_to_dev()) and having the compiler enforce # the const value at build time, which having 2 macros would not do # either. # # The driver for all of this have been discussions with the Rust kernel # developers as to how to properly mark driver core, and kobject, # objects as being "non-mutable". The changes to the kobject and driver # core in this pull request are the result of that, as there are lots of # paths where kobjects and device pointers are not modified at all, so # marking them as "const" allows the compiler to enforce this. # # So, a nice side affect of the Rust development effort has been already # to clean up the driver core code to be more obvious about object # rules. # # All of this has been bike-shedded in quite a lot of detail on lkml # with different names and implementations resulting in the tiny version # we have in here, much better than my original proposal. Lots of # subsystem maintainers have acked the changes as well. # # Other than this change, included in here are smaller stuff like: # # - kernfs fixes and updates to handle lock contention better # # - vmlinux.lds.h fixes and updates # # - sysfs and debugfs documentation updates # # - device property updates # # All of these have been in the linux-next tree for quite a while with # no problems" # # * tag 'driver-core-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (58 commits) # device property: Fix documentation for fwnode_get_next_parent() # firmware_loader: fix up to_fw_sysfs() to preserve const # usb.h: take advantage of container_of_const() # device.h: move kobj_to_dev() to use container_of_const() # container_of: add container_of_const() that preserves const-ness of the pointer # driver core: fix up missed drivers/s390/char/hmcdrv_dev.c class.devnode() conversion. # driver core: fix up missed scsi/cxlflash class.devnode() conversion. # driver core: fix up some missing class.devnode() conversions. # driver core: make struct class.devnode() take a const * # driver core: make struct class.dev_uevent() take a const * # cacheinfo: Remove of_node_put() for fw_token # device property: Add a blank line in Kconfig of tests # device property: Rename goto label to be more precise # device property: Move PROPERTY_ENTRY_BOOL() a bit down # device property: Get rid of __PROPERTY_ENTRY_ARRAY_EL*SIZE*() # kernfs: fix all kernel-doc warnings and multiple typos # driver core: pass a const * into of_device_uevent() # kobject: kset_uevent_ops: make name() callback take a const * # kobject: kset_uevent_ops: make filter() callback take a const * # kobject: make kobject_namespace take a const * # ... # < /opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux-gcc --version # < /opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux-ld --version # < git log --format=%s --max-count=1 71a7507afbc3f27c346898f13ab9bfd918613c34 # < make -s -j 32 ARCH=um O=/kisskb/build/linus_um-allmodconfig_um-x86_64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux- SUBARCH=x86_64 allmodconfig # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_KCOV=n # Added to kconfig CONFIG_GCC_PLUGINS=n # Added to kconfig CONFIG_GCC_PLUGIN_CYC_COMPLEXITY=n # Added to kconfig CONFIG_GCC_PLUGIN_SANCOV=n # Added to kconfig CONFIG_GCC_PLUGIN_LATENT_ENTROPY=n # Added to kconfig CONFIG_GCC_PLUGIN_STRUCTLEAK=n # Added to kconfig CONFIG_GCC_PLUGIN_RANDSTRUCT=n # Added to kconfig CONFIG_UML_NET=n # Added to kconfig CONFIG_UML_NET_ETHERTAP=n # Added to kconfig CONFIG_UML_NET_TUNTAP=n # Added to kconfig CONFIG_UML_NET_SLIP=n # Added to kconfig CONFIG_UML_NET_DAEMON=n # Added to kconfig CONFIG_UML_NET_VDE=n # Added to kconfig CONFIG_UML_NET_MCAST=n # Added to kconfig CONFIG_UML_NET_PCAP=n # Added to kconfig CONFIG_UML_NET_SLIRP=n # Added to kconfig CONFIG_GCOV_KERNEL=n # Added to kconfig CONFIG_DEBUG_INFO_BTF=n # Added to kconfig CONFIG_BPF_PRELOAD=n # < make -s -j 32 ARCH=um O=/kisskb/build/linus_um-allmodconfig_um-x86_64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux- SUBARCH=x86_64 help # make -s -j 32 ARCH=um O=/kisskb/build/linus_um-allmodconfig_um-x86_64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux- SUBARCH=x86_64 olddefconfig .config:12654:warning: override: reassigning to symbol GCC_PLUGIN_LATENT_ENTROPY .config:12658:warning: override: reassigning to symbol UML_NET_ETHERTAP .config:12660:warning: override: reassigning to symbol UML_NET_SLIP .config:12663:warning: override: reassigning to symbol UML_NET_MCAST .config:12665:warning: override: reassigning to symbol UML_NET_SLIRP # make -s -j 32 ARCH=um O=/kisskb/build/linus_um-allmodconfig_um-x86_64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux- SUBARCH=x86_64 /kisskb/src/drivers/spi/spi-stm32-qspi.c: In function 'stm32_qspi_dirmap_read': /kisskb/src/drivers/spi/spi-stm32-qspi.c:523:27: error: 'op' is used uninitialized [-Werror=uninitialized] 523 | struct spi_mem_op op; | ^~ /kisskb/src/drivers/spi/spi-stm32-qspi.c:523:27: note: 'op' declared here 523 | struct spi_mem_op op; | ^~ /kisskb/src/drivers/spi/spi-stm32-qspi.c: In function 'stm32_qspi_transfer_one_message': /kisskb/src/drivers/spi/spi-stm32-qspi.c:564:27: error: 'op' is used uninitialized [-Werror=uninitialized] 564 | struct spi_mem_op op; | ^~ /kisskb/src/drivers/spi/spi-stm32-qspi.c:564:27: note: 'op' declared here 564 | struct spi_mem_op op; | ^~ cc1: all warnings being treated as errors make[4]: *** [/kisskb/src/scripts/Makefile.build:250: drivers/spi/spi-stm32-qspi.o] Error 1 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [/kisskb/src/scripts/Makefile.build:502: drivers/spi] Error 2 make[3]: *** Waiting for unfinished jobs.... In file included from /kisskb/src/arch/x86/um/asm/processor.h:41, from /kisskb/src/include/linux/mutex.h:19, from /kisskb/src/include/linux/kernfs.h:11, from /kisskb/src/include/linux/sysfs.h:16, from /kisskb/src/include/linux/kobject.h:20, from /kisskb/src/include/linux/pci.h:35, from /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:26: /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: In function 'kfd_cpumask_to_apic_id': /kisskb/src/arch/um/include/asm/processor-generic.h:94:19: error: called object is not a function or function pointer 94 | #define cpu_data (&boot_cpu_data) | ~^~~~~~~~~~~~~~~ /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:2157:16: note: in expansion of macro 'cpu_data' 2157 | return cpu_data(first_cpu_of_numa_node).apicid; | ^~~~~~~~ /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:2161:1: error: control reaches end of non-void function [-Werror=return-type] 2161 | } | ^ cc1: all warnings being treated as errors make[6]: *** [/kisskb/src/scripts/Makefile.build:250: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.o] Error 1 make[6]: *** Waiting for unfinished jobs.... make[5]: *** [/kisskb/src/scripts/Makefile.build:502: drivers/gpu/drm/amd/amdgpu] Error 2 make[5]: *** Waiting for unfinished jobs.... make[4]: *** [/kisskb/src/scripts/Makefile.build:502: drivers/gpu/drm] Error 2 make[3]: *** [/kisskb/src/scripts/Makefile.build:502: drivers/gpu] Error 2 make[2]: *** [/kisskb/src/scripts/Makefile.build:502: drivers] Error 2 make[1]: *** [/kisskb/src/Makefile:1994: .] Error 2 make: *** [Makefile:231: __sub-make] Error 2 Command 'make -s -j 32 ARCH=um O=/kisskb/build/linus_um-allmodconfig_um-x86_64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux- SUBARCH=x86_64 ' returned non-zero exit status 2 # rm -rf /kisskb/build/linus_um-allmodconfig_um-x86_64-gcc12 # Build took: 0:11:12.066952