Skip to content

Looks like a kernel sysfs API mismatch #17

@trinashih

Description

@trinashih

looks like a kernel sysfs API mismatch on new kernel. mine is 6.18.2

make -C /lib/modules/uname -r/build M=$PWD modules
make[1]: Entering directory '/usr/src/linux-headers-6.18.2-amdsos-build70-ubuntu-24.04+'
make[2]: Entering directory '/home/amd/amd_hsmp'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Ubuntu 11.4.0-1ubuntu122.04.2) 11.4.0
You are using: gcc (Ubuntu 13.3.0-6ubuntu2
24.04.1) 13.3.0
CC [M] acpi.o
acpi.c:592:10: error: ‘const struct bin_attribute’ has no member named ‘read_new’
592 | .read_new = hsmp_metric_tbl_acpi_read,
| ^~~~~~~~
acpi.c:592:21: warning: initialization of ‘long unsigned int’ from ‘ssize_t (*)(struct file *, struct kobject *, const struct bin_attribute *, char , loff_t, size_t)’ {aka ‘long int ()(struct file *, struct kobject *, const struct bin_attribute *, char *, long long int, long unsigned int)’} makes integer from pointer without a cast [-Wint-conversion]
592 | .read_new = hsmp_metric_tbl_acpi_read,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
acpi.c:592:21: note: (near initialization for ‘hsmp_metric_tbl_attr.size’)
acpi.c:655:10: error: ‘const struct attribute_group’ has no member named ‘bin_attrs_new’; did you mean ‘bin_attrs’?
655 | .bin_attrs_new = hsmp_attr_list,
| ^~~~~~~~~~~~~
| bin_attrs
acpi.c:655:26: error: initialization of ‘const char *’ from incompatible pointer type ‘const struct bin_attribute **’ [-Werror=incompatible-pointer-types]
655 | .bin_attrs_new = hsmp_attr_list,
| ^~~~~~~~~~~~~~
acpi.c:655:26: note: (near initialization for ‘hsmp_attr_grp.name’)
cc1: some warnings being treated as errors
make[4]: *** [/usr/src/linux-headers-6.18.2-amdsos-build70-ubuntu-24.04+/scripts/Makefile.build:287: acpi.o] Error 1
make[3]: *** [/usr/src/linux-headers-6.18.2-amdsos-build70-ubuntu-24.04+/Makefile:2010: .] Error 2
make[2]: *** [/usr/src/linux-headers-6.18.2-amdsos-build70-ubuntu-24.04+/Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/home/amd/amd_hsmp'
make[1]: *** [Makefile:248: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.18.2-amdsos-build70-ubuntu-24.04+'
make: *** [Makefile:16: default] Error 2
amd@morocco-0416-host:~/amd_hsmp$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions