Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3458014imj; Mon, 11 Feb 2019 22:04:46 -0800 (PST) X-Google-Smtp-Source: AHgI3IaRzcZvbE9Bd8noUKzV2qPCrd4+nd8WFKPN7dNKX7E2dwOrTbCskcxauC93nP3pjXnBHVB6 X-Received: by 2002:a63:bf4c:: with SMTP id i12mr2142080pgo.382.1549951486240; Mon, 11 Feb 2019 22:04:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549951486; cv=none; d=google.com; s=arc-20160816; b=vPkvtEDINeXbTsIo6U7qnemdOFCD5Bc4FwsCrpVIpNoNdLbc9VRZ5psLD+0DJMv+GG ZIOTK+k//En/oOMo6UuL9M6jbcim6CtNNUHBzziSV+hXxPxKzGZWLH7XeDe+21IcjJGg h9JywTDFdDCo7FC4fPtyq5rB7Nqsod/NVsmYuoZslPqAR3odIY04/Nz1Suq3aWovKQN0 /LMcEeT3dfbVXnIgStt73vR7jnjqyhot0RLJnNuoVE9B0bYy9YEJW3IKA00t5dF5eh7s rZk5ob9f+608pHxvdFTRKhtcGQtvehRJ6RU4//jDQrrJtclDsznbJ1mWrx2Ao3hkhcGJ GmAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=bWoFyVt/jgCvo1DOrGmzvUEpJDUsuXdFBhtxE668C2w=; b=DMyS+3NQB5aABV1iwNr+jE12wYGzlgKP3eIkTFKlwmcva3e30BEFWMUHg9Ju61WOCC p99HyIMBc8L2mVrk13v+AwJrPWR/uRMalheFgd5+OMLqpjwerMjn1KPSPSED8dKfRsdd uh+MBBduUiZkYgfgF+yQ/9u1fEfXeee5ane7PXQ939x59/pqIaHWAH5hXdYswCy3Gaq1 Vhnry+1f77CAvuNoRT/EYAZ2zhrlCdW2Bb1BvniZJHkDsHmTZ6fB6dDxzP27hj/NPIxi LJ+9ADHugr4qN+t+rjfYPPCiQO66Wb54emHCd7O4zeq4oFcVgjuF49ad6r2Sf0lR1qCT vSNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 93si1747197plc.2.2019.02.11.22.04.23; Mon, 11 Feb 2019 22:04:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727045AbfBLGDu (ORCPT + 99 others); Tue, 12 Feb 2019 01:03:50 -0500 Received: from mout.gmx.net ([212.227.15.19]:49157 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726003AbfBLGDu (ORCPT ); Tue, 12 Feb 2019 01:03:50 -0500 Received: from localhost.localdomain ([218.18.229.179]) by mail.gmx.com (mrgmx002 [212.227.17.184]) with ESMTPSA (Nemesis) id 0LtrKX-1h3eHb16SD-011BkY; Tue, 12 Feb 2019 07:03:43 +0100 From: Chengguang Xu To: tomas.winkler@intel.com, arnd@arndb.de, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Chengguang Xu Subject: [PATCH] mei: expand minor range when registering chrdev region Date: Tue, 12 Feb 2019 14:02:52 +0800 Message-Id: <20190212060252.8948-1-cgxu519@gmx.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:AFEpkk746hQ1g1EnyQqapKfE5WRcSJSYixM6Mildc9CVtEJe778 JfueeGaSJ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PBV05P2bUqnULtukX2oP8vpUs4rfLjC7xU/FHfmeLy70L HovxADEHf3EFCDv2zMBtbuj2l0Lt5WXRrBfor0YrORYVCsYpaoR29c4xfouuLT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Actually, total amount of available minor number for a single major is MINORMARK + 1. So expand minor range when registering chrdev region. Signed-off-by: Chengguang Xu --- drivers/misc/mei/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index 87281b3695e6..3df54f1e1a8b 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c @@ -869,7 +869,7 @@ static const struct file_operations mei_fops = { static struct class *mei_class; static dev_t mei_devt; -#define MEI_MAX_DEVS MINORMASK +#define MEI_MAX_DEVS (MINORMASK + 1) static DEFINE_MUTEX(mei_minor_lock); static DEFINE_IDR(mei_idr); -- 2.20.1