From patchwork Thu Apr 11 22:02:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 10896981 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 57EEE139A for ; Thu, 11 Apr 2019 22:04:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4352C28925 for ; Thu, 11 Apr 2019 22:04:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41A0728C54; Thu, 11 Apr 2019 22:04:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FCAE28925 for ; Thu, 11 Apr 2019 22:04:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727004AbfDKWEa (ORCPT ); Thu, 11 Apr 2019 18:04:30 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:40415 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726862AbfDKWE3 (ORCPT ); Thu, 11 Apr 2019 18:04:29 -0400 Received: by mail-lf1-f66.google.com with SMTP id a28so5890970lfo.7; Thu, 11 Apr 2019 15:04:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Pp1ylpAMq1DcvOKU5DqK7TZfKN1qmsD9XOpVBBwXOus=; b=k/ZgkIVt47fcoPWCWBk5hWbdPSwH7zPChSsBld5ZnAcDy4qfLRjRhvrSqm8ShVwTTC mWCYVTny/g8sSDxO40aHLUioU65rhw1eSAEjyLBBERgc9oez8C9+RNOHc4cZxTImO51s 81p+JOiTkzlP6HddyB1IHM1gVvmsupbX++L/1leqpi8MUKektvzxjXGt+opvArCHt5Sc CTNLpWzlTLPrfrTq8jb9zL1oB2oRIJUHtFLKaccq0zCTgGVUjicsmTFQnbhrTJUrHTCU 17WKWuoA2aE+UVJxHpYCMIulS1rlfEmMsMyO+CRvgUZ9B9X4aGEjMnCcPSRhVDa0uMBn qwLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Pp1ylpAMq1DcvOKU5DqK7TZfKN1qmsD9XOpVBBwXOus=; b=LPXYRa0WAG6thLIGIODm7Q2ZFk/xBBqETn9w+rKj3Zsjj7wa3EPIKxnDli3WH3Cv8+ /Rql6OWcIh5LraXxTf6SSxo3r2jxWSkiiajvcbKAYg+U5XPUUpHFcqmVIDZQZ7iJRJUH z2PJzUTeEBAhbFixRIAIwmX2JzKJmQnjD7lJVAV10RcHcWVM1EOFTyRkatl8WYfEx/QP XfFPhSng1R/STh0BJNA1Ipn5ytgTgZeU5ufrqHUxG1V3E1bGFAesO3zYRaGPMisFYtMc bf1/96+rwApKNAKnhEe+/OxPcEfdWYKoNATl5DJfXrSZAuiZn9e6T/s7rEXvp0oD0uNP sfug== X-Gm-Message-State: APjAAAWIoNQZLbvGDnax+CTeEPJtaeIB8XK6HAjZVs6T/f7708u2icjs JLB/6f69t5r/hcaoyE1j1G0= X-Google-Smtp-Source: APXvYqxn7l1uDjHXBCNStmQ/tsnv1FDCcDehm0NTAv93ql14E9ymak8RO1YNirI0uDOM7BxLZJCTiQ== X-Received: by 2002:a19:d1ce:: with SMTP id i197mr13997250lfg.149.1555020267137; Thu, 11 Apr 2019 15:04:27 -0700 (PDT) Received: from localhost.localdomain (ppp94-29-35-107.pppoe.spdop.ru. [94.29.35.107]) by smtp.gmail.com with ESMTPSA id e18sm7887808ljb.12.2019.04.11.15.04.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 15:04:26 -0700 (PDT) From: Dmitry Osipenko To: Peter De Schrijver , Prashant Gaikwad , Michael Turquette , Stephen Boyd , Thierry Reding , Jonathan Hunter , Joseph Lo Cc: linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 4/5] clk: tegra: emc: Replace BUG() with WARN_ONCE() Date: Fri, 12 Apr 2019 01:02:29 +0300 Message-Id: <20190411220230.21726-5-digetx@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190411220230.21726-1-digetx@gmail.com> References: <20190411220230.21726-1-digetx@gmail.com> MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no justification for the BUG() in this code. Signed-off-by: Dmitry Osipenko --- drivers/clk/tegra/clk-emc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/clk/tegra/clk-emc.c b/drivers/clk/tegra/clk-emc.c index 9a0179235939..93ecb538e59b 100644 --- a/drivers/clk/tegra/clk-emc.c +++ b/drivers/clk/tegra/clk-emc.c @@ -222,7 +222,10 @@ static int emc_set_timing(struct tegra_clk_emc *tegra, if (emc_get_parent(&tegra->hw) == timing->parent_index && clk_get_rate(timing->parent) != timing->parent_rate) { - BUG(); + WARN_ONCE(1, "parent %s rate mismatch %lu %lu\n", + __clk_get_name(timing->parent), + clk_get_rate(timing->parent), + timing->parent_rate); return -EINVAL; }