Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1011552imm; Fri, 27 Jul 2018 09:42:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpewPM9etWxaSxSn+Pi+2/CmlovMlJ6NozYxHPfOUByQSV4wmEkfT9mTgkA7wxtxVLMdqAJP X-Received: by 2002:a63:ff4d:: with SMTP id s13-v6mr6831761pgk.150.1532709762819; Fri, 27 Jul 2018 09:42:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532709762; cv=none; d=google.com; s=arc-20160816; b=KSAScKnZwPxhgD1pgnQAW4JNMNsrKXi5pAwzbjfrGlv2956MtxV/9a+KRZS1jUbhI5 azP6KoHDmVLBYluUW4lwXQtSAOCjQMuTFl+w6eDRHz/vvt0pQIyabV4npBX/qTdLlTRY SDU3XOYv2zpcZpDfbwEdalVgc9jtK/NMgkLKqhmtG+1bQrCNeTvJIzi8P5THcNF3rm4o bQYplkVlZqGkD06BqJxupsXk2OM5zX/pzBMGqAoA8EdmmqlP2YWD3Iq8dwHAWih18XFF IahTKSnjWN2EmyQL3PiKl0h2icuRb+wurri/laBRRr8m2IsTq26AuPe7ADhbge//6doa O/tw== 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:arc-authentication-results; bh=nD6KC40ug5+xoMHii7UHdtz8y+yqulf6UwcuSvEKm5c=; b=Ao3ySEvH6RKz8rr/f6a3HjudWKreTaFvPJlO9Oa5iCuWCZM2kUGwaCMAzvp5MQdLfO +OWBYh5iZYVZCWlrtCkDM3LojCmtltnnkjOmV8o2P4gSShLzsv+flBoUW8w2StxYX5RV uBU0ZCgHb8H1jIA8v2f43mn3lnMiwB9HZkHu8LtE8It12msctb12Jg38AN2qpwb1Xh4y AwghUBzYJd/FQytAsbb3Ipbchdn0Od+Fi60O/8x87DpJnW/AmrPXh4pgxW1xaF9X4rkz prbXTWIQRMOOh8WApD7FBUYy1UtIa2s+VXQgGIkr1Z2O9XEwHEpqhhQYbdC9MSQUjN6R NTQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="u/JiYRyn"; 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 a11-v6si3702823plp.108.2018.07.27.09.42.28; Fri, 27 Jul 2018 09:42:42 -0700 (PDT) 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="u/JiYRyn"; 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 S2388621AbeG0SEX (ORCPT + 99 others); Fri, 27 Jul 2018 14:04:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:46616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730510AbeG0SEX (ORCPT ); Fri, 27 Jul 2018 14:04:23 -0400 Received: from localhost (unknown [104.132.1.75]) (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 8BC1B2089B; Fri, 27 Jul 2018 16:41:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1532709701; bh=tf68ZV0t8Om63LAlFpuqS3AX7vkqXwnykK9piQdSbYM=; h=To:From:In-Reply-To:Cc:References:Subject:Date:From; b=u/JiYRynan7i5ZbvJTKODQMY+K+IyOsa6WFP8Wfq2gWyH3RWm2L3W8AY64BZXFedn YE6aoZAkPrJOoBoOjLkvQ1Z7oujPMU1g9RjRh0y9hp4SYZ0Nbe140nuDoR2EmrTiM4 pfW7NGakvHmZ4UHsZICxHrkacGeUpqPY9EwfBS4M= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Jerome Brunet , Neil Armstrong , Yixun Lan From: Stephen Boyd In-Reply-To: Cc: Rob Herring , Martin Blumenstingl , Kevin Hilman , Michael Turquette , yixun.lan@amlogic.com, linux-kernel@vger.kernel.org, Boris Brezillon , Liang Yang , Qiufang Dai , Miquel Raynal , Carlo Caione , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jian Hu References: <20180712211244.11428-1-yixun.lan@amlogic.com> <20180712211244.11428-3-yixun.lan@amlogic.com> <153261840298.48062.2497103873681297587@swboyd.mtv.corp.google.com> Message-ID: <153270970080.48062.18399022907046343950@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v3 2/2] clk: meson: add sub MMC clock controller driver Date: Fri, 27 Jul 2018 09:41:40 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Yixun Lan (2018-07-27 07:52:23) > HI Stephen: > = > On 07/26/2018 11:20 PM, Stephen Boyd wrote: > > Quoting Yixun Lan (2018-07-12 14:12:44) > >> diff --git a/drivers/clk/meson/mmc-clkc.c b/drivers/clk/meson/mmc-clkc= .c > >> new file mode 100644 > >> index 000000000000..36c4c7cd69a6 > >> --- /dev/null > >> +++ b/drivers/clk/meson/mmc-clkc.c > >> @@ -0,0 +1,367 @@ > >> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > >> +/* > >> + * Amlogic Meson MMC Sub Clock Controller Driver > >> + * > >> + * Copyright (c) 2017 Baylibre SAS. > >> + * Author: Jerome Brunet > >> + * > >> + * Copyright (c) 2018 Amlogic, inc. > >> + * Author: Yixun Lan > >> + */ > >> + > >> +#include > > = > > Is this include used? > > = > this is needed by clk_get_rate() > see drivers/clk/meson/mmc-clkc.c:204 Hmm ok. That's unfortunate. > = > > = > >> + init.num_parents =3D 1; > >> + > >> + clk =3D mmc_clkc_register_clk(dev, map, &init, suffix, data); > >> + if (IS_ERR(clk)) > >> + dev_err(dev, "Core %s clock registration failed\n", su= ffix); > >> + > >> + kfree(parent); > >> + return clk; > >> +} > >> + > >> +static int mmc_clkc_probe(struct platform_device *pdev) > >> +{ > >> + struct clk_hw_onecell_data *onecell_data; > >> + struct device *dev =3D &pdev->dev; > >> + struct mmc_clkc_data *data; > >> + struct regmap *map; > >> + struct clk_regmap *mux, *div, *core, *rx, *tx; > >> + > >> + data =3D (struct mmc_clkc_data *)of_device_get_match_data(dev); > > = > > This cast is unnecessary. Pleas remove. > > = > Ok, I will try to fix in next version > = > = > this was trying to silence the =E2=80=99const=E2=80=98 cast warning [1] > I could make a 'const struct mmc_clkc_data *data' declare, but need to > fix further cast warning issue.. > = > = > [1] drivers/clk/meson/mmc-clkc.c: In function =E2=80=98mmc_clkc_probe=E2= =80=99: > drivers/clk/meson/mmc-clkc.c:302:7: warning: assignment discards =E2=80= =98const=E2=80=99 > qualifier from pointer target type [-Wdiscarded-qualifiers] > data =3D of_device_get_match_data(dev); > ^ Yes. Casting away const is a bad idea.