All of lore.kernel.org
 help / color / mirror / Atom feed
From: youling257 <youling257@gmail.com>
To: adobriyan@gmail.com
Cc: akpm@linux-foundation.org, linux-arch@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] proc: convert everything to "struct proc_ops"
Date: Mon, 10 May 2021 21:42:38 +0800	[thread overview]
Message-ID: <20210510134238.4905-1-youling257@gmail.com> (raw)
In-Reply-To: <20191225172546.GB13378@avx2>

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

  parent reply	other threads:[~2021-05-10 14:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-25 17:22 [PATCH 1/2] proc: decouple proc from VFS with " Alexey Dobriyan
2019-12-25 17:25 ` [PATCH 2/2] proc: convert everything to " Alexey Dobriyan
2019-12-31 23:01   ` Andrew Morton
2020-01-06 15:17     ` Alexey Dobriyan
2021-05-10 13:42   ` youling257 [this message]
2021-05-10 17:13     ` Alexey Dobriyan
2021-05-10 18:39       ` youling 257

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210510134238.4905-1-youling257@gmail.com \
    --to=youling257@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH 2/2] proc: convert everything to "struct proc_ops"' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.