diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-05 05:41:45 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-05 05:41:45 +0300 |
commit | 38047d5c269bbdedf900fc86954913f3dffa01f1 (patch) | |
tree | d13a60a51065852d16a3a5182293224518520cb5 /lib | |
parent | df34df483a97b1591a3e90a6941f99fe9f863508 (diff) | |
parent | 1fe56e0cafd7e4cf26f3582aad0c7705fceff498 (diff) | |
download | linux-38047d5c269bbdedf900fc86954913f3dffa01f1.tar.xz |
Merge tag 'driver-core-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH:
"Here is the "big" set of driver core patches for 4.17-rc1.
There's really not much here, just a bunch of firmware code
refactoring from Luis as he attempts to wrangle that codebase into
something that is managable, along with a bunch of userspace tests for
it. Other than that, a handful of small bugfixes and reverts of things
that didn't work out.
Full details are in the shortlog, it's not all that much.
All of these have been in linux-next for a while with no reported
issues"
* tag 'driver-core-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (30 commits)
drivers: base: remove check for callback in coredump_store()
mt7601u: use firmware_request_cache() to address cache on reboot
firmware: add firmware_request_cache() to help with cache on reboot
firmware: fix typo on pr_info_once() when ignore_sysfs_fallback is used
firmware: explicitly include vmalloc.h
firmware: ensure the firmware cache is not used on incompatible calls
test_firmware: modify custom fallback tests to use unique files
firmware: add helper to check to see if fw cache is setup
firmware: fix checking for return values for fw_add_devm_name()
rename: _request_firmware_load() fw_load_sysfs_fallback()
test_firmware: test three firmware kernel configs using a proc knob
test_firmware: expand on library with shared helpers
firmware: enable to force disable the fallback mechanism at run time
firmware: enable run time change of forcing fallback loader
firmware: move firmware loader into its own directory
firmware: split firmware fallback functionality into its own file
firmware: move loading timeout under struct firmware_fallback_config
firmware: use helpers for setting up a temporary cache timeout
firmware: simplify CONFIG_FW_LOADER_USER_HELPER_FALLBACK further
drivers: base: add description for .coredump() callback
...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kobject.c | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/lib/kobject.c b/lib/kobject.c index afd5a3fc6123..e1d1f290bf35 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -204,8 +204,9 @@ static int kobject_add_internal(struct kobject *kobj) return -ENOENT; if (!kobj->name || !kobj->name[0]) { - WARN(1, "kobject: (%p): attempted to be registered with empty " - "name!\n", kobj); + WARN(1, + "kobject: (%p): attempted to be registered with empty name!\n", + kobj); return -EINVAL; } @@ -232,9 +233,8 @@ static int kobject_add_internal(struct kobject *kobj) /* be noisy on error issues */ if (error == -EEXIST) - WARN(1, "%s failed for %s with " - "-EEXIST, don't try to register things with " - "the same name in the same directory.\n", + WARN(1, + "%s failed for %s with -EEXIST, don't try to register things with the same name in the same directory.\n", __func__, kobject_name(kobj)); else WARN(1, "%s failed for %s (error: %d parent: %s)\n", @@ -334,8 +334,8 @@ void kobject_init(struct kobject *kobj, struct kobj_type *ktype) } if (kobj->state_initialized) { /* do not error out as sometimes we can recover */ - printk(KERN_ERR "kobject (%p): tried to init an initialized " - "object, something is seriously wrong.\n", kobj); + pr_err("kobject (%p): tried to init an initialized object, something is seriously wrong.\n", + kobj); dump_stack(); } @@ -344,7 +344,7 @@ void kobject_init(struct kobject *kobj, struct kobj_type *ktype) return; error: - printk(KERN_ERR "kobject (%p): %s\n", kobj, err_str); + pr_err("kobject (%p): %s\n", kobj, err_str); dump_stack(); } EXPORT_SYMBOL(kobject_init); @@ -357,7 +357,7 @@ static __printf(3, 0) int kobject_add_varg(struct kobject *kobj, retval = kobject_set_name_vargs(kobj, fmt, vargs); if (retval) { - printk(KERN_ERR "kobject: can not set name properly!\n"); + pr_err("kobject: can not set name properly!\n"); return retval; } kobj->parent = parent; @@ -399,8 +399,7 @@ int kobject_add(struct kobject *kobj, struct kobject *parent, return -EINVAL; if (!kobj->state_initialized) { - printk(KERN_ERR "kobject '%s' (%p): tried to add an " - "uninitialized object, something is seriously wrong.\n", + pr_err("kobject '%s' (%p): tried to add an uninitialized object, something is seriously wrong.\n", kobject_name(kobj), kobj); dump_stack(); return -EINVAL; @@ -590,9 +589,9 @@ struct kobject *kobject_get(struct kobject *kobj) { if (kobj) { if (!kobj->state_initialized) - WARN(1, KERN_WARNING "kobject: '%s' (%p): is not " - "initialized, yet kobject_get() is being " - "called.\n", kobject_name(kobj), kobj); + WARN(1, KERN_WARNING + "kobject: '%s' (%p): is not initialized, yet kobject_get() is being called.\n", + kobject_name(kobj), kobj); kref_get(&kobj->kref); } return kobj; @@ -622,8 +621,7 @@ static void kobject_cleanup(struct kobject *kobj) kobject_name(kobj), kobj, __func__, kobj->parent); if (t && !t->release) - pr_debug("kobject: '%s' (%p): does not have a release() " - "function, it is broken and must be fixed.\n", + pr_debug("kobject: '%s' (%p): does not have a release() function, it is broken and must be fixed.\n", kobject_name(kobj), kobj); /* send "remove" if the caller did not do it but sent "add" */ @@ -686,9 +684,9 @@ void kobject_put(struct kobject *kobj) { if (kobj) { if (!kobj->state_initialized) - WARN(1, KERN_WARNING "kobject: '%s' (%p): is not " - "initialized, yet kobject_put() is being " - "called.\n", kobject_name(kobj), kobj); + WARN(1, KERN_WARNING + "kobject: '%s' (%p): is not initialized, yet kobject_put() is being called.\n", + kobject_name(kobj), kobj); kref_put(&kobj->kref, kobject_release); } } @@ -752,8 +750,7 @@ struct kobject *kobject_create_and_add(const char *name, struct kobject *parent) retval = kobject_add(kobj, parent, "%s", name); if (retval) { - printk(KERN_WARNING "%s: kobject_add error: %d\n", - __func__, retval); + pr_warn("%s: kobject_add error: %d\n", __func__, retval); kobject_put(kobj); kobj = NULL; } |