Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ealcaniz opened this issue Mar 13, 2021 · 2 comments

Comments

@ealcaniz
Copy link

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?

@HenryRc0
Copy link

Hi ealcaniz,

The kernel interface has changed (already a couple releases ago).
What I did was to use the acpi_call module from tlp.

  1. Install the repo
    dnf install https://repo.linrunner.de/fedora/tlp/repos/releases/tlp-release.fc$(rpm -E %fedora).noarch.rpm

  2. install the module
    dnf install akmod-acpi_call

Works here on F34

@Tabish1511
Copy link

Hi ealcaniz,

The kernel interface has changed (already a couple releases ago). What I did was to use the acpi_call module from tlp.

  1. Install the repo
    dnf install https://repo.linrunner.de/fedora/tlp/repos/releases/tlp-release.fc$(rpm -E %fedora).noarch.rpm
  2. install the module
    dnf install akmod-acpi_call

Works here on F34

hey bud, I am having trouble with the above error, may you kindly explain your solution and how it ties with this 'usb-modeswitch'. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants