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 tag 'driver-core-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg Kroah-Hartman:
"Here are some small driver core and firmware fixes for 4.17-rc3

There's a kobject WARN() removal to make syzkaller a lot happier about
some "normal" error paths that it keeps hitting, which should reduce
the number of false-positives we have been getting recently.

There's also some fimware test and documentation fixes, and the
coredump() function signature change that needed to happen after -rc1
before drivers started to take advantage of it.

All of these have been in linux-next with no reported issues"

* tag 'driver-core-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
firmware: some documentation fixes
selftests:firmware: fixes a call to a wrong function name
kobject: don't use WARN for registration failures
firmware: Fix firmware documentation for recent file renames
test_firmware: fix setting old custom fw path back on exit, second try
test_firmware: Install all scripts
drivers: change struct device_driver::coredump() return type to void

+30 -26
+8 -8
Documentation/driver-api/firmware/request_firmware.rst
··· 17 17 18 18 request_firmware 19 19 ---------------- 20 - .. kernel-doc:: drivers/base/firmware_class.c 20 + .. kernel-doc:: drivers/base/firmware_loader/main.c 21 21 :functions: request_firmware 22 22 23 23 request_firmware_direct 24 24 ----------------------- 25 - .. kernel-doc:: drivers/base/firmware_class.c 25 + .. kernel-doc:: drivers/base/firmware_loader/main.c 26 26 :functions: request_firmware_direct 27 27 28 28 request_firmware_into_buf 29 29 ------------------------- 30 - .. kernel-doc:: drivers/base/firmware_class.c 30 + .. kernel-doc:: drivers/base/firmware_loader/main.c 31 31 :functions: request_firmware_into_buf 32 32 33 33 Asynchronous firmware requests ··· 41 41 42 42 request_firmware_nowait 43 43 ----------------------- 44 - .. kernel-doc:: drivers/base/firmware_class.c 44 + .. kernel-doc:: drivers/base/firmware_loader/main.c 45 45 :functions: request_firmware_nowait 46 46 47 47 Special optimizations on reboot ··· 50 50 Some devices have an optimization in place to enable the firmware to be 51 51 retained during system reboot. When such optimizations are used the driver 52 52 author must ensure the firmware is still available on resume from suspend, 53 - this can be done with firmware_request_cache() insted of requesting for the 54 - firmare to be loaded. 53 + this can be done with firmware_request_cache() instead of requesting for the 54 + firmware to be loaded. 55 55 56 56 firmware_request_cache() 57 - ----------------------- 58 - .. kernel-doc:: drivers/base/firmware_class.c 57 + ------------------------ 58 + .. kernel-doc:: drivers/base/firmware_loader/main.c 59 59 :functions: firmware_request_cache 60 60 61 61 request firmware API expected driver use
+1 -1
Documentation/driver-api/infrastructure.rst
··· 28 28 .. kernel-doc:: drivers/base/node.c 29 29 :internal: 30 30 31 - .. kernel-doc:: drivers/base/firmware_class.c 31 + .. kernel-doc:: drivers/base/firmware_loader/main.c 32 32 :export: 33 33 34 34 .. kernel-doc:: drivers/base/transport_class.c
+1 -1
Documentation/power/suspend-and-cpuhotplug.txt
··· 168 168 169 169 [Please bear in mind that the kernel requests the microcode images from 170 170 userspace, using the request_firmware() function defined in 171 - drivers/base/firmware_class.c] 171 + drivers/base/firmware_loader/main.c] 172 172 173 173 174 174 a. When all the CPUs are identical:
+2 -2
drivers/base/firmware_loader/fallback.c
··· 537 537 } 538 538 539 539 /** 540 - * fw_load_sysfs_fallback - load a firmware via the syfs fallback mechanism 541 - * @fw_sysfs: firmware syfs information for the firmware to load 540 + * fw_load_sysfs_fallback - load a firmware via the sysfs fallback mechanism 541 + * @fw_sysfs: firmware sysfs information for the firmware to load 542 542 * @opt_flags: flags of options, FW_OPT_* 543 543 * @timeout: timeout to wait for the load 544 544 *
+1 -1
drivers/base/firmware_loader/fallback.h
··· 6 6 #include <linux/device.h> 7 7 8 8 /** 9 - * struct firmware_fallback_config - firmware fallback configuratioon settings 9 + * struct firmware_fallback_config - firmware fallback configuration settings 10 10 * 11 11 * Helps describe and fine tune the fallback mechanism. 12 12 *
+4 -2
include/linux/device.h
··· 256 256 * automatically. 257 257 * @pm: Power management operations of the device which matched 258 258 * this driver. 259 - * @coredump: Called through sysfs to initiate a device coredump. 259 + * @coredump: Called when sysfs entry is written to. The device driver 260 + * is expected to call the dev_coredump API resulting in a 261 + * uevent. 260 262 * @p: Driver core's private data, no one other than the driver 261 263 * core can touch this. 262 264 * ··· 290 288 const struct attribute_group **groups; 291 289 292 290 const struct dev_pm_ops *pm; 293 - int (*coredump) (struct device *dev); 291 + void (*coredump) (struct device *dev); 294 292 295 293 struct driver_private *p; 296 294 };
+5 -6
lib/kobject.c
··· 233 233 234 234 /* be noisy on error issues */ 235 235 if (error == -EEXIST) 236 - WARN(1, 237 - "%s failed for %s with -EEXIST, don't try to register things with the same name in the same directory.\n", 238 - __func__, kobject_name(kobj)); 236 + pr_err("%s failed for %s with -EEXIST, don't try to register things with the same name in the same directory.\n", 237 + __func__, kobject_name(kobj)); 239 238 else 240 - WARN(1, "%s failed for %s (error: %d parent: %s)\n", 241 - __func__, kobject_name(kobj), error, 242 - parent ? kobject_name(parent) : "'none'"); 239 + pr_err("%s failed for %s (error: %d parent: %s)\n", 240 + __func__, kobject_name(kobj), error, 241 + parent ? kobject_name(parent) : "'none'"); 243 242 } else 244 243 kobj->state_in_sysfs = 1; 245 244
+1
tools/testing/selftests/firmware/Makefile
··· 4 4 all: 5 5 6 6 TEST_PROGS := fw_run_tests.sh 7 + TEST_FILES := fw_fallback.sh fw_filesystem.sh fw_lib.sh 7 8 8 9 include ../lib.mk 9 10
+6 -4
tools/testing/selftests/firmware/fw_lib.sh
··· 154 154 if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then 155 155 echo "$OLD_TIMEOUT" >/sys/class/firmware/timeout 156 156 fi 157 - if [ "$OLD_FWPATH" = "" ]; then 158 - OLD_FWPATH=" " 159 - fi 160 157 if [ "$TEST_REQS_FW_SET_CUSTOM_PATH" = "yes" ]; then 161 - echo -n "$OLD_FWPATH" >/sys/module/firmware_class/parameters/path 158 + if [ "$OLD_FWPATH" = "" ]; then 159 + # A zero-length write won't work; write a null byte 160 + printf '\000' >/sys/module/firmware_class/parameters/path 161 + else 162 + echo -n "$OLD_FWPATH" >/sys/module/firmware_class/parameters/path 163 + fi 162 164 fi 163 165 if [ -f $FW ]; then 164 166 rm -f "$FW"
+1 -1
tools/testing/selftests/firmware/fw_run_tests.sh
··· 66 66 run_test_config_0003 67 67 else 68 68 echo "Running basic kernel configuration, working with your config" 69 - run_test 69 + run_tests 70 70 fi