Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp192263imm; Tue, 28 Aug 2018 20:10:02 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaeJWseo8CUThX6LFM7bpo9VM/0qF0v5h7Ll4P60hwfocJvZtUs/gtXkVPPQCy8tNAClU2M X-Received: by 2002:a63:d518:: with SMTP id c24-v6mr3824485pgg.357.1535512202778; Tue, 28 Aug 2018 20:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535512202; cv=none; d=google.com; s=arc-20160816; b=Rxw8lLRsVKHlznF4Zg39/D5wFyUclweY6toja7jv7ST9cB2bDrwMd+mQnW9RoiWKXt 6turDT3JggbjLxyI3TGo49KcgX9KDYKcNlL07WZDVjexAdBGEVR5CUwu1CrwVvNdBH+r T1npMlwRXOVcQ1Nv+MKtCT6PUCxuBeDHroMbhQIWZhQYcwB1G+WL/JGsJs+QTt7sht+c JmVhqaaF4+2jcnMrOW18GqeNG/rPiiZWS3o4w8AXhPn0AVVL3O3u5KiYgnS9zZND6tuX SMsH7u0LxfdrpJbfOo8EuBYj3g++P0lPtj5lhyTjmKCeMhPty9WykjGXlpOiYEKk4gow 06mA== 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=MAYVOaGxiWjC9M+l2aBW9iEAe13jVrtiuP5tlOYoDDg=; b=IuOXa4+PvJ7zBln6RCn3ClVi5pyDwCftyV6w78T0wHmRHjx0+sfRJ/QGl90tIcC6Jm CllFH3bGAd0aW8MlGHZSlIQGbgnYabCq7F/9AwzBG8S78xH5L/Mp4JDJsdD+dPPzZ5kg QkJo5BIfaeeiQA22LguWFoKo1uv7ewU76PHGFGyWkTKSFUtylc3q+v9VXxTzIcFvs0Rr VPB2i5REIf96dd4aIDUkeOhzOZTPWeNkP2Qz74YYH5g7+9kOsqUMfN86JngRG6uVcFP3 yVX1nFazP4n15EClgcYwB5VAAb10O68TT/gEyL5UhjyL0Kn7Gm7vvuJR4egZYvvVy0r7 sKeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="06tPqe9/"; 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 i3-v6si2527719plb.44.2018.08.28.20.09.46; Tue, 28 Aug 2018 20:10:02 -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="06tPqe9/"; 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 S1727475AbeH2HDT (ORCPT + 99 others); Wed, 29 Aug 2018 03:03:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:35002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726857AbeH2HDS (ORCPT ); Wed, 29 Aug 2018 03:03:18 -0400 Received: from localhost (unknown [104.132.0.94]) (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 9CF8620850; Wed, 29 Aug 2018 03:08:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1535512119; bh=r8J7arHwsn2U8MMIt4qVF+0eQess58UBuTNvx0OtASo=; h=To:From:In-Reply-To:Cc:References:Subject:Date:From; b=06tPqe9/yPjXu03g2XUE46PHGm6ZV5EWzt8SApUN+1tUBZOcTOf8mm7OYIN79pop1 3WTTOqyYkSNJRACQUM26qtWvGWhrqoTq01dYpNZGkBpPf8JgKpXWYtBI6uNgP31wte 8qBjbzSzLZdEEKqZwgIBPZw4Nis6MHbfgtwF59kU= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: "A.s. Dong" From: Stephen Boyd In-Reply-To: Cc: "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "mturquette@baylibre.com" , "shawnguo@kernel.org" , dl-linux-imx , "thor.thayer@linux.intel.com" , "linux-clk@vger.kernel.org" References: <1527244643-10736-1-git-send-email-aisheng.dong@nxp.com> Message-ID: <153551211897.129321.14630649454821319736@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: RE: [PATCH V3 0/4] clk: new APIs to handle all available clocks Date: Tue, 28 Aug 2018 20:08:38 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting A.s. Dong (2018-08-16 19:33:52) > Hi Stephen, > = > Do you want me to resend this series for review? > It seems have been pending for quite a long time. > = > Thor just pinged me for its status as he wants to use it. > = I was waiting for someone to try them out or review them. Good that it happened! I've taken a look at the patches and I'm slightly annoyed with the API that passes in a double pointer to clk_bulk_data and returns a count of the number of clks found. I guess it's ok though. It's really just this line: devres->clks =3D *clks; which makes my brain all confused and go think about what's being assigned and if it's a struct copy or not. Maybe this on top would make it easier to take? I'll think about it tonight. ---8<--- diff --git a/drivers/clk/clk-devres.c b/drivers/clk/clk-devres.c index 6d3ca5ec5de8..12c87457eca1 100644 --- a/drivers/clk/clk-devres.c +++ b/drivers/clk/clk-devres.c @@ -81,9 +81,9 @@ int __must_check devm_clk_bulk_get_all(struct device *dev, if (!devres) return -ENOMEM; = - ret =3D clk_bulk_get_all(dev, clks); + ret =3D clk_bulk_get_all(dev, &devres->clks); if (ret > 0) { - devres->clks =3D *clks; + *clks =3D devres->clks; devres->num_clks =3D ret; devres_add(dev, devres); } else {