From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752747AbdKWMOM (ORCPT ); Thu, 23 Nov 2017 07:14:12 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:26633 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751911AbdKWMOL (ORCPT ); Thu, 23 Nov 2017 07:14:11 -0500 Date: Thu, 23 Nov 2017 15:13:06 +0300 From: Dan Carpenter To: Stefano Manni Cc: Oleg Drokin , Andreas Dilger , James Simmons , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, lustre-devel@lists.lustre.org Subject: Re: [PATCH 1/4] staging: lustre: fixed signedness of some socklnd params Message-ID: <20171123121306.nu66ktiqjedongpp@mwanda> References: <20171122193831.11801-1-stefano.manni@gmail.com> <20171122193831.11801-2-stefano.manni@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171122193831.11801-2-stefano.manni@gmail.com> User-Agent: NeoMutt/20170609 (1.8.3) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 22, 2017 at 08:38:28PM +0100, Stefano Manni wrote: > diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c > index 5663a4c..2ad89ca 100644 > --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c > +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c > @@ -43,7 +43,7 @@ MODULE_PARM_DESC(peer_timeout, "Seconds without aliveness news to declare peer d > * Number of daemons in each thread pool which is percpt, > * we will estimate reasonable value based on CPUs if it's not set. > */ > -static unsigned int nscheds; > +static int nscheds; I've looked through this series and I feel like none of these are real bugs. It's just about type safety and being consistent. Which are good things. I'm not sure that I like the parts where we make the variables signed. Here "nscheds" is the number of threads. How can we have a negative number? I think it should be unsigned. It's way more tricky to change the rest of the code, and leave nscheds unsigned int but I think it's probably the right thing. regards, dan carpenter