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

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

Open
adroutley opened this issue Dec 24, 2024 · 0 comments

Comments

@adroutley
Copy link

Getting the make error below. i think proc_create has changed. will this be updated for 6.12 kernel?

uname -a
Linux localhost.localdomain 6.12.4-241211-netboot #4 SMP PREEMPT_DYNAMIC Thu Dec 19 16:00:25 MST 2024 x86_64 x86_64 x86_64
andrew@localhost:/kernel/linux-6.12.4/drivers/andrewroutley/toa/src> cat /etc/os-release

NAME="openSUSE Leap"
VERSION="15.6"

andrew@localhost:/kernel/linux-6.12.4/drivers/andrewroutley/toa/src> make
make CONFIG_TOA=m -C /lib/modules/uname -r/build M=pwd modules
make[1]: Entering directory '/kernel/linux-6.12.4'
CC [M] /kernel/linux-6.12.4/drivers/andrewroutley/toa/src/toa.o
/kernel/linux-6.12.4/drivers/andrewroutley/toa/src/toa.c: In function ‘toa_init’:
/kernel/linux-6.12.4/drivers/andrewroutley/toa/src/toa.c:468:49: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
proc_create("toa_stats", 0, init_net.proc_net, &toa_stats_fops);
^
In file included from /kernel/linux-6.12.4/drivers/andrewroutley/toa/src/toa.h:18:0,
from /kernel/linux-6.12.4/drivers/andrewroutley/toa/src/toa.c:1:
./include/linux/proc_fs.h:111:24: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
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[3]: *** [scripts/Makefile.build:229: /kernel/linux-6.12.4/drivers/andrewroutley/toa/src/toa.o] Error 1
make[2]: *** [/kernel/linux-6.12.4/Makefile:1936: /kernel/linux-6.12.4/drivers/andrewroutley/toa/src] Error 2
make[1]: *** [Makefile:224: __sub-make] Error 2
make[1]: Leaving directory '/kernel/linux-6.12.4'
make: *** [Makefile:8: default] Error 2

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

1 participant