Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5612135pxj; Wed, 23 Jun 2021 05:22:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5VggPvji1gq8/Mv2dHYf01FuLDLszF6IQ4HJEG2ZIhf0s2TJrbXL4pgf/StsdowcRPxQu X-Received: by 2002:a05:6402:d6a:: with SMTP id ec42mr12001412edb.211.1624450940924; Wed, 23 Jun 2021 05:22:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624450940; cv=none; d=google.com; s=arc-20160816; b=YwpfkLgk2fSGTScA70QGF7Gns3wGRGX9oQk3WP0kiGzf9Y5li4mI39yBeXFGkAtusS TqJbK822iUWICNvwucQkKRxzyDMsaMoG3uYIj5aVQiEuatGrermY9PiAAENsg83GfRP6 4yja3/7eixwt3Dci3RZVawJ/xvbVVTQZeKUc0srdNHNQU5sEWCjzRZlj4ZLU/fiqsCe5 Ee9rw52k7baTJgzBQRwAa7dYB0X6bJrW2w5SD/JzC7wCXxLkmdHF2POUV7gUPZXhpxdC VHNHbYdYxKnA9f5sSeyoK+PYxhWNLX20tW7eKF/Krc/Wsj90bj5doEK2Pl4obEynVJU6 23NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=UfP6k5ommLM5X7TkcxI89PaM7Nsi15an45FVpSiGZ1w=; b=J2xgPw91zq9w7UjDm1ybj/f0WuODQXq5MDC5GXRwZo/21jz14v6pcUAZ83z6Cw20Xy 91qgjKqmss3AUN8K92/1w2+v+TB7cH+PxXRF/urRi01lFbqFDai35M6xpfSu/3NLt2CV 78EMUdX/ddotqgIL22ixyQa4vtx60mNIj93pSz/FcZSRyM+826TGIxEGb54U8n+Q75q0 yzC+i+n5Ixak8DPxKaMtP6k+gZ2kxO4lMMTlxCxRDZK+eGYVJb132xLMQRaJ0ytKAe8H LLkwin0Xzwxo/h4Dl6HT1YvAt0z8gGg4S6qqmJK2nkx/bWjceu7P8KnsK5AwZBb7/K8O 2XpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b17si23608429edy.262.2021.06.23.05.21.58; Wed, 23 Jun 2021 05:22:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230212AbhFWMXA (ORCPT + 99 others); Wed, 23 Jun 2021 08:23:00 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:41484 "EHLO mail-wr1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230182AbhFWMXA (ORCPT ); Wed, 23 Jun 2021 08:23:00 -0400 Received: by mail-wr1-f47.google.com with SMTP id f15so2412365wro.8; Wed, 23 Jun 2021 05:20:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=UfP6k5ommLM5X7TkcxI89PaM7Nsi15an45FVpSiGZ1w=; b=D8kqkLgbNyH4eQfPf7Q4U6sJ/ysi0YIf/fmfmvlEGquUc8hzIV3/lqbj+Bhw7fOKhi sIdYqznIOBejqyywviC8+x3EU4EAdXODDewoS/A+1PCmRtr4dy4UPbs44OAkShIEsKfZ KKvy0o79d16yLMVHgKvdbOEyVCy7tvYzXEYkW/3Nuw+BszZr3P2xqbYfKa5GzSjrKo5y VSKIPizBbqvnuMe/CbKjLzcPBLym6M4gd4HqdH0LR/6oMZsbOGq+AeiYwG/T70F/IPHm 5kAUBwh1dtw8hNwt/lpoSba7IAKtk6FeFmTKcuYd7IO9qsl5sUoxubkNAKEdJzFNKY1L qxrA== X-Gm-Message-State: AOAM531v6HdY3E93xF63NIR5VSK+AKdS80mLj3fVi+p33MsCIg8BXv4K WmZbdTsWxZE9yr0AkTbYTYQ= X-Received: by 2002:adf:f808:: with SMTP id s8mr10890798wrp.270.1624450841945; Wed, 23 Jun 2021 05:20:41 -0700 (PDT) Received: from rocinante ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id l10sm2734991wrv.82.2021.06.23.05.20.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Jun 2021 05:20:41 -0700 (PDT) Date: Wed, 23 Jun 2021 14:20:40 +0200 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Michal Simek Cc: linux-kernel@vger.kernel.org, monstr@monstr.eu, git@xilinx.com, Hyun Kwon , Bjorn Helgaas , Lorenzo Pieralisi , Rob Herring , linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org Subject: Re: [PATCH] PCI: xilinx-nwl: Enable the clock through CCF Message-ID: <20210623122040.GA46059@rocinante> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michal, Thank you for sending the patch over! > Simply enable clocks. There is no remove function that's why > this should be enough for simple operation. What clock is this? Would it be worth mentioning what it is for a reference (and for posterity) the commit message? Also why it would need to be enabled and wasn't before? Would this be a fix for some problem? Would this warrant a "Fixes:" tag? And would it need to be back-ported to stable kernels? [...] > @@ -823,6 +825,11 @@ static int nwl_pcie_probe(struct platform_device *pdev) > return err; > } > > + pcie->clk = devm_clk_get(dev, NULL); > + if (IS_ERR(pcie->clk)) > + return PTR_ERR(pcie->clk); > + clk_prepare_enable(pcie->clk); > + [...] Almost every other user of clk_prepare_enable() would check for potential failure, print an appropriate message, and then do the necessary clean-up before bailing out and returning an error. Would adding an error check for clk_prepare_enable() and printing an error message using dev_err() be too much in this case? If not, then I would rather follow the pattern that other users established and handle errors as needed. What do you think? Krzysztof