From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78AF8C4743C for ; Wed, 23 Jun 2021 12:22:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 45ED961002 for ; Wed, 23 Jun 2021 12:22:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45ED961002 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DhB5Xj2w6pEKSFnjDipVCacOYgT8yMs0ystKH9hMNr4=; b=Glkq2sWhHfBxm8 h2LZA5RMwjlGiBlhtTvKgwJQH4lN6wsVcmSvG7vC5AGtc3U8Pu368LAk+BZK6zHshnMhEhxDkBsbx RXEpj77OfTvT1I8Ffn43kxwNK7QQJUMYm0dP0hDA2lLbSzKMQK4vOMXhVGNI7rkka6SE105+MJEiA tVgR0myKrkGR7cnoT9nMdipREpWMs/0ImDjRmWN7gdz4eWVRdqwZo0fW9HsHDBRruFS6GwUiBQ5kw qYwcCwbixlH8YUJZmcxvd7pmZXyq1PvxSj8FRYffOF7ZLRlzwrmm1pcGQWBOeoiULVbw1f8YWVf98 WaABlBAhp06jI91kcUCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lw1s9-00AaX7-7k; Wed, 23 Jun 2021 12:20:49 +0000 Received: from mail-wr1-f49.google.com ([209.85.221.49]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lw1s4-00AaW1-6E for linux-arm-kernel@lists.infradead.org; Wed, 23 Jun 2021 12:20:45 +0000 Received: by mail-wr1-f49.google.com with SMTP id y7so2410739wrh.7 for ; Wed, 23 Jun 2021 05:20:43 -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=O2xr1i+RF5Ao6yC1WbIh/HEQekCWxmT/YgkQZ9rgNw5CGiq5wDN1ALLTccc9UIKX6m 0n1ovQm4KLN4xIiXCk1NQAEzdmHimeATcBdqL1rwAcV/EcLIQfgDNPRy+iFe+sVytdeP hK9FMxBezP7p4HVoc9ZJU9CKEpmhW1cemTsoeARPX2B39+P7LcbZAqD5T5oyFRhHv1s/ hQ6uqm5Rl8r5RYnGmyd5TVkPqw1nsiuNdZrAH3Tz083Ok/gcXHmfp/tq+eHyF+6xPoma sqZYCWLTYlceZg12WT28yR1syhopgBmnNpJzgKw6Ifv/P4mVGfE/JS2XFYqwBkzqSqgp FslA== X-Gm-Message-State: AOAM5317B1WglHfLi3I4osbakTYhiDqx9RIbiSKsMeMDhaRvGBSgLp4F T3CGig4E4FmtaNBOxoms3YYPRji2vHR1WZob6Rw= X-Google-Smtp-Source: ABdhPJwabmji/un4AUhLivSfMKZJDm6mnfCuU7n4mPp2sqRUjLTKOfww+5IO42a4UcM2C2mHjPFiMQ== 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210623_052044_314692_D3BC7E8E X-CRM114-Status: GOOD ( 16.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel