Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752150AbdCHKLD (ORCPT ); Wed, 8 Mar 2017 05:11:03 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:46776 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751093AbdCHKK6 (ORCPT ); Wed, 8 Mar 2017 05:10:58 -0500 Date: Wed, 8 Mar 2017 10:45:26 +0100 From: Greg KH To: Cheah Kok Cheong Cc: devel@driverdev.osuosl.org, abbotti@mev.co.uk, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] Staging: comedi: comedi_fops: Change comedi_num_legacy_minors type Message-ID: <20170308094526.GA30552@kroah.com> References: <20170307190137.GA6373@kroah.com> <20170308093812.GA2496@linux-Precision-WorkStation-T5500> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170308093812.GA2496@linux-Precision-WorkStation-T5500> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1143 Lines: 38 On Wed, Mar 08, 2017 at 05:38:12PM +0800, Cheah Kok Cheong wrote: > Dear Greg, > Thanks for taking the time to review. > > On Tue, Mar 07, 2017 at 08:01:38PM +0100, Greg KH wrote: > > On Sun, Mar 05, 2017 at 03:22:32AM +0800, Cheah Kok Cheong wrote: > > > Change to unsigned to allow removal of negative value check in > > > init section. > > > > Why? > > > > User can input a -ve number as parameter for module loading. Then they are foolish to do so :) > This will be caught by the mentioned check and cause loading to fail. > I think the original intention here is to inform user via kernel log > the acceptable input range. Either is fine. > Now if a user doesn't know how to access the log, it's of no help. They know how to set a module parameter as root but do not know of the kernel log? That's trying a bit too hard :) > If a user does know how to access the log, probably also know how > to use modinfo or know that reserving a -ve number of minors is > not acceptable. > > IMHO, this check is pointless and best enforced in module_param. Ok, but it's really a minor, or no, real issue at all here. thanks, greg k-h