Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3610888imj; Tue, 12 Feb 2019 01:30:40 -0800 (PST) X-Google-Smtp-Source: AHgI3Ib0fkeQ12PFKO0pydXs94/bsTVWYpnZJZBBQmx6vTqW1Aw60C74dd57qT9GlGd0/hLCRIhr X-Received: by 2002:a63:da45:: with SMTP id l5mr2778434pgj.111.1549963839894; Tue, 12 Feb 2019 01:30:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549963839; cv=none; d=google.com; s=arc-20160816; b=gPCSDBVd88GDTAqKwEhPH9HQ6YX/YznWD2uer4CsAAEBoivxPRh+sVfs/y3fZKpVOP Ggtw4SWD9GL0zPSUOVT3ZNoLDsCWJPy+mywDcr+8e7jA2/AxUiB2OO2AnflWl+KcWYAN n7uQ1TSHXGkH6w5Z2WsR2lKp8tYi5V/+9jf7jTJg+vmJ7PXkkUxcPuo3Vd+V7M5vwfZw rDlCBIjUvRiMq/ytFTO+zFVNQKPHnypa8EfYx5jaTf8rl4ww4rSfwbR41kh7JZ49uGXx Jjtniwtc0r0DDlgZP+lbUv7rKmcuSNVv/N9fbrfmOI56KbDsCzceZ3sVj7rlvXsCgNN9 6ppw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oXGHFFcCyZ8hwYGbciVwKen6NkbUeECNl1GtA/Icf68=; b=Fldp+T4l3Cq9eeuhEC9q2QqRm5PABS8XBDHe1fqMJG2OxxYWHvDjy55H35HwySJKgu SwisI/d4W05lBEkPFXHeLoba85vI5LwL/dTSgy/mF8MoJWoLeCUuXGHof8UV/JeGa2hP 0n88y/Lc3Cq3X9+zf0lnEDJtP6lebBY5Zn1++a6BQPw+1loCmXzZeNCxE0ezYj8eq413 0kY6VlgG1zwsLsz5MzveTqVhN6FsO1wEKPs46LZxQnC+76+l/YwthKVZMXN9ivqTrw+7 4mT40Hg2ox4HqOVYm9TZK/PaomKe2zqioWZZW6WlrufCzcVQeRgA6DPv3XxQ7YcYBOBu WUUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PZC9jMEu; 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 82si12330834pga.270.2019.02.12.01.30.23; Tue, 12 Feb 2019 01:30:39 -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; dkim=pass header.i=@kernel.org header.s=default header.b=PZC9jMEu; 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 S1728820AbfBLJ3F (ORCPT + 99 others); Tue, 12 Feb 2019 04:29:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:35122 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726040AbfBLJ3E (ORCPT ); Tue, 12 Feb 2019 04:29:04 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 03B6821773; Tue, 12 Feb 2019 09:29:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549963744; bh=7KPgEae8NuzgqM4QBhof7ZyaLH5S80CGzFD8+aCtXXY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PZC9jMEuS/eogngwxO6BEdRXuIu4QrVKyzZuMuIuHBzyX6QhI0V0UexcLOd4Gs0Eh zEBl0zR+/Mj91Rlgczx7Nssy/m/aRYEsrWRXvYETjdBogLovA54mo5HH85eFQBJXbQ eZrNiHiuPEAPUG8xuvGovDpsXh/0Vr0nG3Xh2Ozw= Date: Tue, 12 Feb 2019 10:29:02 +0100 From: Greg KH To: Chengguang Xu Cc: tomas.winkler@intel.com, arnd@arndb.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mei: expand minor range when registering chrdev region Message-ID: <20190212092902.GD27450@kroah.com> References: <20190212060252.8948-1-cgxu519@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190212060252.8948-1-cgxu519@gmx.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 12, 2019 at 02:02:52PM +0800, Chengguang Xu wrote: > 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) Why is this needed? Have you really run out of that many minor nodes for this driver? thanks, greg k-h