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 A1DC3C4332F for ; Fri, 18 Nov 2022 08:15:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234711AbiKRIPZ (ORCPT ); Fri, 18 Nov 2022 03:15:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbiKRIPY (ORCPT ); Fri, 18 Nov 2022 03:15:24 -0500 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D7AD113DDA; Fri, 18 Nov 2022 00:15:23 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id A89C0807E; Fri, 18 Nov 2022 08:05:17 +0000 (UTC) Date: Fri, 18 Nov 2022 10:15:21 +0200 From: Tony Lindgren To: Maxim Korotkov Cc: Haojian Zhuang , Linus Walleij , "Manjunathappa, Prakash" , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH] pinctrl: single: Fix potential division by zero Message-ID: References: <20221117123034.27383-1-korotkov.maxim.s@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221117123034.27383-1-korotkov.maxim.s@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org * Maxim Korotkov [221117 12:22]: > There is a possibility of dividing by zero due to the pcs->bits_per_pin > if pcs->fmask() also has a value of zero and called fls > from asm-generic/bitops/builtin-fls.h or arch/x86/include/asm/bitops.h. > The function pcs_probe() has the branch that assigned to fmask 0 before > pcs_allocate_pin_table() was called Reviewed-by: Tony Lindgren