aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/export-to-postgresql.py (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2025-05-12hwmon: pmbus: mpq8785: Add support for MPM82504Pawel Dembicki2-6/+43
Add support for the Monolithic Power Systems MPM82504 digital voltage regulator. MPM82504 uses PMBus direct format for voltage output. Tested with device tree based matching. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> Link: https://lore.kernel.org/r/20250511035701.2607947-5-paweldembicki@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-05-12hwmon: pmbus: mpq8785: Implement VOUT feedback resistor divider ratio configurationPawel Dembicki1-0/+18
Implement support for setting the VOUT_SCALE_LOOP PMBus register based on an optional device tree property "mps,vout-fb-divider-ratio-permille". This allows the driver to provide the correct VOUT value depending on the feedback voltage divider configuration for chips where the bootloader does not configure the VOUT_SCALE_LOOP register. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> Link: https://lore.kernel.org/r/20250511035701.2607947-4-paweldembicki@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-05-12hwmon: pmbus: mpq8785: Prepare driver for multiple device supportPawel Dembicki1-8/+30
Refactor the driver to support multiple Monolithic Power Systems devices. Introduce chip ID handling based on device tree matching. No functional changes intended. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> Link: https://lore.kernel.org/r/20250511035701.2607947-3-paweldembicki@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-05-12dt-bindings: hwmon: Add bindings for mpq8785 driverPawel Dembicki2-2/+74
Add device tree bindings for Monolithic Power Systems MPQ8785, MPM82504 and MPM3695 PMBus-compliant voltage regulators. These bindings also documents the optional "mps,vout-fb-divider-ratio-permille" property. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250511035701.2607947-2-paweldembicki@gmail.com Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-05-12hwmon: (ina238) Modify the calculation formula to adapt to different chipsWenliang Yan1-23/+24
Modify the calculation formula to adapt to different chips. Signed-off-by: Wenliang Yan <wenliang202407@163.com> Link: https://lore.kernel.org/r/20250506053741.4837-4-wenliang202407@163.com [groeck: Fixed checkpatch issue (space before and after arithmetic operators)] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-05-12hwmon: (ina238) Add support for SQ52206Wenliang Yan2-9/+122
Add support for SQ52206 to the Ina238 driver. Add registers, increase compatibility, add compatibility programs for multiple chips. Signed-off-by: Wenliang Yan <wenliang202407@163.com> Link: https://lore.kernel.org/r/20250506053741.4837-3-wenliang202407@163.com [groeck: Fixed checkpatch issues (alignment, {} placing)] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-05-12dt-bindings: Add SQ52206 to ina2xx devicetree bindingsWenliang Yan1-0/+5
Add the sq52206 compatible to the ina2xx.yaml Signed-off-by: Wenliang Yan <wenliang202407@163.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20250506053741.4837-5-wenliang202407@163.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-05-12hwmon: (ina238) Add ina238_config to save configurations for different chipsWenliang Yan1-5/+52
Add structure ina238_config to store proprietary properties for different chips to meet different chip adaptations Signed-off-by: Wenliang Yan <wenliang202407@163.com> Link: https://lore.kernel.org/r/20250506053741.4837-2-wenliang202407@163.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-05-04hwmon: (ausus-ec-sensors) add MAXIMUS VI HERO.pkarc2-0/+12
Add support for MAXIMUS VI HERO. Signed-off-by: pkarc <ivanchojara@gmail.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250503230020.1005801-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-05-01hwmon: (isl28022, nct7363) Convert to use maple tree register cacheBo Liu2-2/+2
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu <liubo03@inspur.com> Link: https://lore.kernel.org/r/20250424010829.2610-1-liubo03@inspur.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-05-01hwmon: (asus-ec-sensors) check sensor index in read_string()Alexei Safin1-0/+4
Prevent a potential invalid memory access when the requested sensor is not found. find_ec_sensor_index() may return a negative value (e.g. -ENOENT), but its result was used without checking, which could lead to undefined behavior when passed to get_sensor_info(). Add a proper check to return -EINVAL if sensor_index is negative. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: d0ddfd241e57 ("hwmon: (asus-ec-sensors) add driver for ASUS EC") Signed-off-by: Alexei Safin <a.safin@rosa.ru> Link: https://lore.kernel.org/r/20250424202654.5902-1-a.safin@rosa.ru [groeck: Return error code returned from find_ec_sensor_index] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-05-01hwmon: (asus-ec-sensors) add ROG MAXIMUS Z90 Formula.Daniel Grainger2-0/+18
Board and chipset information is from LibreHardwareMonitor [1]. [1] https://github.com/LibreHardwareMonitor/LibreHardwareMonitor Signed-off-by: Daniel Grainger <dagr@live.ca> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250501132009.726742-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-29dt-bindings: hwmon: Add Sophgo SG2044 external hardware monitor supportInochi Amaoto1-1/+5
The MCU device on SG2044 exposes the same interface as SG2042, which is already supported by the kernel. Add compatible string for monitor device of SG2044. Signed-off-by: Inochi Amaoto <inochiama@gmail.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20250413223507.46480-7-inochiama@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (max77705) Add initial supportDzmitry Sankouski6-0/+278
Maxim MAX77705 is a Companion Power Management and Type-C interface IC. It includes charger and fuel gauge blocks, and is capable of measuring charger input current, system bus volatage and current, and bypass voltage. Add support for mentioned measurements. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Link: https://lore.kernel.org/r/20250423-initial-support-for-max77705-sensors-v6-1-ff379e1b06c5@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (tmp102) add vcc regulator supportPeter Korsgaard1-0/+5
Make it optional for backwards compatibility. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Link: https://lore.kernel.org/r/20250417180426.3872314-2-peter@korsgaard.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23dt-bindings: hwmon: ti,tmp102: document optional V+ supply propertyPeter Korsgaard1-0/+4
TMP102 is powered by its V+ supply, document it. The property is called "vcc-supply" since the plus sign (+) is not a valid property character. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20250417180426.3872314-1-peter@korsgaard.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (pmbus/lt3074) add support for lt3074Cedric Encarnacion6-0/+216
Add hardware monitoring and regulator support for LT3074. The LT3074 is an ultrafast, ultralow noise 3A, 5.5V dropout linear regulator. The PMBus serial interface allows telemetry for input/output voltage, bias voltage, output current, and die temperature. Signed-off-by: Cedric Encarnacion <cedricjustine.encarnacion@analog.com> Link: https://lore.kernel.org/r/20250421-upstream-lt3074-v3-2-71636322f9fe@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23dt-bindings: hwmon: pmbus: add lt3074Cedric Encarnacion2-0/+57
Add Analog Devices LT3074 Ultralow Noise, High PSRR Dropout Linear Regulator. Signed-off-by: Cedric Encarnacion <cedricjustine.encarnacion@analog.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250421-upstream-lt3074-v3-1-71636322f9fe@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (spd5118) Detect and support 16-bit register addressingGuenter Roeck1-11/+64
Add support for SPD5118 compatible chips with 16-bit addressing enabled which are connected to I2C controllers. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (spd5118) Support 16-bit addressing for NVMEM accessesGuenter Roeck1-4/+22
I3C uses 16-bit register addresses. Setting the page through the legacy mode access pointer in the legacy mode device configuration register (MR11) is not needed. This is similar to 16-bit addressing in legacy mode. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (spd5118) Name chips taking the specification literallyGuenter Roeck1-1/+2
The Renesas/IDT SPD5118 Hub Controller is known to take the specification literally and does not permit access to volatile registers except for the page register if the selected page is non-zero. Explicitly name the chip to ensure that the information does not get lost. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (spd5118) Split into common and I2C specific codeGuenter Roeck1-134/+143
Split spd5118 driver into common and I2C specific code to enable adding support for I3C. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (dell-smm) Add the Dell OptiPlex 7050 to the DMI whitelistArmin Wolf1-0/+7
A user reported that the driver works on the OptiPlex 7050. Add this machine to the DMI whitelist. Closes: https://github.com/Wer-Wolf/i8kutils/issues/12 Signed-off-by: Armin Wolf <W_Armin@gmx.de> Acked-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20250420223334.12920-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (aht10) Drop doctype annotations from static functionsGuenter Roeck1-8/+8
doctype annotations of static functions have little if any value. Drop them to silence 0-day complaints. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202504161919.duDL1s2X-lkp@intel.com/ Cc: Johannes Cornelis Draaijer <jcdra1@gmail.com> Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (lm90) Use to_delayed_work()Chen Ni1-1/+1
Use to_delayed_work() instead of open-coding it. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://lore.kernel.org/r/20250414074739.3954203-1-nichen@iscas.ac.cn Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (xgene-hwmon) Simplify PCC shared memory region handlingSudeep Holla1-35/+4
The PCC driver now handles mapping and unmapping of shared memory areas as part of pcc_mbox_{request,free}_channel(). Without these before, this xgene hwmon driver did handling of those mappings like several other PCC mailbox client drivers. There were redundant operations, leading to unnecessary code. Maintaining the consistency across these driver was harder due to scattered handling of shmem. Just use the mapped shmem and remove all redundant operations from this driver. Cc: Jean Delvare <jdelvare@suse.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: linux-hwmon@vger.kernel.org Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Link: https://lore.kernel.org/r/20250411112053.1148624-1-sudeep.holla@arm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (pwm-fan) disable threaded interruptsJohn Keeping1-2/+2
The interrupt handler here just increments an atomic counter, jumping to a threaded handler risks missing tachometer pulses and is likely to be more expensive than the simple atomic increment. Signed-off-by: John Keeping <jkeeping@inmusicbrands.com> Link: https://lore.kernel.org/r/20250410180357.2258822-1-jkeeping@inmusicbrands.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: Add KEBA battery monitoring controller supportGerhard Engleder5-0/+219
The KEBA battery monitoring controller is found in the system FPGA of KEBA PLC devices. It puts a load on the coin cell battery to check the state of the battery. If the coin cell battery is nearly empty, then the user space is signaled with a hwmon alarm. The auxiliary device for this driver is instantiated by the cp500 misc driver. Signed-off-by: Gerhard Engleder <eg@keba.com> Link: https://lore.kernel.org/r/20250409190830.60489-1-gerhard@engleder-embedded.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (gpio-fan) Add regulator supportAlexander Stein1-16/+87
FANs might be supplied by a regulator which needs to be enabled as well. This is implemented using runtime PM. Every time speed_index changes from 0 to non-zero and vise versa RPM is resumed or suspended. Intitial RPM state is determined by initial value of speed_index. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Link: https://lore.kernel.org/r/20250409065430.1413439-1-alexander.stein@ew.tq-group.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (ina2xx) make regulator 'vs' support optionalCiprian Marian Costea1-2/+6
According to the 'ti,ina2xx' binding, the 'vs-supply' property is optional. Use devm_regulator_get_enable_optional() to avoid a kernel warning message if the property is not provided. Co-developed-by: Florin Buica <florin.buica@nxp.com> Tested-by: Enric Balletbo i Serra <eballetbo@kernel.org> Signed-off-by: Florin Buica <florin.buica@nxp.com> Signed-off-by: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com> Link: https://lore.kernel.org/r/20250409074529.2233733-1-ciprianmarian.costea@oss.nxp.com [groeck: Use standard multi-line comment] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (asus-ec-sensors) sort sensor definition arraysEugene Shalygin1-8/+13
The arrays have to be sorted by the sensor register bank and index because this is what the sensor reading function expects. So sort them and leave a comment for future contributors. Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250408204505.11412-1-eugene.shalygin@gmail.com [groeck: Fixed alignment of new multi-line comment] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (max34451) Work around lost pageWilliam A. Kennington III1-0/+16
When requesting new pages from the max34451 we sometimes see that the firmware responds with stale or bad data to reads that happen immediately after a page change. This is due to a lack of clock stretching after page changing on the device side when it needs more time to complete the operation. To remedy this, the manufacturer recommends we wait 50us until the firmware should be ready with the new page. Signed-off-by: William A. Kennington III <william@wkennington.com> Link: https://lore.kernel.org/r/20250408011006.1314622-1-william@wkennington.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (max6639) Allow setting target RPMNaresh Solanki1-2/+14
Currently, during startup, the fan is set to its maximum RPM by default, which may not be suitable for all use cases. This patch introduces support for specifying a target RPM via the Device Tree property "target-rpm". Changes: - Added `target_rpm` field to `max6639_data` structure to store the target RPM for each fan channel. - Modified `max6639_probe_child_from_dt()` to read the `"target-rpm"` property from the Device Tree and set `target_rpm` accordingly. - Updated `max6639_init_client()` to use `target_rpm` to compute the initial PWM duty cycle instead of defaulting to full speed (120/120). Behavior: - If `"target-rpm"` is specified, the fan speed is set accordingly. - If `"target-rpm"` is not specified, the previous behavior (full speed at startup) is retained. This allows better control over fan speed during system initialization. Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com> Link: https://lore.kernel.org/r/20250404115646.2000563-1-you@example.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (pmbus) Do not set regulators_node for single-channel chipsGuenter Roeck5-8/+20
Single-channel regulators do not need and should not have a "regulators" node. We can not entirely remove it due to existing bindings. To solve the problem for new drivers, provide additional macros PMBUS_REGULATOR_ONE_NODE and PMBUS_REGULATOR_STEP_ONE_NODE and convert existing drivers to use those macros. The exception is the ir38064 driver because its devicetree files and its description do not require or use the nested regulators node. Modify PMBUS_REGULATOR_STEP_ONE and PMBUS_REGULATOR_ONE to set the regulators_node pointer to NULL. Cc: Cedricjustine.Encarnacion@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250322142602.560042-1-linux@roeck-us.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (pmbus/max34440) Add support for ADPM12160Alexis Czezar Torreno2-11/+74
ADPM12160 is a quarter brick DC/DC Power Module. It is a high power non-isolated converter capable of delivering a fully regulated 12V, with continuous power level of 1600W with peak power at 2400W for a limited time. Uses PMBus Configuration. Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Link: https://lore.kernel.org/r/20250407-dev_adpm12160-v3-2-9cd3095445c8@analog.com [groeck: The chip is "ADPM12160"] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (pmbus/max34440) Fix support for max34451Alexis Czezar Torreno1-4/+44
The max344** family has an issue with some PMBUS address being switched. This includes max34451 however version MAX34451-NA6 and later has this issue fixed and this commit supports that update. Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Link: https://lore.kernel.org/r/20250407-dev_adpm12160-v3-1-9cd3095445c8@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (pmbus/ucd9000) Use new GPIO line value setter callbacksBartosz Golaszewski1-7/+9
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-hwmon-v1-2-1fa38f34dc07@linaro.org Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (ltc2992) Use new GPIO line value setter callbacksBartosz Golaszewski1-10/+20
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-hwmon-v1-1-1fa38f34dc07@linaro.org Reviewed-by: Linus Walleij <linus.walleij@linaro.org> [groeck: Fixed multi-line alignment issue] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (pmbus) Introduce page_change_delayWilliam A. Kennington III2-34/+36
We have some buggy pmbus devices that require a delay after performing a page change operation before trying to issue more commands to the device. This allows for a configurable delay after page changes, but not affecting other read or write operations. This makes a slight behavioral tweak to the existing delay logic, where it considers the longest of delays between operations, instead of always chosing the write delay over the access delay. Signed-off-by: William A. Kennington III <william@wkennington.com> Link: https://lore.kernel.org/r/20250407201002.1198092-1-william@wkennington.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (k10temp) Add support for Zen5 Ryzen DesktopDavid Hows1-0/+7
Add support for retrieving CCD temperatures on Zen5 (Granite Ridge) Desktop CPUs. Signed-off-by: David Hows <david@hows.id.au> Link: https://lore.kernel.org/r/Z-21SQkZpuWiWK06@archibald.hows.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (amc6821) Add PWM polarity configuration with OFFrancesco Dolcini1-5/+45
Add support to configure the PWM-Out pin polarity based on the device tree. The binding would allow also to configure the PWM period, this is currently not implemented by the driver. The driver has a module option to set the PWM polarity (normal=0, inverted=1), when specified it always takes the precedence over the DT. Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Link: https://lore.kernel.org/r/20250402102146.65406-3-francesco@dolcini.it Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23dt-bindings: hwmon: amc6821: add fan and PWM outputFrancesco Dolcini1-1/+17
Add properties to describe the fan and the PWM controller output. Link: https://www.ti.com/lit/gpn/amc6821 Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20250402102146.65406-2-francesco@dolcini.it Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-23hwmon: (qnap-mcu) Remove (explicitly) unused headerAndy Shevchenko1-1/+0
The fwnode.h is not supposed to be used by the drivers as it has the definitions for the core parts for different device property provider implementations. Drop it. Note, that fwnode API for drivers is provided in property.h which is included here. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250331070600.3985850-1-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-04-20Linux 6.15-rc3Linus Torvalds1-1/+1
2025-04-20gcc-15: work around sequence-point warningLinus Torvalds1-3/+6
The C sequence points are complicated things, and gcc-15 has apparently added a warning for the case where an object is both used and modified multiple times within the same sequence point. That's a great warning. Or rather, it would be a great warning, except gcc-15 seems to not really be very exact about it, and doesn't notice that the modification are to two entirely different members of the same object: the array counter and the array entries. So that seems kind of silly. That said, the code that gcc complains about is unnecessarily complicated, so moving the array counter update into a separate statement seems like the most straightforward fix for these warnings: drivers/net/wireless/intel/iwlwifi/mld/d3.c: In function ‘iwl_mld_set_netdetect_info’: drivers/net/wireless/intel/iwlwifi/mld/d3.c:1102:66: error: operation on ‘netdetect_info->n_matches’ may be undefined [-Werror=sequence-point] 1102 | netdetect_info->matches[netdetect_info->n_matches++] = match; | ~~~~~~~~~~~~~~~~~~~~~~~~~^~ drivers/net/wireless/intel/iwlwifi/mld/d3.c:1120:58: error: operation on ‘match->n_channels’ may be undefined [-Werror=sequence-point] 1120 | match->channels[match->n_channels++] = | ~~~~~~~~~~~~~~~~~^~ side note: the code at that second warning is actively buggy, and only works on little-endian machines that don't do strict alignment checks. The code casts an array of integers into an array of unsigned long in order to use our bitmap iterators. That happens to work fine on any sane architecture, but it's still wrong. This does *not* fix that more serious problem. This only splits the two assignments into two statements and fixes the compiler warning. I need to get rid of the new warnings in order to be able to actually do any build testing. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-04-20gcc-15: add '__nonstring' markers to byte arraysLinus Torvalds4-5/+5
All of these cases are perfectly valid and good traditional C, but hit by the "you're not NUL-terminating your byte array" warning. And none of the cases want any terminating NUL character. Mark them __nonstring to shut up gcc-15 (and in the case of the ak8974 magnetometer driver, I just removed the explicit array size and let gcc expand the 3-byte and 6-byte arrays by one extra byte, because it was the simpler change). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-04-20gcc-15: get rid of misc extra NUL character paddingLinus Torvalds2-2/+2
This removes two cases of explicit NUL padding that now causes warnings because of '-Wunterminated-string-initialization' being part of -Wextra in gcc-15. Gcc is being silly in this case when it says that it truncates a NUL terminator, because in these cases there were _multiple_ NUL characters. But we can get rid of the warning by just simplifying the two initializers that trigger the warning for me, so this does exactly that. I'm not sure why the power supply code did that odd .attr_name = #_name "\0", pattern: it was introduced in commit 2cabeaf15129 ("power: supply: core: Cleanup power supply sysfs attribute list"), but that 'attr_name[]' field is an explicitly sized character array in a statically initialized variable, and a string initializer always has a terminating NUL _and_ statically initialized character arrays are zero-padded anyway, so it really seems to be rather extraneous belt-and-suspenders. The zero_uuid[16] initialization in drivers/md/bcache/super.c makes perfect sense, but it isn't necessary for the same reasons, and not worth the new gcc warning noise. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-04-20gcc-15: acpi: sprinkle random '__nonstring' crumbles aroundLinus Torvalds4-5/+5
This is not great: I'd much rather introduce a typedef that is a "ACPI name byte buffer", and use that to mark these special 4-byte ACPI names that do not use NUL termination. But as noted in the previous commit ("gcc-15: make 'unterminated string initialization' just a warning") gcc doesn't actually seem to support that notion, so instead you have to just mark every single array declaration individually. So this is not pretty, but this gets rid of the bulk of the annoying warnings during an allmodconfig build for me. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-04-20gcc-15: make 'unterminated string initialization' just a warningLinus Torvalds1-0/+3
gcc-15 enabling -Wunterminated-string-initialization in -Wextra by default was done with the best intentions, but the warning is still quite broken. What annoys me about the warning is that this is a very traditional AND CORRECT way to initialize fixed byte arrays in C: unsigned char hex[16] = "0123456789abcdef"; and we use this all over the kernel. And the warning is fine, but gcc developers apparently never made a reasonable way to disable it. As is (sadly) tradition with these things. Yes, there's "__attribute__((nonstring))", and we have a macro to make that absolutely disgusting syntax more palatable (ie the kernel syntax for that monstrosity is just "__nonstring"). But that attribute is misdesigned. What you'd typically want to do is tell the compiler that you are using a type that isn't a string but a byte array, but that doesn't work at all: warning: ‘nonstring’ attribute does not apply to types [-Wattributes] and because of this fundamental mis-design, you then have to mark each instance of that pattern. This is particularly noticeable in our ACPI code, because ACPI has this notion of a 4-byte "type name" that gets used all over, and is exactly this kind of byte array. This is a sad oversight, because the warning is useful, but really would be so much better if gcc had also given a sane way to indicate that we really just want a byte array type at a type level, not the broken "each and every array definition" level. So now instead of creating a nice "ACPI name" type using something like typedef char acpi_name_t[4] __nonstring; we have to do things like char name[ACPI_NAMESEG_SIZE] __nonstring; in every place that uses this concept and then happens to have the typical initializers. This is annoying me mainly because I think the warning _is_ a good warning, which is why I'm not just turning it off in disgust. But it is hampered by this bad implementation detail. [ And obviously I'm doing this now because system upgrades for me are something that happen in the middle of the release cycle: don't do it before or during travel, or just before or during the busy merge window period. ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-04-19Revert "hfs{plus}: add deprecation warning"Christian Brauner2-4/+0
This reverts commit ddee68c499f76ae47c011549df5be53db0057402. There's ongoing discussion about better maintenance of at least hfsplus. Rever the deprecation warning for now. Signed-off-by: Christian Brauner <brauner@kernel.org>