Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965632AbbBDNt5 (ORCPT ); Wed, 4 Feb 2015 08:49:57 -0500 Received: from galahad.ideasonboard.com ([185.26.127.97]:57267 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933621AbbBDNt4 (ORCPT ); Wed, 4 Feb 2015 08:49:56 -0500 From: Laurent Pinchart To: Sergei Shtylyov Cc: Geert Uytterhoeven , Mike Turquette , Stephen Boyd , Ulrich Hecht , Wolfram Sang , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: shmobile: div6: Avoid division by zero in .round_rate() Date: Wed, 04 Feb 2015 15:50:40 +0200 Message-ID: <28464845.1OHBNvdFWi@avalon> User-Agent: KMail/4.14.3 (Linux/3.17.7-gentoo; KDE/4.14.3; x86_64; ; ) In-Reply-To: <54D21F31.5080706@cogentembedded.com> References: <1423052841-15194-1-git-send-email-geert+renesas@glider.be> <54D21F31.5080706@cogentembedded.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 763 Lines: 24 Hi Sergei, On Wednesday 04 February 2015 16:31:29 Sergei Shtylyov wrote: > On 02/04/2015 03:27 PM, Geert Uytterhoeven wrote: > > Anyone may call clk_round_rate() with a zero rate value, so we have to > > protect against that. > > Shouldn't this be checked and fixed up in clk_round_rate() then? Not all implementations need to divide by the requested rate, so I don't think a check in the core is the best solution. > > Signed-off-by: Geert Uytterhoeven -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/