Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5496168ybh; Wed, 7 Aug 2019 06:59:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzskrRBmahagz8KzdadGVRtUPHYL2dhv5WOjk75kPVBkq1k4FSJNVu6/5GPdC2B/hjQH4Mf X-Received: by 2002:a17:902:e383:: with SMTP id ch3mr8292428plb.23.1565186393145; Wed, 07 Aug 2019 06:59:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565186393; cv=none; d=google.com; s=arc-20160816; b=Pr+lS4kKTeKEeSCbIBqOSc6LeXJPAFqDehVee2RjcRPUG7JmXKClnFeAICOb6cIzbo 8UBj7Wkr1WMHH/G9SwFoUlgKttMvXrvl+mEHa3FPAdTTAL6FTvhl8t7ILjF+Uo1SuxcE UMqcPDOXef0/yTSUIVEfL94WCSAyOvLPLy9XNHo66DLPx8Ab+aWb2851Jf+sWu6eWbHt 57Kf05lgeC9s6TYWrIjaQsciNjLkr2/GSFnB44XJL/jDvb4jXiZMgvmcgmosPseLVQT0 dWstmeMK6xSs17yOEG8GBt1y5RNI4kk10+9EznkQO9gg/Riz1dvuoafAkvSFT/m+MbqX pwZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=JEGhf93f3Akg5xAiAZZbwAtjhXGTAB4HITGZRviUGbw=; b=B2PVbhGmuCVDnuIoe5G17DE3ANJ03y3RHDSczAcbAmQlsyiu91D4QTlgAZjKQ3Gk1w 6H7r1ZUjzHKiq9RW74MbGEBA/kz/baSxk1vBv+Z+HTkZgcu39GbrfFIN1b6+3Dyu0wrW rNWXt07NK1D051G4arak18xMOCVaRRZVpH74dqT7ESXtaUAz/RbHJgU+b8Pxj7ZP/7V5 ilA8hySJ/G/ld5EMy7+IzdBWuF5RIk1MH6DbKoUX1bdTR+f/KzSzcpnbMgzm8oTuFNLS IYUtb2CWd5JHZi8UHOp4XsPwlwQtt/PMduG8ITG2kchmm3vZ4EmjwYzQ87lOF2fpkdny /f3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=hxltUPay; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6si56627818pfb.230.2019.08.07.06.59.38; Wed, 07 Aug 2019 06:59:53 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=hxltUPay; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388028AbfHGN5S (ORCPT + 99 others); Wed, 7 Aug 2019 09:57:18 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39479 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388007AbfHGN5R (ORCPT ); Wed, 7 Aug 2019 09:57:17 -0400 Received: by mail-wr1-f67.google.com with SMTP id t16so1373737wra.6 for ; Wed, 07 Aug 2019 06:57:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=JEGhf93f3Akg5xAiAZZbwAtjhXGTAB4HITGZRviUGbw=; b=hxltUPayeYBh+lxDyHLGBFwRsdfIsK3H03jSxiT/X/jXjZlCUPV9CmHMKclSe/HCBm /9zxcigUzAl1ZkmYidLc0CIWDPKORG4iM2/ni22+l3Z3ozLNU/92lKb2fwY989mKV0xy FhKG/1rS1kcl/WZyFLqyXP6tGemSZliw1rdVCNGHoR4/hpanz+LBPKs+Ji+mYYDiHerH YpfPI7LhoQlM8zBUon7PWChkmNIJKNakymjqeE1ftwmYJZ5q6/GHvXlsn2oeRH0rcO2f mHco3Srg1/In/v+lui9YNh1XO06OPo33pXMavv92Uzpqdgy3ELs+LpY0BEn7yqRNm2GK DTGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=JEGhf93f3Akg5xAiAZZbwAtjhXGTAB4HITGZRviUGbw=; b=TKc4vxMWqEWBqbKtP3SrZVRYhNypZjZ90UL8TJpYGOMFwM8dtw+BhwwxmkySzHm6I6 n5gmdR3me811fv0OpHaF8VAZ9/F0LftSjGx8MU6bohP9JpTYl7lgqJY5g9f4z2LBFj8c iqoIBD+4e9OmJqzmQ8YpIPiFx5CMvVjJBXq+H2s3iBr1sqWZUSagnWgciivRdJt6L46F se7krO6YXPIVo9fqF7QkvYjhsMw/wiEdAfSkJW8ckWUIdxm/5oBmjHhSAxpeH39LmEqR FUgeDSMSwBJutpkMsMEKCJFNzFzECe8KULb6Lj+/GFTaoSOSygFeH9yoOftzVOskADvL hYeQ== X-Gm-Message-State: APjAAAWbiypH/y63oSG2Iw2JqlcV692Cw/8VA2x3jJjlnga9MSCbAoUa S0YPBjl/fFn8zMMyC8MF2prjHQ== X-Received: by 2002:adf:e2cb:: with SMTP id d11mr4614004wrj.66.1565186235445; Wed, 07 Aug 2019 06:57:15 -0700 (PDT) Received: from localhost (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id k9sm26301161wrd.46.2019.08.07.06.57.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 07 Aug 2019 06:57:14 -0700 (PDT) From: Jerome Brunet To: Stephen Boyd , Michael Turquette Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Neil Armstrong Subject: Re: [PATCH 3/9] clk: meson: axg-audio: Don't reference clk_init_data after registration In-Reply-To: <20190806214852.DE14F216F4@mail.kernel.org> References: <20190731193517.237136-1-sboyd@kernel.org> <20190731193517.237136-4-sboyd@kernel.org> <1jwofqvftg.fsf@starbuckisacylon.baylibre.com> <20190806214852.DE14F216F4@mail.kernel.org> Date: Wed, 07 Aug 2019 15:57:13 +0200 Message-ID: <1j1rxxoz7q.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 06 Aug 2019 at 14:48, Stephen Boyd wrote: > Quoting Jerome Brunet (2019-08-06 01:49:47) >> On Wed 31 Jul 2019 at 12: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. >> >> Hi Stephen, >> >> 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 > Missed it, sorry. >> >> 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. I'll check to be sure and notify you in the PR if necessary > >> >> 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. >> >> 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? No other use > 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. Sure, why not. > Unless of course there are other uses of the init struct? I was just commenting on the fact that initialization function tends to rollback what they can in case of failures, usually. > >> >> > >> > 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(-) >> >