thermal: testing: Rearrange variable declarations involving __free()Follow cleanup.h recommendations and always define and assign variablesin one statement when __free() is used.No intentional f
thermal: testing: Rearrange variable declarations involving __free()Follow cleanup.h recommendations and always define and assign variablesin one statement when __free() is used.No intentional functional impact.Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>Link: https://patch.msgid.link/5934556.DvuYhMxLoT@rafael.j.wysocki
show more ...
Merge tag 'driver-core-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-corePull driver core updates from Danilo Krummrich: "debugfs: - Remove unneeded debugfs_file
Merge tag 'driver-core-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-corePull driver core updates from Danilo Krummrich: "debugfs: - Remove unneeded debugfs_file_{get,put}() instances - Remove last remnants of debugfs_real_fops() - Allow storing non-const void * in struct debugfs_inode_info::aux sysfs: - Switch back to attribute_group::bin_attrs (treewide) - Switch back to bin_attribute::read()/write() (treewide) - Constify internal references to 'struct bin_attribute' Support cache-ids for device-tree systems: - Add arch hook arch_compact_of_hwid() - Use arch_compact_of_hwid() to compact MPIDR values on arm64 Rust: - Device: - Introduce CoreInternal device context (for bus internal methods) - Provide generic drvdata accessors for bus devices - Provide Driver::unbind() callbacks - Use the infrastructure above for auxiliary, PCI and platform - Implement Device::as_bound() - Rename Device::as_ref() to Device::from_raw() (treewide) - Implement fwnode and device property abstractions - Implement example usage in the Rust platform sample driver - Devres: - Remove the inner reference count (Arc) and use pin-init instead - Replace Devres::new_foreign_owned() with devres::register() - Require T to be Send in Devres<T> - Initialize the data kept inside a Devres last - Provide an accessor for the Devres associated Device - Device ID: - Add support for ACPI device IDs and driver match tables - Split up generic device ID infrastructure - Use generic device ID infrastructure in net::phy - DMA: - Implement the dma::Device trait - Add DMA mask accessors to dma::Device - Implement dma::Device for PCI and platform devices - Use DMA masks from the DMA sample module - I/O: - Implement abstraction for resource regions (struct resource) - Implement resource-based ioremap() abstractions - Provide platform device accessors for I/O (remap) requests - Misc: - Support fallible PinInit types in Revocable - Implement Wrapper<T> for Opaque<T> - Merge pin-init blanket dependencies (for Devres) Misc: - Fix OF node leak in auxiliary_device_create() - Use util macros in device property iterators - Improve kobject sample code - Add device_link_test() for testing device link flags - Fix typo in Documentation/ABI/testing/sysfs-kernel-address_bits - Hint to prefer container_of_const() over container_of()"* tag 'driver-core-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: (84 commits) rust: io: fix broken intra-doc links to `platform::Device` rust: io: fix broken intra-doc link to missing `flags` module rust: io: mem: enable IoRequest doc-tests rust: platform: add resource accessors rust: io: mem: add a generic iomem abstraction rust: io: add resource abstraction rust: samples: dma: set DMA mask rust: platform: implement the `dma::Device` trait rust: pci: implement the `dma::Device` trait rust: dma: add DMA addressing capabilities rust: dma: implement `dma::Device` trait rust: net::phy Change module_phy_driver macro to use module_device_table macro rust: net::phy represent DeviceId as transparent wrapper over mdio_device_id rust: device_id: split out index support into a separate trait device: rust: rename Device::as_ref() to Device::from_raw() arm64: cacheinfo: Provide helper to compress MPIDR value into u32 cacheinfo: Add arch hook to compress CPU h/w id into 32 bits for cache-id cacheinfo: Set cache 'id' based on DT data container_of: Document container_of() is not to be used in new code driver core: auxiliary bus: fix OF node leak ...
thermal: Constify struct thermal_zone_device_ops'struct thermal_zone_device_ops' are not modified in these drivers.Constifying these structures moves some data to a read-only section, soincrease
thermal: Constify struct thermal_zone_device_ops'struct thermal_zone_device_ops' are not modified in these drivers.Constifying these structures moves some data to a read-only section, soincreases overall security, especially when the structure holds somefunction pointers.On a x86_64, with allmodconfig, as an example:Before:====== text data bss dec hex filename 28116 5168 128 33412 8284 drivers/thermal/armada_thermal.oAfter:===== text data bss dec hex filename 28244 5040 128 33412 8284 drivers/thermal/armada_thermal.oSigned-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>Reviewed-by: Frank Li <Frank.Li@nxp.com>Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> # For ArmadaReviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>Link: https://lore.kernel.org/r/5bba3bf0139e2418b306a0f9a2f1f81ef49e88a6.1748165978.git.christophe.jaillet@wanadoo.frSigned-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
fix tt_command_write()1) unbalanced debugfs_file_get(). Not needed in the first place -file_operations are accessed only via debugfs_create_file(), sodebugfs wrappers will take care of that itse
fix tt_command_write()1) unbalanced debugfs_file_get(). Not needed in the first place -file_operations are accessed only via debugfs_create_file(), sodebugfs wrappers will take care of that itself.2) kmalloc() for a buffer used only for duration of a function is nota problem, but for a buffer no longer than 16 bytes?3) strstr() is for finding substrings; for finding a character there'sstrchr().Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>Acked-by: "Rafael J. Wysocki" <rafael@kernel.org>Link: https://lore.kernel.org/r/20250702212542.GH3406663@ZenIVSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
thermal: testing: Initialize some variables annoteded with _free()Variables annotated with __free() need to be initialized if the functioncan return before they get updated for the first time or t
thermal: testing: Initialize some variables annoteded with _free()Variables annotated with __free() need to be initialized if the functioncan return before they get updated for the first time or the attempt tofree the memory pointed to by them upon function return may crash thekernel.Fix this issue in some places in the thermal testing code.Fixes: f6a034f2df42 ("thermal: Introduce a debugfs-based testing facility")Reported-by: Dan Carpenter <dan.carpenter@linaro.org>Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>Link: https://patch.msgid.link/12576267.O9o76ZdvQC@rjwysocki.net
thermal: testing: Use DEFINE_FREE() and __free() to simplify codeUse DEFINE_FREE() to define a __free function for dropping thermalzone template reference counters and use it along with __free() t
thermal: testing: Use DEFINE_FREE() and __free() to simplify codeUse DEFINE_FREE() to define a __free function for dropping thermalzone template reference counters and use it along with __free() tosimplify code in some places.No intentional functional impact.Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>Link: https://patch.msgid.link/4628747.LvFx2qVVIh@rjwysocki.net[ rjw: Add variable initialization to address compiler warning ]Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
thermal: testing: Simplify tt_get_tt_zone()Notice that tt_get_tt_zone() need not use the ret variable inthe tt_thermal_zones list walk and make it return right afterincrementing the reference cou
thermal: testing: Simplify tt_get_tt_zone()Notice that tt_get_tt_zone() need not use the ret variable inthe tt_thermal_zones list walk and make it return right afterincrementing the reference counter of the matching entry.No functional impact.Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>Link: https://patch.msgid.link/6120304.lOV4Wx5bFT@rjwysocki.net
thermal: Introduce a debugfs-based testing facilityIntroduce a facility allowing the thermal core functionality to beexercised in a controlled way in order to verify its behavior, withoutaffectin
thermal: Introduce a debugfs-based testing facilityIntroduce a facility allowing the thermal core functionality to beexercised in a controlled way in order to verify its behavior, withoutaffecting its regular users noticeably.It is based on the idea of preparing thermal zone templates along withtheir trip points by writing to files in debugfs. When ready, thosetemplates can be used for registering test thermal zones with thethermal core.The temperature of a test thermal zone created this way can be adjustedvia debugfs, which also triggers a __thermal_zone_device_update() callfor it. By manipulating the temperature of a test thermal zone, one cancheck if the thermal core reacts to the changes of it as expected.Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>Link: https://patch.msgid.link/6065927.lOV4Wx5bFT@rjwysocki.net[ rjw: Fixed ordering of kcalloc() arguments ][ rjw: Fixed debugfs_create_dir() return value checks ][ rjw: Fixed two kerneldoc comments ]Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>