From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752354AbbE0HVU (ORCPT ); Wed, 27 May 2015 03:21:20 -0400 Received: from hofr.at ([212.69.189.236]:58668 "EHLO mail.hofr.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751384AbbE0HVT (ORCPT ); Wed, 27 May 2015 03:21:19 -0400 Date: Wed, 27 May 2015 09:21:17 +0200 From: Nicholas Mc Guire To: Jiri Slaby Cc: Nicholas Mc Guire , Josh Poimboeuf , Seth Jennings , Jiri Kosina , Vojtech Pavlik , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] livepatch: match return value to function signature Message-ID: <20150527072117.GA32268@opentech.at> References: <1431323549-27343-1-git-send-email-hofrat@osadl.org> <5550674A.4030203@suse.cz> <20150527065605.GA11782@opentech.at> <55656EBC.4030200@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55656EBC.4030200@suse.cz> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 27 May 2015, Jiri Slaby wrote: > On 05/27/2015, 08:56 AM, Nicholas Mc Guire wrote: > > On Mon, 11 May 2015, Jiri Slaby wrote: > > > >> On 05/11/2015, 07:52 AM, Nicholas Mc Guire wrote: > >>> klp_initialized() should return bool but is actually returning > >>> struct kobject * - convert it to a boolean explicitly. > >>> > >>> Signed-off-by: Nicholas Mc Guire > >> > >> Reviewed-by: Jiri Slaby > >> > > sorry for the noise - discussions about a similar "cleanup" in RCU > > resulted Joe Perches clarifying the matter - this > > explicit conversion makes static code checkers happy but is not > > needed for gcc (or C for that mater) - see > > http://lkml.org/lkml/2015/5/24/47 > > and ISO/IEC 9899:1999 (c99) 6.8.6.4 subclause 3) > > Oh yes and I seem to be inconsistent with replies: > https://lkml.org/lkml/2015/5/26/90 > > > hofrat > > You? Nuremberg, 2010, Stanse? > Nop - coccinelle scripts - but I guess other static code checkers would have that issue as well if they look at types of variables and not take possible implicit conversions into account. stanse is on my TODO list for SIL2LinuxMP (formal qualification of Linux according to IEC 61508 Ed 2 to Systematic Capability level SC 2) thx! hofrat