Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp308263ybi; Thu, 1 Aug 2019 19:32:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXjg8CYMA1odm5TdkC6ZDMdNjn637cnI6pNkHdmmOIqBsEVfVQANXurb0BXFii2I/I0JMq X-Received: by 2002:a0c:ae6d:: with SMTP id z42mr95208604qvc.8.1564713152795; Thu, 01 Aug 2019 19:32:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564713152; cv=none; d=google.com; s=arc-20160816; b=LxQxgajn9YdU3OE/JQbMh8o5VrksDXoKG24FN6bXzF5fRQhJAagRwQGSse0odiPYFT Rw8eIilC9AWtPquX3LH0GCmqAd/ONNMjwtCOBvCyvlvltQa/+d5T6ZWO2dHg5iii1HN9 6j/lrKKybo/rm07crVTvf36fsqDsZlt3SZNCMDIK4gcUOOyDO5e1p2MHpwJBoxXrZLVl mH43fqpwrJBLypILxjlAUnRiY1y67UNsfTmDKUALGMp4NSlFZPOY1fMqHrIj9J4OAAcQ 6BwhbHUYeZCmOdqreImoJbu9ncVHsqcGjqdR+DsdT3Q6wsmdy5lEO+8alX8tHiA8E57l kyTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=kyPBhKH/JgTHErOVcN8NhRHLlMlXK7f8NN0qYPv8WHI=; b=sruZaqo8kvLh3AEOByNJfOd5Jf7PT7cGzluN8ZVMl19J03nwITb/BgGzFMB7a4gzJf uYps8V7cdv6OA5TU3tIF5FzucV/P+xoF+6jf2JkUfUgYKUu1Rz9Z3XSCyZ3Bwi8Vtqbd 3ENO43z79T9hUa1LyKheXFwFIHOV47fmZjDmXB3Kb1IuGt4xk6qfn90eu7iXsnvqbfxR KbH3tuNI7RVK8odUbv+f8hbHhNbMcUHX/g5ft24KJ9pzl2jYtIcscKbjwkAC8G96P3YP q+3OjPDKBVPUUf66DepHfwwjpo5LZAhWCQyoeL18DFvkvue+ei9Jy41hD+NqCXSEg6K2 FVpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F2qLX44K; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d5si40184758qki.201.2019.08.01.19.32.19; Thu, 01 Aug 2019 19:32:32 -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=@linaro.org header.s=google header.b=F2qLX44K; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731409AbfHBB5g (ORCPT + 99 others); Thu, 1 Aug 2019 21:57:36 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:38651 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726847AbfHBB5g (ORCPT ); Thu, 1 Aug 2019 21:57:36 -0400 Received: by mail-ed1-f68.google.com with SMTP id r12so36131913edo.5 for ; Thu, 01 Aug 2019 18:57:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kyPBhKH/JgTHErOVcN8NhRHLlMlXK7f8NN0qYPv8WHI=; b=F2qLX44KQctEuLWgZww4TNBRYWqTtnTDIO5Dg5012NhBBHDJzF5pJD0dSEknzA+5pO fgA5twiJtetznN2bWmj5NiMmjxd4NHA9T4IRk4uPFrN/VuyHxfgCIuntyCZNtfG3rZjB TzQXDKjMHGA/qCENrqofvIKrjO8B5HebpIZ372PFPeyJ09HE6TX/ZJ8XzP5F4AQ2bMcR tR+UYxr5zW6nhXnjK+Lv5Q1Y6CKwsZbqi2azsQhXM5OXw5tP8OfJM8iP4pbmDo5T4CCM zyTT1J6YccnsLsxGwIkla8969YlRTzdHrgXtbYGvn0HjaYqumBg4s/zwdEwAhe057NKq HuSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kyPBhKH/JgTHErOVcN8NhRHLlMlXK7f8NN0qYPv8WHI=; b=o/UQa27EG8DgVhPOpIBOGhiEqqNFeDYHJPvqRU1DUqMiBEl5DLAg4/oQ1RfgUVu66O iN1s1lch9to9r98vpkljHhpSmX18sqXucBqJ2sOi7QkT9TI8gHrGiLKK6dMG6tfHgB/Z yFiPnT27WEpu3tOJAPPfZpsc8505Ei6YPyQG0fMG56BxjNCLgekaWzrBalaXpYKvag2k agqHuXKSIViC/ILGMZ/vX51hPi0LS56V56oNcstswChAuQuqov7Uxsrvo8u4n/7P2NT6 XxbHaaN29iDETx9IRFa0tWgA/hKDXQb7msu4ZDn9nMqxOqxr6fISbSIqjqGKBoY0jlXB UxGA== X-Gm-Message-State: APjAAAXEgfL21NlLZpkPRJ3DY/bgWlFyxcz50uvIJpv4GhOICBb49GOo QsIb4tRvEwuz1wV7JlNh1SrnIZSxZnfZUxzVjSBu2w== X-Received: by 2002:a50:addc:: with SMTP id b28mr117212723edd.174.1564711054201; Thu, 01 Aug 2019 18:57:34 -0700 (PDT) MIME-Version: 1.0 References: <20190731193517.237136-1-sboyd@kernel.org> <20190731193517.237136-8-sboyd@kernel.org> In-Reply-To: <20190731193517.237136-8-sboyd@kernel.org> From: Chunyan Zhang Date: Fri, 2 Aug 2019 09:57:05 +0800 Message-ID: Subject: Re: [PATCH 7/9] clk: sprd: Don't reference clk_init_data after registration To: Stephen Boyd Cc: Michael Turquette , Linux Kernel Mailing List , linux-clk , Baolin Wang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Aug 2019 at 03:35, Stephen Boyd wrote: > > A future patch is going to change semantics of clk_register() so that > clk_hw::init is guaranteed to be NULL after a clk is registered. Avoid > referencing this member here so that we don't run into NULL pointer > exceptions. > > Cc: Chunyan Zhang > Cc: Baolin Wang > Signed-off-by: Stephen Boyd > --- > > Please ack so I can take this through clk tree Acked-by: Chunyan Zhang Thanks. > > drivers/clk/sprd/common.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/clk/sprd/common.c b/drivers/clk/sprd/common.c > index a5bdca1de5d0..9d56eac43832 100644 > --- a/drivers/clk/sprd/common.c > +++ b/drivers/clk/sprd/common.c > @@ -76,16 +76,17 @@ int sprd_clk_probe(struct device *dev, struct clk_hw_onecell_data *clkhw) > struct clk_hw *hw; > > for (i = 0; i < clkhw->num; i++) { > + const char *name; > > hw = clkhw->hws[i]; > - > if (!hw) > continue; > > + name = hw->init->name; > ret = devm_clk_hw_register(dev, hw); > if (ret) { > dev_err(dev, "Couldn't register clock %d - %s\n", > - i, hw->init->name); > + i, name); > return ret; > } > } > -- > Sent by a computer through tubes >