Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp552635ybc; Tue, 19 Nov 2019 05:41:37 -0800 (PST) X-Google-Smtp-Source: APXvYqzn2N11oJ44aNYJf+ZN9UGKIT2pL6AlTfpKMcYQYEywwtyqlFgywudwUmQ8Jo6gEWjFA2T/ X-Received: by 2002:a17:906:5397:: with SMTP id g23mr33956725ejo.93.1574170896943; Tue, 19 Nov 2019 05:41:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574170896; cv=none; d=google.com; s=arc-20160816; b=cZJeP9zeJBkA/0QEhn3/reL4IYYFoVmoteBtR9uwTnIvjv2zsXKl8xvu/urCA4lpqV tHwKKa5R5dCCCulXw3qnzT+rFYzA5qWBbjEUtgl9CVE44EVv8TDJcYcmUz2TlJ4g27jk aMaFpTD+0qTLuvnmR9DnA7kenSDJbXod4pyYR5K5WpMB4GIRRW1d4BGg73lLCzMP+vDd cAxwVIqAjj9GoR3MZKH7TEBVIcRbsawLvGkZ/oMq7ubh8GgRs2hJRdseLhA3N/8CHak5 FY3oGIYGdOSDUuNvP7KFFQnByxuPZN+Yd2b3OfMKP2kqeJrd1Kk3Ay5TTPdnj7gWfxwU MHqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zeT1T5F4u/9t9rqf7pRcWtmarJGMaGO5YjAnx2eEqyo=; b=mvqBWHVEtq7y6sDkpBWIgTGKaINAiWg+mnmj71FYgLwRY1i/hEbl3b6taeQnoS9NHQ qowb4naPF+yd0lDOVTWENC2vHTvM5YaLEE1v9pXJcasoxhaKSGnrJCS99tJp1ophb6hT okeI6zCp6SI9OVW6DQwnr6GPIs9De1/l0sDqUYSq6Bawo9OL+N/ukcRWsCLwlUJXA09b qdWIkhLh7Z7mL4m3HG+z7ZG0poeaPj+UKWJOzn636OsC2j45nw3AniLz+p5FoTKdIYJj 7+E7IsSPogCZYs+u9hYBTA6TKVX/XuxrhZmGcKh+JmiWM9mcFMGhe/lICoZavKET1taI dW0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=ERpzotDS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d16si12508872ejc.277.2019.11.19.05.41.11; Tue, 19 Nov 2019 05:41:36 -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; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=ERpzotDS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727351AbfKSNhN (ORCPT + 99 others); Tue, 19 Nov 2019 08:37:13 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:37574 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725280AbfKSNhN (ORCPT ); Tue, 19 Nov 2019 08:37:13 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xAJDYJsw142439; Tue, 19 Nov 2019 13:34:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2019-08-05; bh=zeT1T5F4u/9t9rqf7pRcWtmarJGMaGO5YjAnx2eEqyo=; b=ERpzotDSLHZmw2HCw7RKqcEvDqjcLJRsdk7QizAlNvOKi0LhoStogrFjvgiyf//iMCeR pU98NNr39sva/nm9BsKBfmUQqTqQAUwUshf/SrB/Q+tkuU11pNEEUykOCVKxbYedLVbq 6I7G/wqLRC1vtPUPaLV7MRyg60gpJxMlJ2uF8dHVuplQGImtoxOlUMzFfIVcANf0gkb5 T4vKCvgWcxD2svCxH3OSOWXMa3ix52480yQto2fyxkFEZrRf0SdhixWXysHTqOtqIqex a8SeLc7rUmnu68q/Jj/1lzYEOaa/kY4buLqBG5d5RkLkcR0KTNeloZptD6SuFbmzxInM 9w== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2wa8htpxbt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Nov 2019 13:34:45 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xAJDVkE7105282; Tue, 19 Nov 2019 13:34:44 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 2wc0agdf4g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Nov 2019 13:34:44 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id xAJDYbd0020028; Tue, 19 Nov 2019 13:34:37 GMT Received: from kadam (/41.210.141.188) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 19 Nov 2019 05:34:35 -0800 Date: Tue, 19 Nov 2019 16:34:16 +0300 From: Dan Carpenter To: vishnu Cc: Ravulapati Vishnu vardhan rao , Alexander.Deucher@amd.com, djkurtz@google.com, Akshu.Agrawal@amd.com, Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vijendar Mukunda , YueHaibing , "Gustavo A. R. Silva" , Kuninori Morimoto , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: Re: [RESEND PATCH v9 6/6] ASoC: amd: Added ACP3x system resume and runtime pm Message-ID: <20191119133416.GB30789@kadam> References: <1574165476-24987-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> <1574165476-24987-7-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> <20191119123531.GA30789@kadam> <3321478e-de8f-2eb6-6e6f-6eb621b8434b@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3321478e-de8f-2eb6-6e6f-6eb621b8434b@amd.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9445 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1911190124 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9445 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1911190125 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 19, 2019 at 06:26:17PM +0530, vishnu wrote: > > > On 19/11/19 6:05 PM, Dan Carpenter wrote: > > I can't apply this because I'm not CC'd on patches 2-5. > > > > On Tue, Nov 19, 2019 at 05:41:16PM +0530, Ravulapati Vishnu vardhan rao wrote: > > > +static int acp3x_power_on(void __iomem *acp3x_base) > > > +{ > > > + u32 val; > > > + u32 timeout; > > > + > > > + timeout = 0; > > > + val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS); > > > + > > > + if (val == 0) > > > + return val; > > > + > > > + if (!((val & ACP_PGFSM_STATUS_MASK) == > > > + ACP_POWER_ON_IN_PROGRESS)) > > > + rv_writel(ACP_PGFSM_CNTL_POWER_ON_MASK, > > > + acp3x_base + mmACP_PGFSM_CONTROL); > > > + while (++timeout) { > > > > while (++timeout < 500) > > > > If I check with timeout<500 and in next condition i have > if(timeout >500) this never happens. I was maybe not clear enough. Please don't write: while (++timeout) { That doesn't make sense as a loop. It looks like you are trying to loop UINT_MAX times. Put the ++ and the limit on the same line. There is only one real bug in my review but there is just a lot of clean up left. Can you have a co-worker review your patch before resending? The patch 1/6 looks pretty good now but I haven't seen patches 2-5 so I'm worried there is a lot of cleanup left to do. regards, dan carpenter