Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp249022rwb; Fri, 18 Nov 2022 00:29:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf71NYBkFhhuX2pw4ebYYzpoucYgfUH3QcvogNh3+jd9QC2BTvdoSetMcJ2f0CnKCvQe/h4F X-Received: by 2002:a17:906:ce4a:b0:7ae:5ad1:e834 with SMTP id se10-20020a170906ce4a00b007ae5ad1e834mr5076296ejb.312.1668760192585; Fri, 18 Nov 2022 00:29:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668760192; cv=none; d=google.com; s=arc-20160816; b=xPhnccSiBHYvmuSWkytR7VodOz+lIwjhKgK2OIOrN4GMfGksEqXtDTETulDLcJ/Zms lbhSftCNwLFAkDEDFIJSONuBAa0gRXSGp3ZaZDklcHMRghSSSnIdqzBmVH3QUSh4BJRe s0cOpA9+C4xBrSyi15xtqPBP+9ZpM+RabsDViffCbodRrYdL+QuTcaUUw/o1h8ZaNAea ZS4KfmkLb1Np06PAQnIA2hDgAsU/Aqgt48/PDq9eWyO8W9eSJNtEHOE1afCYEcJzCjEb Wgr210yOjMIk/CZ/EI3LlNpwbvS8Xvb7R394CpgRhFKNfpOHTRwOeyzNjblFUlGpSacD zh4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Kjsb/eadQ3UA5lz+4Lb9PWT19BfoFXB1eC8hB80hNzg=; b=zE852Q6F/WnKK1asgreDNMVdKFVSXNKrGuZVWTbgACleNTuAnXItoyN80Fq4Jy8KfU tKuxboBU7m0iC42NaX0LNTCNWZJpgc4sS+xubOHbNvQI48Lk0nPosnEVGob+NHXX/Jyu pzfDB9NpYkwWEMUUnL0QiPtRAdWT8lolc0S5JNKYToEt52E2t6TjxXAk5ZldB9BQ9O+A k5DfxR3Xsje+zKpHfRvnoROgJ3FZyE6FQ6FCT7Af9dyC/oVsMuy+Yk/pjLtLjJ9NI0au pq/PnswsmbR8WDQHipzzw1tVL0d1h+gvcUAwclsP9q81JiNJ/rZq9X9nu0IFiZ88BrCJ vRNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sg13-20020a170907a40d00b007ae4ed48290si2995381ejc.279.2022.11.18.00.29.30; Fri, 18 Nov 2022 00:29:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241078AbiKRIP0 (ORCPT + 90 others); Fri, 18 Nov 2022 03:15:26 -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> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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