22 Dec, 2011
1 commit
-
Now that there are no in-kernel users of this function, remove it as it
is no longer needed.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
01 Nov, 2011
1 commit
-
Standardize the style for compiler based printf format verification.
Standardized the location of __printf too.Done via script and a little typing.
$ grep -rPl --include=*.[ch] -w "__attribute__" * | \
grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'[akpm@linux-foundation.org: revert arch bits]
Signed-off-by: Joe Perches
Cc: "Kirill A. Shutemov"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
27 Jul, 2011
1 commit
-
This allows us to move duplicated code in
(atomic_inc_not_zero() for now) toSigned-off-by: Arun Sharma
Reviewed-by: Eric Dumazet
Cc: Ingo Molnar
Cc: David Miller
Cc: Eric Dumazet
Acked-by: Mike Frysinger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
19 Feb, 2011
1 commit
-
When CONFIG_HOTPLUG is not enabled, the inline function add_uevent_var()
needs to have its __attribute__ before the function name/parameters,
otherwise there are syntax errors.linux-next-20110207/include/linux/kobject.h:232: error: expected ',' or ';' before '{' token
Signed-off-by: Randy Dunlap
Signed-off-by: Greg Kroah-Hartman
04 Feb, 2011
1 commit
-
Several functions in accept printf-style arguments.
Some of these functions have been annotated with a format attribute
declaration while others have not been annotated. Add a format attribute
specification where it is missing.Signed-off-by: Bart Van Assche
Signed-off-by: Greg Kroah-Hartman
23 Oct, 2010
1 commit
-
One call chain getting to kset_find_obj is:
link_mem_sections()
find_mem_section()
kset_find_obj()This is done during boot. The memory sections were added in a linearly
increasing order and link_mem_sections tends to utilize them in that
same linear order.Introduce a kset_find_obj_hinted which is passed the result of the
previous kset_find_obj which it uses for a quick "is the next object
our desired object" check before falling back to the old behavior.Signed-off-by: Robin Holt
To: Robert P. J. Day
Reviewed-by: KAMEZAWA Hiroyuki
Signed-off-by: Greg Kroah-Hartman
24 Aug, 2010
1 commit
-
Break the kobject namespace defs into their own header to avoid a header file
inclusion ordering problem between linux/sysfs.h and linux/kobject.h.This fixes the build breakage on older versions of gcc.
Signed-off-by: David Howells
Cc: Eric Biederman
Signed-off-by: Greg Kroah-Hartman
22 May, 2010
3 commits
-
The problem. Network devices show up in sysfs and with the network
namespace active multiple devices with the same name can show up in
the same directory, ouch!To avoid that problem and allow existing applications in network namespaces
to see the same interface that is currently presented in sysfs, this
patch enables the tagging directory support in sysfs.By using the network namespace pointers as tags to separate out the
the sysfs directory entries we ensure that we don't have conflicts
in the directories and applications only see a limited set of
the network devices.Signed-off-by: Eric W. Biederman
Acked-by: David S. Miller
Signed-off-by: Greg Kroah-Hartman -
Add some in-line comments to explain the new infrastructure, which
was introduced to support sysfs directory tagging with namespaces.
I think an overall description someplace might be good too, but it
didn't really seem to fit into Documentation/filesystems/sysfs.txt,
which appears more geared toward users, rather than maintainers, of
sysfs.(Tejun, please let me know if I can make anything clearer or failed
altogether to comment something that should be commented.)Signed-off-by: Serge E. Hallyn
Cc: Eric W. Biederman
Cc: Tejun Heo
Signed-off-by: Greg Kroah-Hartman -
Move complete knowledge of namespaces into the kobject layer
so we can use that information when reporting kobjects to
userspace.Signed-off-by: Eric W. Biederman
Signed-off-by: Greg Kroah-Hartman
08 Mar, 2010
2 commits
-
Constify struct sysfs_ops.
This is part of the ops structure constification
effort started by Arjan van de Ven et al.Benefits of this constification:
* prevents modification of data that is shared
(referenced) by many other structure instances
at runtime* detects/prevents accidental (but not intentional)
modification attempts on archs that enforce
read-only kernel data at runtime* potentially better optimized code as the compiler
can assume that the const data cannot be changed* the compiler/linker move const data into .rodata
and therefore exclude them from false sharingSigned-off-by: Emese Revfy
Acked-by: David Teigland
Acked-by: Matt Domsch
Acked-by: Maciej Sosnowski
Acked-by: Hans J. Koch
Acked-by: Pekka Enberg
Acked-by: Jens Axboe
Acked-by: Stephen Hemminger
Signed-off-by: Greg Kroah-Hartman -
Constify struct kset_uevent_ops.
This is part of the ops structure constification
effort started by Arjan van de Ven et al.Benefits of this constification:
* prevents modification of data that is shared
(referenced) by many other structure instances
at runtime* detects/prevents accidental (but not intentional)
modification attempts on archs that enforce
read-only kernel data at runtime* potentially better optimized code as the compiler
can assume that the const data cannot be changed* the compiler/linker move const data into .rodata
and therefore exclude them from false sharingSigned-off-by: Emese Revfy
Signed-off-by: Greg Kroah-Hartman
25 Mar, 2009
2 commits
-
This patch implements uevent suppress in kobject and removes it
from struct device, based on the following ideas:1,Uevent sending should be one attribute of kobject, so suppressing it
in kobject layer is more natural than in device layer. By this way,
we can do it for other objects embedded with kobject.2,It may save several bytes for each instance of struct device.(On my
omap3(32bit ARM) based box, can save 8bytes per device object)This patch also introduces dev_set|get_uevent_suppress() helpers to
set and query uevent_suppress attribute in case to help kobject
as private part of struct device in future.[This version is against the latest driver-core patch set of Greg,please
ignore the last version.]Signed-off-by: Ming Lei
Signed-off-by: Greg Kroah-Hartman -
Now that all users of bus_id is gone, we can remove it from struct
device.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
25 Jul, 2008
1 commit
-
Add a kobject to create /sys/kernel/mm when sysfs is mounted. The kobject
will exist regardless. This will allow for the hugepage related sysfs
directories to exist under the mm "subsystem" directory. Add an ABI file
appropriately.[kosaki.motohiro@jp.fujitsu.com: fix build]
Signed-off-by: Nishanth Aravamudan
Cc: Nick Piggin
Cc: Mel Gorman
Signed-off-by: KOSAKI Motohiro
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Jul, 2008
2 commits
-
reorder kobject to save space on 64 bit builds.
shrinks from 72 to 64 bytes & moves allocated kobject to a smaller
slab.Signed-off-by: Richard Kennedy
Signed-off-by: Greg Kroah-Hartman -
Kobjects do not have a limit in name size since a while, so stop
pretending that they do.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
30 Apr, 2008
1 commit
-
Remove the "#ifdef __KERNEL__" tests from unexported header files in
linux/include whose entire contents are wrapped in that preprocessor
test.Signed-off-by: Robert P. J. Day
Cc: David Woodhouse
Cc: Sam Ravnborg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Jan, 2008
22 commits
-
Finally clean up the odd spaces and other mess in kobject.h
Signed-off-by: Greg Kroah-Hartman
-
All kobjects require a dynamically allocated name now. We no longer
need to keep track if the name is statically assigned, we can just
unconditionally free() all kobject names on cleanup.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
There are no in-kernel users of kobject_unregister() so it should be
removed.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
We save the current state in the object itself, so we can do proper
cleanup when the last reference is dropped.If the initial reference is dropped, the object will be removed from
sysfs if needed, if an "add" event was sent, "remove" will be send, and
the allocated resources are released.This allows us to clean up some driver core usage as well as allowing us
to do other such changes to the rest of the kernel.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
No one is calling this anymore, so just remove it and hard-code the one
internal-use of it.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
The function is no longer used by anyone in the kernel, and it prevents
the proper sending of the kobject uevent after the needed files are set
up by the caller. kobject_init_and_add() can be used in its place.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Now that the old kobject_init() function is gone, rename
kobject_init_ng() to kobject_init() to clean up the namespace.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
The old kobject_init() function is on longer in use, so let us remove it
from the public scope (kset mess in the kobject.c file still uses it,
but that can be cleaned up later very simply.)Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Now that the old kobject_add() function is gone, rename kobject_add_ng()
to kobject_add() to clean up the namespace.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
The old kobject_add() function is on longer in use, so let us remove it
from the public scope (kset mess in the kobject.c file still uses it,
but that can be cleaned up later very simply.)Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
/sys/power should not be a kset, that's overkill. This patch renames it
to power_kset and fixes up all usages of it in the tree.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
These functions are no longer used and are the last remants of the old
subsystem crap. So delete them for good.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
kernel_kset does not need to be a kset, but a much simpler kobject now
that we have kobj_attributes.We also rename kernel_kset to kernel_kobj to catch all users of this
symbol with a build error instead of an easy-to-ignore build warning.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
This macro is no longer used. ksets should be created dynamically with
a call to kset_create_and_add() not declared statically.Yes, there are 5 remaining static struct kset usages in the kernel tree,
but they will be fixed up soon.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
There is no firmware "subsystem" it's just a directory in /sys that
other portions of the kernel want to hook into. So make it a kobject
not a kset to help alivate anyone who tries to do some odd kset-like
things with this.Cc: Kay Sievers
Cc: Cornelia Huck
Signed-off-by: Greg Kroah-Hartman -
Remove the no longer needed subsys_attributes, they are all converted to
the more sensical kobj_attributes.There is no longer a magic fallback in sysfs attribute operations, all
kobjects which create simple attributes need explicitely a ktype
assigned, which tells the core what was intended here.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
…ead firmware_register interface
Needed for future firmware subsystem cleanups.
In the end, the firmware_register/unregister functions will be deleted
entirely, but we need this symbol so that subsystems can migrate over.Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: Matt Tolentino <matthew.e.tolentino@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> -
Add kobj_sysfs_ops to replace subsys_sysfs_ops. There is no
need for special kset operations, we want to be able to use
simple attribute operations at any kobject, not only ksets.The whole concept of any default sysfs attribute operations
will go away with the upcoming removal of subsys_sysfs_ops.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Dynamically create the kset instead of declaring it statically. We also
rename power_subsys to power_kset to catch all users of the variable and
we properly export it so that people don't have to guess that it really
is present in the system.The pseries code is wierd, why is it createing /sys/power if CONFIG_PM
is disabled? Oh well, stupid big boxes ignoring config options...Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
We don't need a kset here, a simple kobject will do just fine, so
dynamically create the kobject and use it.We also rename hypervisor_subsys to hypervisor_kset to catch all users
of the variable.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Dynamically create the kset instead of declaring it statically. We also
rename kernel_subsys to kernel_kset to catch all users of this symbol
with a build error instead of an easy-to-ignore build warning.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
The last user of this macro (pci hotplug core) is now switched over to
using a dynamic kset, so this macro is no longer needed at all.Cc: Kay Sievers
Cc: Kristen Carlson Accardi
Signed-off-by: Greg Kroah-Hartman