Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3964945ybp; Mon, 7 Oct 2019 00:34:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwt9dmWZRfeBbBFdTHW6RjdSkkHRx+fxXZlL8rpdKVX10fALdgKMea7rH5E5bi0eAoI8KQL X-Received: by 2002:a17:906:4883:: with SMTP id v3mr4336413ejq.20.1570433653890; Mon, 07 Oct 2019 00:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570433653; cv=none; d=google.com; s=arc-20160816; b=sfDOi/D+/wZhyzhQDcbSIcrSxVVE778OVp5y1tEIV+L7x5BRAakH82lafaenBQam0M Y4z/SzbQErRRyTNg2a2027HXuTiJ3ok0D++dXB7fbgsDiA4U4g2Q1jLeeq/D0L3fNi3Y 4m06IcJsHDz7VjgU9TaYtSEirNlQEm81q0yhN3blpxsNv7e8jMf+S6B7SFzH5TCQOfF3 vGQxqf2nyIoxmJTUPsrPz6SawGiLrNwcg7OssG89Vr+ZwIbIXQxkZmbqruMD3K2h9m6Y eUE/g396tVv2HqoTb8Ro9WJHWNI4/Ojv8S6qIKKtCb4hBwxAQOWpABKCs5yMnIHlkFby ERxw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=m0wVzPPVZI5zTvNlb362SfLUY82UVnwf8TmB+ThZU2M=; b=Tghrsfp5QFmZK/BIe1JXI4xBgVhpcbyarQBYuL22hilrxmV48XSBTZb8cA8bFvfRpC ZGQ6DVzQ0Bl3yEEKMN+pZq39NrgXJ3TpU7naAW6Kyq2cNor6LY8Zgm9H+dASwr5eTCyw CsCEo7HL5aO6YV6GJfWv3ZghOHeBzoza8vNUkx5njgsvA/E+dtqxwBjdPq6KQfPXvB2q +qKvWzn7vPNRS2TcGOe8ddFRlrKqde/YUdpQLEGxnXHH+t3BnzXKvWbnq9Q2w/sU7LxT 7zjiWQNEW6LHF38PG/f+UNEG2lDHSvn5TEz1Xm5ShHat+IAW1FqjBnADvJIRiU76wrd5 r7Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b="qA1R/5ku"; 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 d25si7772326eds.40.2019.10.07.00.33.50; Mon, 07 Oct 2019 00:34:13 -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=@st.com header.s=STMicroelectronics header.b="qA1R/5ku"; 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 S1727334AbfJGHb2 (ORCPT + 99 others); Mon, 7 Oct 2019 03:31:28 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:37464 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726960AbfJGHb1 (ORCPT ); Mon, 7 Oct 2019 03:31:27 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x977RFgY014524; Mon, 7 Oct 2019 09:31:14 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=STMicroelectronics; bh=m0wVzPPVZI5zTvNlb362SfLUY82UVnwf8TmB+ThZU2M=; b=qA1R/5kuWiNjTVm2AL6IlnTYnyJD3Jpq5RZNMd0yJMMachZ1XA10EeBMVtdcM/t2aI66 Ou3lY80QKehIIsesQzTdbHF1WCMwSoTGX1wrsppreGXDtT2MroJpcDwGob75bEce9LAm HZFHCSyFuTprnfrqMSlhsKd4YYFIF1CC+dPM0X59g8LfSKuxwhj5+t17pyQpMnwQbsDB npQB7thmZeJBzSFn3zvSmX36l45BSC57YK7Re1JlWOdiTqfo9k7MYbpLLT4F94+Z5c0S qKlHIT0OICM4neM9QAUb1cOy4AdMq+EHg/kJvjxnx7icHimVFuMfpCIdNBPf/VbZiA94 yQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2vej2p0rsb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Oct 2019 09:31:14 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 5D083100038; Mon, 7 Oct 2019 09:31:12 +0200 (CEST) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 4717C2AECA9; Mon, 7 Oct 2019 09:31:12 +0200 (CEST) Received: from SAFEX1HUBCAS23.st.com (10.75.90.46) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 7 Oct 2019 09:31:12 +0200 Received: from [10.48.0.192] (10.48.0.192) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 7 Oct 2019 09:31:11 +0200 Subject: Re: [PATCH] counter: stm32: clean up indentation issue To: William Breathitt Gray CC: Colin King , Jonathan Cameron , Maxime Coquelin , "Alexandre Torgue" , , , , , References: <20190925095126.20219-1-colin.king@canonical.com> <20191005173004.GA7431@icarus> From: Fabrice Gasnier Message-ID: <792dd11a-ae78-c4a3-834f-b1f67a750a14@st.com> Date: Mon, 7 Oct 2019 09:31:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191005173004.GA7431@icarus> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.48.0.192] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-07_01:2019-10-03,2019-10-07 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/5/19 7:30 PM, William Breathitt Gray wrote: > On Wed, Sep 25, 2019 at 10:51:26AM +0100, Colin King wrote: >> From: Colin Ian King >> >> There is an if statement that is indented one level too deeply, >> remove the extraneous tabs. >> >> Signed-off-by: Colin Ian King >> --- >> drivers/counter/stm32-timer-cnt.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-cnt.c >> index 644ba18a72ad..613dcccf79e1 100644 >> --- a/drivers/counter/stm32-timer-cnt.c >> +++ b/drivers/counter/stm32-timer-cnt.c >> @@ -219,8 +219,8 @@ static ssize_t stm32_count_enable_write(struct counter_device *counter, >> >> if (enable) { >> regmap_read(priv->regmap, TIM_CR1, &cr1); >> - if (!(cr1 & TIM_CR1_CEN)) >> - clk_enable(priv->clk); >> + if (!(cr1 & TIM_CR1_CEN)) >> + clk_enable(priv->clk); >> >> regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_CEN, >> TIM_CR1_CEN); >> -- >> 2.20.1 > > Acked-by: William Breathitt Gray > > Fabrice, > > I noticed the TIM_CR1_CEN check is happening before the > regmap_update_bits call for the enable path, while the disable path does > the check after. Is this logic is correct. Hi William, In the disable path, things are done in the reverse order, purpose is to: - enable the clock before enabling the counter (CEN) - disable the clock after the counter has been disabled Current code also takes care of balancing clock enable/disable calls. BR, Fabrice > > William Breathitt Gray >