[PATCH] sysfs: Unbreak the build around sysfs_bin_attr_simple_read()

2024-05-23 Thread Lukas Wunner
b0027-b199-4de7-b83d-668171447...@roeck-us.net Signed-off-by: Lukas Wunner --- include/linux/sysfs.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index a7d725fbf739..c4e64dc11206 100644 --- a/include/linux/sysfs.h +++ b/include/l

Re: [PATCH 0/6] Deduplicate string exposure in sysfs

2024-05-04 Thread Lukas Wunner
Dear Greg, On Sat, Apr 20, 2024 at 10:00:00PM +0200, Lukas Wunner wrote: > Introduce a generic ->show() callback to expose a string as a device > attribute in sysfs. Deduplicate various identical callbacks across > the tree. > > Result: Minus 216 LoC, minus 1576 bytes vm

[PATCH 1/6] driver core: Add device_show_string() helper for sysfs attributes

2024-04-20 Thread Lukas Wunner
isting DEVICE_ULONG_ATTR() and similar macros to ease declaration of string attributes. Signed-off-by: Lukas Wunner --- arch/powerpc/perf/hv-24x7.c | 10 -- drivers/base/core.c | 9 + include/linux/device.h | 15 +++ 3 files changed, 24 insertions(+), 10 del

[PATCH 0/6] Deduplicate string exposure in sysfs

2024-04-20 Thread Lukas Wunner
hes. Lukas Wunner (6): driver core: Add device_show_string() helper for sysfs attributes hwmon: Use device_show_string() helper for sysfs attributes IB/qib: Use device_show_string() helper for sysfs attributes perf: Use device_show_string() helper for sysfs attributes platform/x86:

Re: [PATCH 0/2] Deduplicate bin_attribute simple read() callbacks

2024-04-11 Thread Lukas Wunner
On Thu, Apr 11, 2024 at 03:07:46PM +0200, Greg Kroah-Hartman wrote: > On Sat, Apr 06, 2024 at 03:52:00PM +0200, Lukas Wunner wrote: > > For my upcoming PCI device authentication v2 patches, I have the need > > to expose a simple buffer in virtual memory as a bin_attribute. > &

[PATCH 1/2] sysfs: Add sysfs_bin_attr_simple_read() helper

2024-04-06 Thread Lukas Wunner
_SIMPLE_RO() and BIN_ATTR_SIMPLE_ADMIN_RO() macros to ease declaration of such bin_attributes and reduce LoC and .text section size. Signed-off-by: Lukas Wunner --- fs/sysfs/file.c | 27 +++ include/linux/sysfs.h | 15 +++ 2 files changed, 42 insertions(+) diff --git a

[PATCH 2/2] treewide: Use sysfs_bin_attr_simple_read() helper

2024-04-06 Thread Lukas Wunner
_RO(). Aside from a reduction of LoC, this shaves off a few bytes from vmlinux (304 bytes on an x86_64 allyesconfig). No functional change intended. Signed-off-by: Lukas Wunner --- arch/powerpc/platforms/powernv/opal.c | 10 + drivers/acpi/bgrt.c|

[PATCH 0/2] Deduplicate bin_attribute simple read() callbacks

2024-04-06 Thread Lukas Wunner
decided to introduce a common helper and eliminate all duplications I could find. I'm open to a bikeshedding discussion on the sysfs_bin_attr_simple_read() name. ;) Lukas Wunner (2): sysfs: Add sysfs_bin_attr_simple_read() helper treewide: Use sysfs_bin_attr_simple_read() helper

Re: [PATCH v2 1/2] PCI: Add TLP Prefix reading into pcie_read_tlp_log()

2024-04-04 Thread Lukas Wunner
On Wed, Apr 03, 2024 at 01:02:05PM +0300, Ilpo Järvinen wrote: > pcie_read_tlp_log() handles only 4 TLP Header Log DWORDs but TLP Prefix > Log (PCIe r6.1 secs 7.8.4.12 & 7.9.14.13) may also be present. > > Generalize pcie_read_tlp_log() and struct pcie_tlp_log to handle also > TLP Prefix Log. The

Re: [RFC PATCH v2 2/3] dt-bindings: tpm: Add linux,sml-log to ibm,vtpm.yaml

2024-03-12 Thread Lukas Wunner
On Mon, Mar 11, 2024 at 09:20:29AM -0400, Stefan Berger wrote: > Add linux,sml-log, which carries the firmware TPM log in a uint8-array, to > the properties. Either this property is required or both linux,sml-base and > linux,sml-size are required. Add a test case for verification. > > Fixes: 8200

Re: [PATCH v6 6/7] PCI: pciehp: Rely on `link_active_reporting'

2023-02-13 Thread Lukas Wunner
On Sun, Feb 05, 2023 at 03:49:21PM +, Maciej W. Rozycki wrote: > Use `link_active_reporting' to determine whether Data Link Layer Link > Active Reporting is available rather than re-retrieving the capability. > > Signed-off-by: Maciej W. Rozycki Reviewed-by: Lukas Wunner

Re: [RFC PATCH 6/7] serial: General support for multipoint addresses

2022-03-09 Thread Lukas Wunner
On Mon, Mar 07, 2022 at 11:48:01AM +0200, Ilpo Järvinen wrote: > On Sun, 6 Mar 2022, Lukas Wunner wrote: > > On Wed, Mar 02, 2022 at 11:56:05AM +0200, Ilpo Järvinen wrote: > > > This change is necessary for supporting devices with RS485 > > > multipoint addressing [*

Re: [RFC PATCH 6/7] serial: General support for multipoint addresses

2022-03-06 Thread Lukas Wunner
On Wed, Mar 02, 2022 at 11:56:05AM +0200, Ilpo Järvinen wrote: > This patch adds generic support for serial multipoint > addressing. Two new ioctls are added. TIOCSADDR is used to Nit: "This patch adds..." is superfluous. Just write "Add ..." in imperative mood. > This change is necessary for

[PATCH 0/9] PCI hotplug diet

2018-08-19 Thread Lukas Wunner
base patch [4/9] ("PCI: pciehp: Unify controller and slot structs"). No big deal, just a heads-up. Thanks, Lukas Lukas Wunner (9): PCI: Simplify disconnected marking PCI: pciehp: Drop unnecessary includes PCI: pciehp: Drop hotplug_slot_ops wrappers PCI: pciehp: Unify controller a

[PATCH 8/9] PCI: hotplug: Embed hotplug_slot

2018-08-19 Thread Lukas Wunner
nting nowhere either accidentally or due to an attack. Convert all drivers to embed struct hotplug_slot in their internal slot struct. The "private" pointer in struct hotplug_slot thereby becomes unused, so drop it. Signed-off-by: Lukas Wunner Cc: Rafael J. Wysocki Cc: Len Brown

[PATCH 6/9] PCI: hotplug: Constify hotplug_slot_ops

2018-08-19 Thread Lukas Wunner
lists/kernel-hardening/2016/11/16/3 Signed-off-by: Lukas Wunner Cc: Rafael J. Wysocki Cc: Len Brown Cc: Scott Murray Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Gavin Shan Cc: Sebastian Ott Cc: Gerald Schaefer Cc: Corentin Chary Cc: Darren Hart Cc: Andy S

[PATCH 7/9] PCI: hotplug: Drop hotplug_slot_info

2018-08-19 Thread Lukas Wunner
eeds to be executed at least once on probe. That seems unlikely to me, still maintainers should review the changes carefully for this possibility. Signed-off-by: Lukas Wunner Cc: Rafael J. Wysocki Cc: Len Brown Cc: Scott Murray Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerm

Re: [PATCH 2/3] Split VGA default device handler out of VGA arbiter

2017-08-05 Thread Lukas Wunner
On Fri, Aug 04, 2017 at 08:20:32PM +1000, Daniel Axtens wrote: > A system without PCI legacy resources (e.g. ARM64, powerpc) may > find that no default/boot VGA device has been marked, because the > VGA arbiter checks for legacy resource decoding before marking a > card as default. Would it be fea