From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753434AbdKWXrZ (ORCPT ); Thu, 23 Nov 2017 18:47:25 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:41694 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753368AbdKWXrY (ORCPT ); Thu, 23 Nov 2017 18:47:24 -0500 X-Google-Smtp-Source: AGs4zMaG+XeZlZ8fd2rhnDzpXUM8N1AbycPp1pgg4PG1YNBfrU7Qi9u1I41du5UewrCcpwu/El48FQ== Message-ID: <1511480841.8829.3.camel@gmail.com> Subject: Re: [PATCH 1/4] staging: lustre: fixed signedness of some socklnd params From: Stefano Manni To: Dan Carpenter Cc: Oleg Drokin , Andreas Dilger , James Simmons , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, lustre-devel@lists.lustre.org Date: Fri, 24 Nov 2017 00:47:21 +0100 In-Reply-To: <20171123121306.nu66ktiqjedongpp@mwanda> References: <20171122193831.11801-1-stefano.manni@gmail.com> <20171122193831.11801-2-stefano.manni@gmail.com> <20171123121306.nu66ktiqjedongpp@mwanda> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-2.fc25) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2017-11-23 at 15:13 +0300, Dan Carpenter wrote: > 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 > I've made the module param nsched signed because the ksock_tunables.ksnd_nscheds (the real container) is signed too. I definitely agree with you that it does not make sense to have a negative number of threads. In my opinion it's better to fix this inconsistency between the param and the container and then try submit another patch to harmonize signedness around the code. Thanks, Stefano