From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="L1/kyVmI" Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 875DE19A3; Fri, 24 Nov 2023 06:38:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700836731; x=1732372731; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=QKgJEGRCbdv2EWGbewfRTODn2GZOxw9ytLOYIn7uuOQ=; b=L1/kyVmIVn1Dddb4n3hQEVXNkMjvRp0P2uctbs5mnDfvYCF85KU+wWWH X9T+2UrK5KleGAtP+JeWAASN7z4AvjkyXun7uX6Ry12ktp2WFjU1JN3wO SPP8LKF340YlD74jZv6un3ZcdaevZBVgkFlaI37+TiASAHyegMwQ3gpVT wvZ4XXGBZrblSZymOccm7KETGJV0p58RpqcmS7a4Lb8SkG3sSJMh07ZF4 di0kBDViFNRNdhDKU4J5A69UltanAMcxXnRkb11d3byVhN329eOsP0lfI QdpVpyeZtzQMsSnFa8OptGY58PPIu/V/SJScVdPNMvC2ecToQqdfIRPx8 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10904"; a="392198719" X-IronPort-AV: E=Sophos;i="6.04,224,1695711600"; d="scan'208";a="392198719" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 06:38:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10904"; a="743906526" X-IronPort-AV: E=Sophos;i="6.04,224,1695711600"; d="scan'208";a="743906526" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga006.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 06:38:42 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1r6XCh-0000000GjtS-2kli; Fri, 24 Nov 2023 16:30:47 +0200 Date: Fri, 24 Nov 2023 16:30:47 +0200 From: Andy Shevchenko To: kernel test robot Cc: Linus Walleij , Bartosz Golaszewski , Rasmus Villemoes , Jonathan =?iso-8859-1?Q?Neusch=E4fer?= , Krzysztof Kozlowski , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Geert Uytterhoeven , Biju Das , Claudiu Beznea , Jianlong Huang , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, openbmc@lists.ozlabs.org, linux-mips@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, oe-kbuild-all@lists.linux.dev, Ray Jui , Scott Branden , Broadcom internal kernel review list , Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer , NXP Linux Team , Sean Wang Subject: Re: [PATCH v2 06/21] pinctrl: equilibrium: Convert to use struct pingroup Message-ID: References: <20231123193355.3400852-7-andriy.shevchenko@linux.intel.com> <202311241401.ZPILPdov-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202311241401.ZPILPdov-lkp@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Fri, Nov 24, 2023 at 09:19:45PM +0800, kernel test robot wrote: ... > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202311241401.ZPILPdov-lkp@intel.com/ > > smatch warnings: > drivers/pinctrl/pinctrl-equilibrium.c:719 eqbr_build_groups() warn: unsigned 'grp->npins' is never less than zero. Thank you for the report! ... > 718 grp->npins = of_property_count_u32_elems(np, "pins"); > > 719 if (grp->npins < 0) { > 720 dev_err(dev, "No pins in the group: %s\n", prop->name); > 721 of_node_put(np); > 722 return -EINVAL; > 723 } Surprisingly (to me) the _count_u32_elems() can return a negative error code... Fine, I redo a bit the code by introducing a new patch that will use err instead of ->npins (which sounds better approach anyway). -- With Best Regards, Andy Shevchenko 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ACEECC61D97 for ; Fri, 24 Nov 2023 14:39:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=snbyK2NRzWU3+i5RuDEwJZCek+RYzR1OPYpvbGwfmQ8=; b=WWEkn3qHXlPSbb wtIYPrzVGddq7EBs5EwzIGnkNSRWY7YscuCf6oGG9xrk/sTJNM/Dv49WMDBoXAFSXV+cvQIVDWS53 iRUv4eaDNp7cnhqKU3bRlqZE+2ZRrhXl4l7tXMcDErnbqC1pMK9Uaj4IRRy4pEu8mOuyH0oaY7EWw 7uL1+ByR9F9MLy2sFKEawvByLSYig/kbuATejaNZjTjjmDmjfNvMeiPP+HkCXv6X2RpJNZeUZHHMI MrrCRPTbtoy2G5iXO0g6UnsywbGdyFDlP7bRZTGOJ56G+p6Uoytn+56K0fyE+R6KWGnKi22FJvUd2 IgW6Ta+7GU68TOdcdUmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r6XKa-007QdV-37; Fri, 24 Nov 2023 14:38:56 +0000 Received: from mgamail.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r6XKY-007QcE-1p; Fri, 24 Nov 2023 14:38:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700836734; x=1732372734; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=QKgJEGRCbdv2EWGbewfRTODn2GZOxw9ytLOYIn7uuOQ=; b=IguYC+jh2moX0zcjKySGoetZDR0kBvsLg0cGRawmBDLgbuebG0AdWOhn mIYGF8HuSlWbj7n96MhII32+ZrFrgMBG8rvjFphzF19+/kcm7rf2cKxSn t2LyuG7fBjweyV3WrM4gHLx4VtxBzY3S4hRpIjazH25XEIDWh5AgSlEQK wECp53OlwT+yxJ4jfzJnX/aqPL4oasun+gtYTROmW/PsJYgaLDNzgvaOE g/07/CLZ4/y2QwTOpbEyoHzrwX0/3hBEck5PqgL5U3t402g9bC8HhTTwH VeyRAM1gUaT7TKHiDk8eETFmhlSyGV7qkuxfE74Aj6NEr6tdK/87yvft9 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10904"; a="392198721" X-IronPort-AV: E=Sophos;i="6.04,224,1695711600"; d="scan'208";a="392198721" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 06:38:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10904"; a="743906526" X-IronPort-AV: E=Sophos;i="6.04,224,1695711600"; d="scan'208";a="743906526" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga006.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 06:38:42 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1r6XCh-0000000GjtS-2kli; Fri, 24 Nov 2023 16:30:47 +0200 Date: Fri, 24 Nov 2023 16:30:47 +0200 From: Andy Shevchenko To: kernel test robot Cc: Linus Walleij , Bartosz Golaszewski , Rasmus Villemoes , Jonathan =?iso-8859-1?Q?Neusch=E4fer?= , Krzysztof Kozlowski , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Geert Uytterhoeven , Biju Das , Claudiu Beznea , Jianlong Huang , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, openbmc@lists.ozlabs.org, linux-mips@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, oe-kbuild-all@lists.linux.dev, Ray Jui , Scott Branden , Broadcom internal kernel review list , Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer , NXP Linux Team , Sean Wang Subject: Re: [PATCH v2 06/21] pinctrl: equilibrium: Convert to use struct pingroup Message-ID: References: <20231123193355.3400852-7-andriy.shevchenko@linux.intel.com> <202311241401.ZPILPdov-lkp@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <202311241401.ZPILPdov-lkp@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231124_063854_618940_781EEC90 X-CRM114-Status: GOOD ( 13.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Nov 24, 2023 at 09:19:45PM +0800, kernel test robot wrote: ... > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202311241401.ZPILPdov-lkp@intel.com/ > > smatch warnings: > drivers/pinctrl/pinctrl-equilibrium.c:719 eqbr_build_groups() warn: unsigned 'grp->npins' is never less than zero. Thank you for the report! ... > 718 grp->npins = of_property_count_u32_elems(np, "pins"); > > 719 if (grp->npins < 0) { > 720 dev_err(dev, "No pins in the group: %s\n", prop->name); > 721 of_node_put(np); > 722 return -EINVAL; > 723 } Surprisingly (to me) the _count_u32_elems() can return a negative error code... Fine, I redo a bit the code by introducing a new patch that will use err instead of ->npins (which sounds better approach anyway). -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel