Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752213AbbEYLky (ORCPT ); Mon, 25 May 2015 07:40:54 -0400 Received: from mail-qg0-f54.google.com ([209.85.192.54]:33724 "EHLO mail-qg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751096AbbEYLkt (ORCPT ); Mon, 25 May 2015 07:40:49 -0400 Date: Mon, 25 May 2015 07:40:45 -0400 From: Tejun Heo To: Nicholas Mc Guire Cc: Nicholas Mc Guire , Li Zefan , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cgroup: add explicit cast and comment for return type conversion Message-ID: <20150525114045.GA526@htj.duckdns.org> References: <1432472872-3578-1-git-send-email-hofrat@osadl.org> <20150524203528.GB7099@htj.duckdns.org> <20150525055742.GE1397@opentech.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150525055742.GE1397@opentech.at> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1178 Lines: 27 Hello, Nicholas. On Mon, May 25, 2015 at 07:57:42AM +0200, Nicholas Mc Guire wrote: > nop not downward but signed/unsigned if it were down it would not be > a problem but signed/unsigned can be - for those cases where it can't > be fixed up by changing the declarations or return variable types > explicit cast might make sense - as noted in the patch Im not sure either > if this form of cleanups is helpful. > > In the kernel core there are about 400 signed/unsigned implicit > conversions (about 3k in the entire kernel) which is what Im trying to > remove or if that is not possible in a resonable way mark as false positive. I still don't get it. What does this buy us actually? If we continue to do this, people would just learn to add explicit cast when doing sign conversions. We just converge to a different behavior without actually gaining any protection. What's the benefit of doing this? Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/