Skip to content

Lenovo T490s error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types] #32

Description

@ealcaniz

I am trying with Fedora 33 and Lenovo T490S

[ealcaniz@ealcaniz acpi_call]$ make && sudo make install
make -C /lib/modules/5.10.22-200.fc33.x86_64/build M=/home/ealcaniz/git/acpi_call modules
make[1]: Entering directory '/usr/src/kernels/5.10.22-200.fc33.x86_64'
CC [M] /home/ealcaniz/git/acpi_call/acpi_call.o
/home/ealcaniz/git/acpi_call/acpi_call.c: In function ‘init_acpi_call’:
/home/ealcaniz/git/acpi_call/acpi_call.c:355:53: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
355 | &proc_acpi_operations);
| ^~~~~~~~~~~~~~~~~~~~~
| |
| struct file_operations *
In file included from /home/ealcaniz/git/acpi_call/acpi_call.c:6:
./include/linux/proc_fs.h:109:122: note: expected ‘const struct proc_ops *’ but argument is of type ‘struct file_operations *’
109 | struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:279: /home/ealcaniz/git/acpi_call/acpi_call.o] Error 1
make[1]: *** [Makefile:1802: /home/ealcaniz/git/acpi_call] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.10.22-200.fc33.x86_64'
make: *** [Makefile:8: default] Error 2

Any ideas?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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