[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20210510134238.4905-1-youling257@gmail.com>
Date: Mon, 10 May 2021 21:42:38 +0800
From: youling257 <youling257@...il.com>
To: adobriyan@...il.com
Cc: akpm@...ux-foundation.org, linux-arch@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] proc: convert everything to "struct proc_ops"
Hi, my xt_qtaguid module need convert to "struct proc_ops",
https://github.com/youling257/android-4.9/commit/a6e3cddcceb96eb3edeb0da0951399b75d4f8731
https://github.com/youling257/android-4.9/commit/9eb92f5bcdcbc5b54d7dfe4b3050c8b9b8a17999
static const struct proc_ops qtudev_proc_ops = {
.proc_open = qtudev_open,
.proc_release = qtudev_release,
};
static struct miscdevice qtu_device = {
.minor = MISC_DYNAMIC_MINOR,
.name = QTU_DEV_NAME,
.fops = &qtudev_proc_ops,
/* How sad it doesn't allow for defaults: .mode = S_IRUGO | S_IWUSR */
};
I have problem about ".fops = &qtudev_fops,", convert to ".fops = &qtudev_proc_ops," is right?
build error, can you help me?
CALL /root/1/scripts/atomic/check-atomics.sh
CALL /root/1/scripts/checksyscalls.sh
CHK include/generated/compile.h
CC net/netfilter/xt_qtaguid.o
/root/1/net/netfilter/xt_qtaguid.c:2895:10: error: initialization of ‘const struct file_operations *’ from incompatible pointer type ‘const struct proc_ops *’ [-Werror=incompatible-pointer-types]
2895 | .fops = &qtudev_proc_ops,
| ^
/root/1/net/netfilter/xt_qtaguid.c:2895:10: note: (near initialization for ‘qtu_device.fops’)
cc1: some warnings being treated as errors
Powered by blists - more mailing lists