Hi Chengguang, On Mon, Feb 11, 2019 at 10:25 PM Chengguang Xu <cgxu519@xxxxxxx> 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@xxxxxxx> > --- > 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