From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79294CCA473 for ; Wed, 6 Jul 2022 15:51:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234736AbiGFPvC (ORCPT ); Wed, 6 Jul 2022 11:51:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234472AbiGFPus (ORCPT ); Wed, 6 Jul 2022 11:50:48 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5CE8B2AC5C; Wed, 6 Jul 2022 08:46:59 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7C8FB106F; Wed, 6 Jul 2022 08:46:59 -0700 (PDT) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5B6723F792; Wed, 6 Jul 2022 08:46:58 -0700 (PDT) Date: Wed, 6 Jul 2022 16:46:48 +0100 From: Cristian Marussi To: Dan Carpenter Cc: "Rafael J. Wysocki" , Sudeep Holla , linux-pm@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH 2/2] powercap: arm_scmi: Fix a NULL vs IS_ERR() bug Message-ID: References: <20220706153233.GH2338@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220706153233.GH2338@kadam> Precedence: bulk List-ID: X-Mailing-List: kernel-janitors@vger.kernel.org On Wed, Jul 06, 2022 at 06:32:33PM +0300, Dan Carpenter wrote: > On Wed, Jul 06, 2022 at 04:20:41PM +0100, Cristian Marussi wrote: > > May I ask which static checker you use ? Sparse/smatch and W=1 did not > > spot any of these issues (including other in the series) in my workflow ... > > > > These are Smatch warnings: > > $ kchecker drivers/powercap/arm_scmi_powercap.c > > Using test/ version of smatch > > CALL scripts/checksyscalls.sh > CALL scripts/atomic/check-atomics.sh > DESCEND objtool > CC [M] drivers/powercap/arm_scmi_powercap.o > CHECK drivers/powercap/arm_scmi_powercap.c > drivers/powercap/arm_scmi_powercap.c:429 scmi_powercap_probe() warn: unsigned 'pr->num_zones' is never less than zero. > drivers/powercap/arm_scmi_powercap.c:494 scmi_powercap_probe() error: uninitialized symbol 'ret'. > drivers/powercap/arm_scmi_powercap.c:521 scmi_powercap_init() warn: 'scmi_top_pcntrl' is an error pointer or valid > $ > > The problem is that the "is an error pointer or valid" requires the > cross function DB to work and that takes forever (over night on my > system). > Thanks. Turns out even my setup can spot it now (beside the last one), cause my workflow self checks were targeted at where is usually rooted my work drivers/firmware/arm_scmi/ ...so missing out completely on drivers/powercap ... my bad :< Regards Cristian