Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966920AbbBDWQs (ORCPT ); Wed, 4 Feb 2015 17:16:48 -0500 Received: from mail-lb0-f177.google.com ([209.85.217.177]:33507 "EHLO mail-lb0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933675AbbBDWOu (ORCPT ); Wed, 4 Feb 2015 17:14:50 -0500 Message-ID: <54D299D6.7060809@cogentembedded.com> Date: Thu, 05 Feb 2015 01:14:46 +0300 From: Sergei Shtylyov Organization: Cogent Embedded User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Mike Turquette , Wolfram Sang , Geert Uytterhoeven CC: Stephen Boyd , Laurent Pinchart , 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() References: <1423052841-15194-1-git-send-email-geert+renesas@glider.be> <20150204173233.GA30930@katana> <54D25AAA.8070904@cogentembedded.com> <20150204220152.421.38508@quantum> <54D29760.4010009@cogentembedded.com> In-Reply-To: <54D29760.4010009@cogentembedded.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1100 Lines: 35 Hello. On 02/05/2015 01:04 AM, Sergei Shtylyov wrote: >>>>> Anyone may call clk_round_rate() with a zero rate value, so we have to >>>>> protect against that. >>>>> Signed-off-by: Geert Uytterhoeven >>>> Acked-by: Wolfram Sang >>>> I agree that this should not be fixed in the core because the fixup is >>>> really driver dependant. >>> Dunno, zero frequency seems generally insane to me. >> It is useful to find the lowest frequency a clock can support. Basically >> it is a search for the floor frequency. > Why not just use 1? Or are you assuming that some hardware could actually > support 0 Hz? Replying to myself: yes, this has happened to me, when I forgot to override the EXTAL frequency in the board .dts file (default was 0). >> Regards, >> Mike WBR, Sergei -- 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/