Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1331732ybc; Tue, 19 Nov 2019 19:01:20 -0800 (PST) X-Google-Smtp-Source: APXvYqwId5PbuEaGopUNHmyHzrs/gx5Er7uVA+sfbms9BJiBjeMJOVavt4t4b+Cc1RxdOU+T5kgH X-Received: by 2002:adf:f20f:: with SMTP id p15mr276635wro.370.1574218880400; Tue, 19 Nov 2019 19:01:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574218880; cv=none; d=google.com; s=arc-20160816; b=buTukbhNf16k7i1NNhfj5/CTXVjgHtLVPD7y9slVkV+UHILtJ1eJzK8XzpHM0B8l9u BcQhqxFyIoMsMvQh0eYRAQTynAJAe45jdaj4QUYXJHTvWCRWuAK/oRMFaZecwTSBFtJd sVCeXyIpVGV3zCfR/b0gxIeaU+VrJrtqOGBtL642xD3bZX8vU0yLRb+IVvwNMMiXnni8 rFYc8k9w2Uq+LBJ9W1BcEr+4z8dy7DgR5K8fFpWhAztLI5Wpxo/pCKiL8cBiL7MhtOsV /UAcNy5Q1NUI5e7Saz1YDmVLWbs52sKbJ93YtRD3g1PNuc7DKPuxGXHChbk1xE+Q6i8e s/ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=QwWcwAQL4Xe8CtQvWkOMGOrgvP40pXiEpClGWDKyAUU=; b=CCIZNABey4vaAo/oQ1BPaQcEzX1mrVU9ZI9bCqYkWxCblah6p3RJ+kvbTQfUYbt2sM LoR9Zds2Ra2WidmG9UVSFFYfLBmI/eVWj7Tq9+YpZ6zRWt9eYsuGkzT16MEr+9ajkzNw A09H9wJwdsUOaPvOQtXcO1h63fjVQcRC0eb9jWWlaDrgVWvHGiKS1bWuneig0hFiVOn9 jYBpxg9CBc0D05lodm5KKJNXggD0P1gCI3TyU7nyHUrKQCsENFl1t6fL3a8iu3VMnqXS Lbkkm1Djzz30a/e62eejcXUXKUfj/AyraJi4yhKpEusSR3IZHoCf4MtUs2cPM6/lkpTX Eh7w== ARC-Authentication-Results: i=1; mx.google.com; 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 h20si3603293edj.48.2019.11.19.19.00.53; Tue, 19 Nov 2019 19:01:20 -0800 (PST) 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; 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 S1727385AbfKTC7s (ORCPT + 99 others); Tue, 19 Nov 2019 21:59:48 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:49014 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727243AbfKTC7s (ORCPT ); Tue, 19 Nov 2019 21:59:48 -0500 Received: from localhost (unknown [IPv6:2601:601:9f00:1e2::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id BE8F8146D0E9B; Tue, 19 Nov 2019 18:59:47 -0800 (PST) Date: Tue, 19 Nov 2019 18:59:47 -0800 (PST) Message-Id: <20191119.185947.333064433426268053.davem@davemloft.net> To: hslester96@gmail.com Cc: fugang.duan@nxp.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net v4] net: fec: fix clock count mis-match From: David Miller In-Reply-To: <20191120012513.11161-1-hslester96@gmail.com> References: <20191120012513.11161-1-hslester96@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 19 Nov 2019 18:59:47 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chuhong Yuan Date: Wed, 20 Nov 2019 09:25:13 +0800 > pm_runtime_put_autosuspend in probe will call runtime suspend to > disable clks automatically if CONFIG_PM is defined. (If CONFIG_PM > is not defined, its implementation will be empty, then runtime > suspend will not be called.) > > Therefore, we can call pm_runtime_get_sync to runtime resume it > first to enable clks, which matches the runtime suspend. (Only when > CONFIG_PM is defined, otherwise pm_runtime_get_sync will also be > empty, then runtime resume will not be called.) > > Then it is fine to disable clks without causing clock count mis-match. > > Fixes: c43eab3eddb4 ("net: fec: add missed clk_disable_unprepare in remove") > Signed-off-by: Chuhong Yuan > --- > Changes in v4: > - Fix some typos. Applied, thanks.