Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4610068ybh; Tue, 6 Aug 2019 14:50:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCeQUHqzlpBmOAnVORWl2hFwOFrvl1wtep2m1rRD63+Uj8jWB39FcFw1a6C+XzPbIu1cPH X-Received: by 2002:a17:902:a607:: with SMTP id u7mr5164879plq.43.1565128208624; Tue, 06 Aug 2019 14:50:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565128208; cv=none; d=google.com; s=arc-20160816; b=CP2+2foyzL3+jG9UILPO9rYe9fUSLQUNrhCTcyorIU5Del7UpYRyVAxB32CnIWjaJ/ Jjd5z5f/rQLlr5ZzXqrsyskkmPSqJ+dkQPpJ+lFkqcm/6grgQuNAsgAn+EnXorPRSkSB it3v3Y8V7+Lzh1NSjY0BjSb0kSJ9nLZfz/cBPWI1H0RbIi1qGJ5PUpQMlQDa44DDgg4s icrsjQUbVL1WELhwM7TGyvGAm3p3sAk6vgtHgPcHDC7kdy+f5m88H/T3MTjfBBawEToI Mpayz8otz793QOrHh1PBY3B0UIQctMDU0eVeZ4EFBmzuhTyX2emKBsItEybXzeP7aVOU FYkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:user-agent:to:cc:from :subject:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=9+NR1zKkg5qsgvtx4t9yi77pnG49boSbF2xsUapA9g4=; b=tymM8xPIos+/zllYqzPC5dnIvrQzhPyoNETJyrYjaotJ6z1+DReuXivDSP9JAS/O5I ocGaVyt9848pd0LF+dAPaKSoDES5/UwA/Zmriff4g2rofBCwtrFsCeJtRwHIk6I0wJm+ XTVzhkCRT5BIHUiPe/0sROWtcbOvxptOD5RPPcJEhyE8h+FWE7sW6E2Ojl7hHkUtpx+T eIKsPbaBOqAVWDfl+YneEO3hIWEXoo9Ugia4gCmtz+e9UhfHkfWnMsKcKZjyhe4ZWX3O 9LcM3t1cd7JqdMOoRyPaKeV+H7fd8PWBbTK0Fjs8d2ydr88FLfk7agYOvxbSYXO58mPE 32Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=srrBWXOt; 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 r72si15813220pjb.33.2019.08.06.14.49.52; Tue, 06 Aug 2019 14:50:08 -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=srrBWXOt; 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 S1726806AbfHFVsy (ORCPT + 99 others); Tue, 6 Aug 2019 17:48:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:60250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726133AbfHFVsy (ORCPT ); Tue, 6 Aug 2019 17:48:54 -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 DE14F216F4; Tue, 6 Aug 2019 21:48:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565128133; bh=jJlefsLNTHcXdSrlXz0gbSzDo7ArhuKPE0ip2ySlfZk=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=srrBWXOtzoGkFmJiNuxDu9wKwsGsgB54/PMoj8eFAizxqjUv7e/4YESmAbmU0UCb7 6eFHX/29bco/LMbM9R6FWuOM7n3if+oYydQTNXduSKP+pzpmuOepRqPinxvB0QkiRy l5vdBoo7EmQgQdI5zNRXLC1jOEhdso1XVGq8SEZQ= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <1jwofqvftg.fsf@starbuckisacylon.baylibre.com> References: <20190731193517.237136-1-sboyd@kernel.org> <20190731193517.237136-4-sboyd@kernel.org> <1jwofqvftg.fsf@starbuckisacylon.baylibre.com> Subject: Re: [PATCH 3/9] clk: meson: axg-audio: Don't reference clk_init_data after registration From: Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Neil Armstrong To: Jerome Brunet , Michael Turquette User-Agent: alot/0.8.1 Date: Tue, 06 Aug 2019 14:48:52 -0700 Message-Id: <20190806214852.DE14F216F4@mail.kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Jerome Brunet (2019-08-06 01:49:47) > On Wed 31 Jul 2019 at 12:35, Stephen Boyd wrote: >=20 > > 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. >=20 > Hi Stephen, >=20 > What to do you indend to do with this one ? Will you apply directly or > should we take it ? I said below: Please ack so I can take this through clk tree >=20 > We have several changes for the controller which may conflict with this > one. It is nothing major but the sooner I know how this changes goes in, > the sooner I can rebase the rest. Will it conflict? I can deal with conflicts. >=20 > Also, We were (re)using the init_data only on register failures. > I understand that you want to guarantee .init is NULL when the clock is > registered, but it this particular case, the registeration failed so the > clock is not registered. >=20 > IMO, it would be better if devm_clk_hw_register() left the init_data > untouched if the registration fails. Do you have other usage of the init_data besides printing out the name? I think we could have devm_clk_hw_register() print out the name of the clk that failed to register instead, and get rid of more code in drivers that way. Unless of course there are other uses of the init struct? >=20 > > > > Cc: Neil Armstrong > > Cc: Jerome Brunet > > Signed-off-by: Stephen Boyd > > --- > > > > Please ack so I can take this through clk tree > > > > drivers/clk/meson/axg-audio.c | 7 +++++-- > > 1 file changed, 5 insertions(+), 2 deletions(-) > >