linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Moritz Fischer <moritz.fischer@ettus.com>
To: Chengguang Xu <cgxu519@gmx.com>
Cc: Wu Hao <hao.wu@intel.com>, Alan Tull <atull@kernel.org>,
	linux-fpga@vger.kernel.org
Subject: Re: [PATCH] fpga: expand minor range when registering chrdev region
Date: Tue, 12 Feb 2019 02:54:23 -0800	[thread overview]
Message-ID: <CAAtXAHck6a2LbWGb9Fu7+HP9Uz8oAhTOs9636AqD7P9SOSGi3A@mail.gmail.com> (raw)
In-Reply-To: <20190212062451.1354-1-cgxu519@gmx.com>

Hi Chengguang,

On Mon, Feb 11, 2019 at 10:25 PM Chengguang Xu <cgxu519@gmx.com> wrote:
>
> Actually, total amount of available minor number
> for a single major is MINORMARK + 1. So expand
Typo. MINORMASK?

> minor range when registering chrdev region

How does that manifest?
>
> Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
> ---
>  drivers/fpga/dfl.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/fpga/dfl.c b/drivers/fpga/dfl.c
> index 2c09e502e721..02fff566be46 100644
> --- a/drivers/fpga/dfl.c
> +++ b/drivers/fpga/dfl.c
> @@ -315,7 +315,7 @@ static void dfl_chardev_uinit(void)
>         for (i = 0; i < DFL_FPGA_DEVT_MAX; i++)
>                 if (MAJOR(dfl_chrdevs[i].devt)) {
>                         unregister_chrdev_region(dfl_chrdevs[i].devt,
> -                                                MINORMASK);
> +                                                MINORMASK + 1);
>                         dfl_chrdevs[i].devt = MKDEV(0, 0);
>                 }
>  }
> @@ -325,8 +325,8 @@ static int dfl_chardev_init(void)
>         int i, ret;
>
>         for (i = 0; i < DFL_FPGA_DEVT_MAX; i++) {
> -               ret = alloc_chrdev_region(&dfl_chrdevs[i].devt, 0, MINORMASK,
> -                                         dfl_chrdevs[i].name);
> +               ret = alloc_chrdev_region(&dfl_chrdevs[i].devt, 0,
> +                                         MINORMASK + 1, dfl_chrdevs[i].name);
>                 if (ret)
>                         goto exit;
>         }
> --
> 2.20.1
>

Thanks,
Moritz

  reply	other threads:[~2019-02-12 10:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12  6:24 [PATCH] fpga: expand minor range when registering chrdev region Chengguang Xu
2019-02-12 10:54 ` Moritz Fischer [this message]
2019-02-12 14:32   ` cgxu519
2019-02-21  5:17     ` Wu Hao

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=CAAtXAHck6a2LbWGb9Fu7+HP9Uz8oAhTOs9636AqD7P9SOSGi3A@mail.gmail.com \
    --to=moritz.fischer@ettus.com \
    --cc=atull@kernel.org \
    --cc=cgxu519@gmx.com \
    --cc=hao.wu@intel.com \
    --cc=linux-fpga@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).