Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754575Ab1BXMfs (ORCPT ); Thu, 24 Feb 2011 07:35:48 -0500 Received: from mail-iw0-f174.google.com ([209.85.214.174]:58512 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753138Ab1BXMfq (ORCPT ); Thu, 24 Feb 2011 07:35:46 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=OKv/e5BALsErkExmKeRhcH+mSs7Q04SW8LZzbTzC88sMgp43CHOfUw5zP8KdsWj13j J95YL1SRMvVgmhhoTKciy1aOByk2u57MzB8da75PFK51i/H1iox1ApmWAOVIVQDXtYk2 9avwngRScLnQSbpNzs751FdKYmNoHx6xffQrs= MIME-Version: 1.0 In-Reply-To: <20110224111801.GA7169@intel.com> References: <20110224111801.GA7169@intel.com> Date: Thu, 24 Feb 2011 13:35:46 +0100 X-Google-Sender-Auth: nHGtQ-UyKfef5vpv9mG2eAtCo14 Message-ID: Subject: Re: [PATCH 1/1]mmc: fix division by zero when calculate mmc erase time From: Linus Walleij To: Chuanxiao Dong Cc: linux-mmc@vger.kernel.org, cjb@laptop.org, adrian.hunter@nokia.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 806 Lines: 21 2011/2/24 Chuanxiao Dong : > Since if clock gating feature is enabled, the clock frequency may be zero when > host clock is gated. In such scenario, mmc_set_mmc_erase_timeout() may have a > division by zero bug. > > So this patch used mmc_host_clk_rate() to fix this. > > Signed-off-by: Chuanxiao Dong Acked-by: Linus Walleij Actually I think these divide-by zero bugs were there before since clock 0 is perfectly legal, we just didn't trigger them before. Yours, Linus Walleij -- 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/