Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4133005yba; Tue, 23 Apr 2019 16:02:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEIa4AHERTHe3PNAADgCvxjC/J/Fpcw8eOAE+Akj9IRAcZISVR/AZoKlSAne5xo8Kdlqaj X-Received: by 2002:a63:5b4b:: with SMTP id l11mr26228324pgm.95.1556060525206; Tue, 23 Apr 2019 16:02:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556060525; cv=none; d=google.com; s=arc-20160816; b=jPCFwaiK6v9pbISA+qRl6bqYaIT5uyFDQO2r4wfz+5KLX4CDFOt7081qd+VfwHzw17 v4JgRMDLUXwgFwwJuETU+/TjLzUm0877DXelLjcrR/rdLhIEX6p0Mg4wZCHqHr8GN1ZS 1TLfur+QRLg7bQl+Yny5dgU4k1wxiEdfst1ohJ4R1l5k4ZRcAOTtGtwDQvK+XNpU4F8T UkYrX2tq3Id0hFl1ydlsrWh4BBgAoKyc8lPYNuZcVYxciL4zXmMb56m1SyKX/fgYq4l8 /waaxq5jg7uYEvz54st/ebsZkCz4wED4HG9ocnVW637hBT0fPtLnY4NIvp0+HFhsC59R zjsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:user-agent:message-id:to:subject :from:cc:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=EeaQKmLG3fYyd+mnAdVPREDARRO/e4IXy7yRKjb9S9c=; b=Bnqq4/UjqqbllP5iEWztrQl5IMLsRSa3cEGFJ4rr/0W881eI9CUWR34l22IXdOLzkR Fib+i4ajF6McRJmjqJeYQSTmyaTt+vuB9lyt+k/nBFeAT5RciEGrJAy4jDcNGBXmqLi9 NaD+2n3C2lo4gNtMqfhWwYQnUwRffGO24adoMBd4Iz3sh8fZdEYn3/+DrVV62oZbd2d+ kvtOb/timJOlluKbnVAehGoHIDUaA1iZ9upJd+JKZgH2Vp8fVeZ6y88ug6rny609ODwd ZxKB+km/8EtiDjZEs4dXJzfnQyRA04SytltCfzj8hr9CKma7D08LRNYgAMWM+vCuU6LV w+5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HbJYB4UW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r24si16772550pls.398.2019.04.23.16.01.49; Tue, 23 Apr 2019 16:02:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HbJYB4UW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728585AbfDWXA2 (ORCPT + 99 others); Tue, 23 Apr 2019 19:00:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:50330 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726325AbfDWXA2 (ORCPT ); Tue, 23 Apr 2019 19:00:28 -0400 Received: from localhost (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E126E206BA; Tue, 23 Apr 2019 23:00:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556060428; bh=EeaQKmLG3fYyd+mnAdVPREDARRO/e4IXy7yRKjb9S9c=; h=In-Reply-To:References:Cc:From:Subject:To:Date:From; b=HbJYB4UWA6xVCzovsop3aU4TaTD5kEaf48GD5lS4YXm+fS7ppTojKZWO+ZF/ljRzs eC5gKJVBPcg1JXgoYshnB3ineCahHqe+y7wxASBrD9ZX9ZNeITnC0jP7BD7mi2lwwB xfmAmkw4S/Ki30C0XDq4PCAiwZCQt145nX+vMhPs= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <1553954142-65515-1-git-send-email-nixiaoming@huawei.com> References: <1553954142-65515-1-git-send-email-nixiaoming@huawei.com> Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org From: Stephen Boyd Subject: Re: [PATCH v3 2/2] clk:mmp: clk-mix.c fix divide-by-zero To: chao.xie@marvell.com, jbrunet@baylibre.com, mojha@codeaurora.org, mturquette@baylibre.com, nixiaoming@huawei.com, sboyd@codeaurora.org, soren.brinkmann@xilinx.com Message-ID: <155606042712.15276.6873845293187802041@swboyd.mtv.corp.google.com> User-Agent: alot/0.8 Date: Tue, 23 Apr 2019 16:00:27 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting nixiaoming (2019-03-30 06:55:42) > The _get_div() function has a branch with a return value of 0 > Add a check on the return value of _get_div() to avoid divide-by-zero >=20 Are you seeing this in practice? Or just trying to avoid a div-by-zero case that you've found from inspection?=20 > Signed-off-by: nixiaoming > Reviewed-by: Mukesh Ojha