<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/edac/edac_device_sysfs.c, branch linux-7.1.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-03-11T21:33:38+00:00</updated>
<entry>
<title>EDAC/device: Allow addition of const sysfs attributes</title>
<updated>2026-03-11T21:33:38+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-02-23T21:16:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f1260c89347e45d2ebd05d930a71c6263f4a3b7'/>
<id>urn:sha1:2f1260c89347e45d2ebd05d930a71c6263f4a3b7</id>
<content type='text'>
The generic EDAC sysfs code does not need to modify these structs.
Allow the drivers to add read-only ones.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://patch.msgid.link/20260223-sysfs-const-edac-v1-6-3ff0b87249e7@weissschuh.net
</content>
</entry>
<entry>
<title>EDAC/device: Constify info sysfs attributes</title>
<updated>2026-03-11T21:20:20+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-02-23T21:16:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e72e70870a0b4955ca74e2a715f9bda4c08b252c'/>
<id>urn:sha1:e72e70870a0b4955ca74e2a715f9bda4c08b252c</id>
<content type='text'>
These structures are never modified, mark them read-only.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://patch.msgid.link/20260223-sysfs-const-edac-v1-4-3ff0b87249e7@weissschuh.net
</content>
</entry>
<entry>
<title>EDAC/device: Drop unnecessary and dangerous casts of attributes</title>
<updated>2026-03-11T21:20:11+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-02-23T21:16:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=495e77a575a1f3637cfc0cff53d889316dd00594'/>
<id>urn:sha1:495e77a575a1f3637cfc0cff53d889316dd00594</id>
<content type='text'>
These casts assume that the struct attribute is at the beginning of struct
edac_dev_sysfs_block_attribute. This is can silently break if the field is
moved, either manually or through struct randomization.

Use proper member syntax to get the field address and drop the casts.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://patch.msgid.link/20260223-sysfs-const-edac-v1-3-3ff0b87249e7@weissschuh.net
</content>
</entry>
<entry>
<title>EDAC/device: Drop unused macro to_edacdev_attr()</title>
<updated>2026-03-11T19:58:16+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-02-23T21:16:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c43c3b8fb39a3cc96f0cea9ca30e3e39ec696490'/>
<id>urn:sha1:c43c3b8fb39a3cc96f0cea9ca30e3e39ec696490</id>
<content type='text'>
This macro is unused, drop it.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://patch.msgid.link/20260223-sysfs-const-edac-v1-2-3ff0b87249e7@weissschuh.net
</content>
</entry>
<entry>
<title>EDAC/device: Remove edac_dev_sysfs_block_attribute::store()</title>
<updated>2024-03-27T17:26:57+00:00</updated>
<author>
<name>Jiri Slaby (SUSE)</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2024-02-13T11:20:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9186695ef709933eee8fc96a706bcbd6aec1b396'/>
<id>urn:sha1:9186695ef709933eee8fc96a706bcbd6aec1b396</id>
<content type='text'>
No one uses this store hook (both BLOCK_ATTR() pass NULL). It actually
never was since its addition in

  fd309a9d8e63 ("drivers/edac: fix leaf sysfs attribute")

so drop it.

Found by https://github.com/jirislaby/clang-struct.

Signed-off-by: Jiri Slaby (SUSE) &lt;jirislaby@kernel.org&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://lore.kernel.org/r/20240213112051.27715-4-jirislaby@kernel.org
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
</content>
</entry>
<entry>
<title>EDAC: constantify the struct bus_type usage</title>
<updated>2024-01-04T13:34:27+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-12-19T13:13:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f36be9ce8146faabdbbf74ee0499edb2039c53a5'/>
<id>urn:sha1:f36be9ce8146faabdbbf74ee0499edb2039c53a5</id>
<content type='text'>
In many places in the edac code, struct bus_type pointers are passed
around and then eventually sent to the driver core, which can handle a
constant pointer.  So constantify all of the edac usage of these as well
because the data in them is never modified by the edac code either.

Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: James Morse &lt;james.morse@arm.com&gt;
Cc: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Cc: Robert Richter &lt;rric@kernel.org&gt;
Cc:  &lt;linux-edac@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/2023121909-tribute-punctuate-4b22@gregkh
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>EDAC/sysfs: move to use bus_get_dev_root()</title>
<updated>2023-03-22T08:25:49+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-03-13T18:28:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cb4a0bec0bb982991b27d6826f3372890cebb8ab'/>
<id>urn:sha1:cb4a0bec0bb982991b27d6826f3372890cebb8ab</id>
<content type='text'>
Direct access to the struct bus_type dev_root pointer is going away soon
so replace that with a call to bus_get_dev_root() instead, which is what
it is there for.

Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: James Morse &lt;james.morse@arm.com&gt;
Cc: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Cc: Robert Richter &lt;rric@kernel.org&gt;
Cc: linux-edac@vger.kernel.org
Link: https://lore.kernel.org/r/20230313182918.1312597-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>EDAC/device: Get rid of the silly one-shot memory allocation in edac_device_alloc_ctl_info()</title>
<updated>2022-04-11T09:43:26+00:00</updated>
<author>
<name>Borislav Petkov</name>
<email>bp@suse.de</email>
</author>
<published>2022-03-08T13:16:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9fb9ce392aae0c6654efc42c80e2f6bab88d5fe3'/>
<id>urn:sha1:9fb9ce392aae0c6654efc42c80e2f6bab88d5fe3</id>
<content type='text'>
Use boring kzalloc() instead. Add pointers to the different allocated
members in struct edac_device_ctl_info for easier freeing later.

One of the reasons, perhaps, why it was done this way is to be able to
do a single kfree(ctl_info) without having to kfree() the other parts of
the struct too but that is not nearly a sensible reason as to why there
should be this obscure pointer alignment.

There should be no functional changes resulting from this.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20220310095254.1510-4-bp@alien8.de
</content>
</entry>
<entry>
<title>EDAC: Use default_groups in kobj_type</title>
<updated>2022-01-23T19:01:29+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2022-01-04T11:24:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=625c6b55699777ece6b87235f579e2cfbde049ce'/>
<id>urn:sha1:625c6b55699777ece6b87235f579e2cfbde049ce</id>
<content type='text'>
There are currently 2 ways to create a set of sysfs files for a
kobj_type, through the default_attrs field, and the default_groups
field. Move the edac sysfs code to use default_groups field which has
been the preferred way since

  aa30f47cf666 ("kobject: Add support for default attribute groups to kobj_type")

so that the obsolete default_attrs field can be removed soon.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20220104112401.1067148-2-gregkh@linuxfoundation.org
</content>
</entry>
<entry>
<title>EDAC: Use proper list of struct attribute for attributes</title>
<updated>2022-01-23T19:01:25+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2022-01-04T11:24:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=11413893a0d0b19df976eb9a2b600ba56802db2f'/>
<id>urn:sha1:11413893a0d0b19df976eb9a2b600ba56802db2f</id>
<content type='text'>
The EDAC sysfs code is doing some crazy casting of the list of
attributes that is not necessary at all. Instead, properly point to the
correct attribute structure in the lists, which removes the need to
cast anything and the code is now properly typesafe (as much as sysfs
attribute logic is typesafe...)

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20220104112401.1067148-1-gregkh@linuxfoundation.org
</content>
</entry>
</feed>
