Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1694573imu; Wed, 21 Nov 2018 00:05:11 -0800 (PST) X-Google-Smtp-Source: AFSGD/U86tV9L+PvSSPdu72sKz98m75IBmhoEe47Yrarmoctr5pB+d94o75fuDxr0tBO0O9TT1Ji X-Received: by 2002:a63:2a4a:: with SMTP id q71mr5003400pgq.374.1542787510972; Wed, 21 Nov 2018 00:05:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542787510; cv=none; d=google.com; s=arc-20160816; b=iddyzOqjLw+LoRwwkIJSwvsfgDsx5XeeaTamIzErxwApbMtfxiIcMtSW7t6TOSEWxl Q6JGZ0pUDL/XqySulpFzx1nXs11KRwwVrnYFL31zd3vXM1Zvw4s8UO1bYaO9cuYTROtf 1B1Uia/z2SAjbx3BFH/ktced5DV0PT5rcbDX2gH5YzHcaw6Nafis6eA3MK3okWK+dBkB u5HtIND4Tr64+sh3n8B9Tp7rtd+RqRtULbXjgLb/bzmVd/uyr+dJh8KLYGQq3nsu30ve ddQQTI5PY9eXG9Opyxc3xf4Kt5SJBNlSWy4id2dqZ/40y8U5B9/YsUv224WnVXE23txG 10vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature; bh=l6+nV1ROUffEj1z7bSFHFOjr0vK9Jt3p6COpclz9azo=; b=uoQhzNzkCU0ThJalwKTDuZqnOXVcvdJyN863yb98RDORZZy7b1nbsVJe26VgZxD/Qx yH8VBg6Z6OtGN8Y5HqrH3cNKr7izx5OPKWPlYLCe02VnzX17jzjrAB3rvVVwa1CNCRew I+iLz1ZMZwGFtYtKGwSkbXrm6YzJ1qrrFQMaYX3eJhZGxJsltD4oXtAD4bhHmF46Yo/f FVKXVCY5EXRMgu9mQvxiQwZGvqvqh+E/RXA9eExFUi7EYF/V9jwi9JaaBk0Ef66ICgKT itvZjjdStkCCEfoQi1cZUbYE6Y9BI7JVkdhVZcFji/RXDv3pVC509/cbpgGT7HJ3oOLT kXyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tT4ebkHJ; 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 d13si36336790pgh.196.2018.11.21.00.04.55; Wed, 21 Nov 2018 00:05:10 -0800 (PST) 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=tT4ebkHJ; 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 S1728678AbeKUSgz (ORCPT + 99 others); Wed, 21 Nov 2018 13:36:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:59532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728078AbeKUSgy (ORCPT ); Wed, 21 Nov 2018 13:36:54 -0500 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 32A452145D; Wed, 21 Nov 2018 08:03:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542787405; bh=zP8OWt1hsbB4NImJqQ15GVcek7o+lkF2496OvMYzo48=; h=To:From:In-Reply-To:Cc:References:Subject:Date:From; b=tT4ebkHJ5BVjZ7kdc2dQhJkeGn+EAPfFN4+tDd2RaCW++aZ+GqINjc9V5tMEMmyid XPsvzVRFCFQOItuXjancY+TZzITHb3pT/RO1aSkCajmHCwjAfCPReLiGCJv9+zLW0R WA0F1TSHfxk6wORio0vTJp979DwD8EJc0FoxtGbM= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Nicolas Boichat , Weiyi Lu From: Stephen Boyd In-Reply-To: <1542685880.5132.11.camel@mtksdaap41> Cc: Rob Herring , srv_heupstream@mediatek.com, jamesjj.liao@mediatek.com, sboyd@codeaurora.org, lkml , fan.chen@mediatek.com, linux-mediatek@lists.infradead.org, Matthias Brugger , owen.chen@mediatek.com, linux-clk@vger.kernel.org, linux-arm Mailing List References: <20181106064206.17535-1-weiyi.lu@mediatek.com> <20181106064206.17535-4-weiyi.lu@mediatek.com> <1542685880.5132.11.camel@mtksdaap41> Message-ID: <154278740462.88331.17720342357503268022@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v1 02/11] clk: mediatek: add new member to mtk_pll_data Date: Wed, 21 Nov 2018 00:03:24 -0800 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Weiyi Lu (2018-11-19 19:51:20) > On Tue, 2018-11-13 at 08:18 -0800, Nicolas Boichat wrote: > > On Mon, Nov 5, 2018 at 10:43 PM Weiyi Lu wrote: > > > @@ -138,9 +140,10 @@ static void mtk_pll_set_rate_regs(struct mtk_clk= _pll *pll, u32 pcw, > > > static void mtk_pll_calc_values(struct mtk_clk_pll *pll, u32 *pcw, u= 32 *postdiv, > > > u32 freq, u32 fin) > > > { > > > - unsigned long fmin =3D 1000 * MHZ; > > > + unsigned long fmin =3D pll->data->fmin ? pll->data->fmin : 10= 00 * MHZ; > > = > > I'd put parentheses around (1000 * MHZ), to avoid the need to think > > about precedence... > > = > = > OK, thanks for the suggestion. will add in next version Better style would be to not use a ternary statement for anything like this and have an if condition instead.