From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CC14C468BC for ; Fri, 7 Jun 2019 18:17:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1C391208E3 for ; Fri, 7 Jun 2019 18:17:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559931447; bh=avBGzeDVPLC9Ku4xRFNfHkrWVnK+12j3mF281rswmfs=; h=In-Reply-To:References:To:From:Subject:Cc:Date:List-ID:From; b=kUdrcGofkAapvEll8XgxE4J6auUW4suNvuEoWL7YvScT5Do0fuZpHhkGN6zoNlmLt YIWhL/n6Uyj35K2k2s7gY/vNDe8vDx73tAgNpyVE1tQ2N9rT+gcNBtV1n/Pt0ylXvt kRgfK8fayPWPBvLibEo4K3WO4yBbjDhrndhOPPwA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731489AbfFGSR0 (ORCPT ); Fri, 7 Jun 2019 14:17:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:42470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729817AbfFGSR0 (ORCPT ); Fri, 7 Jun 2019 14:17:26 -0400 Received: from kernel.org (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 0086E20868; Fri, 7 Jun 2019 18:17:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559931445; bh=avBGzeDVPLC9Ku4xRFNfHkrWVnK+12j3mF281rswmfs=; h=In-Reply-To:References:To:From:Subject:Cc:Date:From; b=Ds6bRfWQvpaGWItGBIQ2L+kHDmodlH1EYVF3q7lMDBTgqnuENK9g2pHSlExCOXG5X a+pte8EbrOWyuTxeCw/a2lS6/ldaHVZ6kPB+YPcyl5Ama5fQXvJZs/RBhbqOgQL93m i15dWegbnRDru6/8ThZdIe2Z8XTWmBKRA8rQLErs= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20190520080421.12575-3-wens@kernel.org> References: <20190520080421.12575-1-wens@kernel.org> <20190520080421.12575-3-wens@kernel.org> To: Chen-Yu Tsai , Maxime Ripard , Michael Turquette From: Stephen Boyd Subject: Re: [PATCH 02/25] clk: Add CLK_HW_INIT_* macros using .parent_hws Cc: Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org User-Agent: alot/0.8.1 Date: Fri, 07 Jun 2019 11:17:24 -0700 Message-Id: <20190607181725.0086E20868@mail.kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Chen-Yu Tsai (2019-05-20 01:03:58) > A special CLK_HW_INIT_HWS macro is included, which takes an array of > struct clk_hw *, but sets .num_parents to 1. This variant is to allow > the reuse of the array, instead of having a compound literal allocated > for each clk sharing the same parent. >=20 > Signed-off-by: Chen-Yu Tsai [...] > diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h > index bb6118f79784..0c241b43a802 100644 > --- a/include/linux/clk-provider.h > +++ b/include/linux/clk-provider.h > @@ -904,6 +904,24 @@ extern struct of_device_id __clk_of_table; > .ops =3D _ops, \ > }) > =20 > +#define CLK_HW_INIT_HW(_name, _parent, _ops, _flags) \ > + (&(struct clk_init_data) { \ > + .flags =3D _flags, = \ > + .name =3D _name, = \ > + .parent_hws =3D (const struct clk_hw*[]) { _parent },= \ > + .num_parents =3D 1, = \ > + .ops =3D _ops, = \ > + }) > + > +#define CLK_HW_INIT_HWS(_name, _parent, _ops, _flags) \ Minor nitpick, please add a comment here to indicate that this is here to share the same compound literal between multiple clks using the same parent. > + (&(struct clk_init_data) { \ > + .flags =3D _flags, = \ > + .name =3D _name, = \ > + .parent_hws =3D _parent, = \ > + .num_parents =3D 1, = \ > + .ops =3D _ops, = \ > + }) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, T_DKIMWL_WL_HIGH,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51A48C468BC for ; Fri, 7 Jun 2019 18:17:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E7C120868 for ; Fri, 7 Jun 2019 18:17:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mOwPRVic"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ds6bRfWQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E7C120868 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:From:To: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RtN6yeiX8MsQS0acnquZhgD/iF8I5f6aKF6//Ks4jik=; b=mOwPRVic+IcrBv 8Ms//PIKUTorny77jJUIZgOmhdJy8bp2hXSth88KDNm/pDl1hXpWIn3H8Q3l5fc1vY9kMY+xdYdbz ldKEcZ25xpWvo7PKu2+WRlw6BrXvnGhHfWg8BX9QYlkv5EfXvqFHlmv61aM1CBq1IN6Q5wopc+10d EeTZIJksIeuWgcioAGowD0571vD/QSbRLRT56kJ7MXYmSeDgBbjT/RaGZ02SySp7bFRVKwkvljY7N 5ll3XDEaF5IM/4C0l7DhGypYlkOFU91EkIbPlaYzP+rLSpbBwV3s1QZ5pL8cZr3Rv1KtfH3qEaXUP WnJZ2CRmclQOXs/6iW8A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hZJQe-0002SH-Hn; Fri, 07 Jun 2019 18:17:28 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hZJQb-0002Rz-Ei for linux-arm-kernel@lists.infradead.org; Fri, 07 Jun 2019 18:17:26 +0000 Received: from kernel.org (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 0086E20868; Fri, 7 Jun 2019 18:17:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559931445; bh=avBGzeDVPLC9Ku4xRFNfHkrWVnK+12j3mF281rswmfs=; h=In-Reply-To:References:To:From:Subject:Cc:Date:From; b=Ds6bRfWQvpaGWItGBIQ2L+kHDmodlH1EYVF3q7lMDBTgqnuENK9g2pHSlExCOXG5X a+pte8EbrOWyuTxeCw/a2lS6/ldaHVZ6kPB+YPcyl5Ama5fQXvJZs/RBhbqOgQL93m i15dWegbnRDru6/8ThZdIe2Z8XTWmBKRA8rQLErs= MIME-Version: 1.0 In-Reply-To: <20190520080421.12575-3-wens@kernel.org> References: <20190520080421.12575-1-wens@kernel.org> <20190520080421.12575-3-wens@kernel.org> To: Chen-Yu Tsai , Maxime Ripard , Michael Turquette From: Stephen Boyd Subject: Re: [PATCH 02/25] clk: Add CLK_HW_INIT_* macros using .parent_hws User-Agent: alot/0.8.1 Date: Fri, 07 Jun 2019 11:17:24 -0700 Message-Id: <20190607181725.0086E20868@mail.kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190607_111725_512828_77017297 X-CRM114-Status: UNSURE ( 9.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen-Yu Tsai , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Quoting Chen-Yu Tsai (2019-05-20 01:03:58) > A special CLK_HW_INIT_HWS macro is included, which takes an array of > struct clk_hw *, but sets .num_parents to 1. This variant is to allow > the reuse of the array, instead of having a compound literal allocated > for each clk sharing the same parent. > > Signed-off-by: Chen-Yu Tsai [...] > diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h > index bb6118f79784..0c241b43a802 100644 > --- a/include/linux/clk-provider.h > +++ b/include/linux/clk-provider.h > @@ -904,6 +904,24 @@ extern struct of_device_id __clk_of_table; > .ops = _ops, \ > }) > > +#define CLK_HW_INIT_HW(_name, _parent, _ops, _flags) \ > + (&(struct clk_init_data) { \ > + .flags = _flags, \ > + .name = _name, \ > + .parent_hws = (const struct clk_hw*[]) { _parent }, \ > + .num_parents = 1, \ > + .ops = _ops, \ > + }) > + > +#define CLK_HW_INIT_HWS(_name, _parent, _ops, _flags) \ Minor nitpick, please add a comment here to indicate that this is here to share the same compound literal between multiple clks using the same parent. > + (&(struct clk_init_data) { \ > + .flags = _flags, \ > + .name = _name, \ > + .parent_hws = _parent, \ > + .num_parents = 1, \ > + .ops = _ops, \ > + }) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel