Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3526145ybg; Fri, 25 Oct 2019 05:33:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyiJO3gAT7fJ1/6admkOW4Ni+B9ggrVIFHuCJtUfFIE2YkzqabK0hloY/wf64NEqhy+dJcJ X-Received: by 2002:a17:907:105c:: with SMTP id oy28mr3181759ejb.299.1572006826448; Fri, 25 Oct 2019 05:33:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572006826; cv=none; d=google.com; s=arc-20160816; b=rYxPvvunt9jxZlvvKFs+GbrFLg/3FWqlNFzQ2aw8LD1Ve2Y0q4LFG+aikGqy1B7INI kIJOnzRMWVvRcJgASN5gMihFvtJ9kIs/xuoRiw8MtU0xYovIQODYDKiv2UZpJtF2HnCh bAO/w9LYthV0HeCuEPkKu7CM78NF9nJNy1T02XAOxhE9Qr5mEgmA3yMa4EuRUrSD0j4A LvAUZBkvJIQjp9HDFHlM3n69RA5b2YTiIUWG44Pi0hl7yqtyNl+0iVni5/Kq6Bv4Ms94 oGQRHkS3dlYA5qkzIraFyTKDRXGpd0wJCV5U+cZz8wWv3EMCJPwtEue7iCXh+vgbU+5I 917w== 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=X3j9UrH+/Fzfrt4StiXNQ+AaG04IVrkqPFPRYShjJH4=; b=QEzqwrTNmH0AYiH+4bDeQJ7fJlLPZZIUSfvafeh+8lkwecw/49EPD/HRzv7NOwQpxk r33YIK7wCSQ+AxZVsKLgo8IEJnkh5REqJfMOLUwHypjWdECDfKAG8QQInq8k34b9pO3D 253HQHAZTWuAzDy+LdQYToy6vw0IhzaCjrzqFFgv3j+ePpwCcIWl/fjGdIqq0XWE0Mjs KWnlRSZ43Dx9HWYf/tQ5ji9nsSCnv/slOwUb7FuAsanZ2HyyQ6ygl3euo0jMm7bwEbRL gDa5etjRLqSpsytMeWZ2I1pAVJMor7jzlW31PlJSlxvZc8+EFEY5MNyzTfp39UNlN21+ zrLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=OijjdxG5; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i12si1091054ejj.119.2019.10.25.05.33.16; Fri, 25 Oct 2019 05:33:46 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=OijjdxG5; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439032AbfJXLkw (ORCPT + 99 others); Thu, 24 Oct 2019 07:40:52 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:53060 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438710AbfJXLku (ORCPT ); Thu, 24 Oct 2019 07:40:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=X3j9UrH+/Fzfrt4StiXNQ+AaG04IVrkqPFPRYShjJH4=; b=OijjdxG5DT0DclHIlyYtSOjt9 QKdLW86wpsJkyhSha1lDzuwcYivt7PvCkdZX9pi4Q7Byvs5+Kqeb3SPxkP2rPwLA4qcU/l9usNBRc YrsHsThy+YglGy1Xh/JSyUSZ20k+pK7cPajhMVLb/u3A5i6RWdPBsgdq+S9c0jSRvzQE8=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=ypsilon.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iNbTU-0003Ph-7k; Thu, 24 Oct 2019 11:40:16 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id 700B5274293C; Thu, 24 Oct 2019 12:40:15 +0100 (BST) Date: Thu, 24 Oct 2019 12:40:15 +0100 From: Mark Brown To: Ravulapati Vishnu vardhan rao Cc: Alexander.Deucher@amd.com, Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Vijendar Mukunda , Maruthi Bayyavarapu , Colin Ian King , YueHaibing , Kuninori Morimoto , Sanju R Mehta , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: Re: [PATCH 3/7] ASoC: amd: Enabling I2S instance in DMA and DAI Message-ID: <20191024114015.GG5207@sirena.co.uk> References: <1571432760-3008-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> <1571432760-3008-3-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XaUbO9McV5wPQijU" Content-Disposition: inline In-Reply-To: <1571432760-3008-3-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> X-Cookie: What foods these morsels be! User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --XaUbO9McV5wPQijU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Oct 19, 2019 at 02:35:41AM +0530, Ravulapati Vishnu vardhan rao wrote: > + case I2S_BT_INSTANCE: > + val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER); > + val = val | (rtd->xfer_resolution << 3); > + rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER); > + break; For some reason the break; isn't indented with the rest of the block. I'm fairly sure I've mentioned this before... > + case I2S_SP_INSTANCE: > + default: > + val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER); > + val = val | (rtd->xfer_resolution << 3); > + rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER); > + } Missing break; here - again it's normal kernel coding style to include it. > + struct snd_soc_pcm_runtime *prtd = substream->private_data; > + struct snd_soc_card *card = prtd->card; > + struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card); > + > + if (pinfo) { > + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) > + rtd->i2s_instance = pinfo->play_i2s_instance; > + else > + rtd->i2s_instance = pinfo->cap_i2s_instance; > + } Looks like you need an error handling case here if pinfo is missing, i2s_instance needs to be set. There are default cases but it's not clear that that's a good idea, the intent of the code is clearly that there's always platform data. --XaUbO9McV5wPQijU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl2xjZ4ACgkQJNaLcl1U h9BhrAf/Txqck6/DbNHSTK8lPyCZ9s2RTKplJJicUfk0nuoJtCepGTPnONQjxLm5 4zppLX7vtUzP9GVvTBzR5acgF79LIEOtevrY2H/3fAJ4W93HsshpLQtDs45ksPrE HBiiXl16hX9WNRf1s17LizgPUw+izaQsAhDf8JuBWcKRfhRL9M8/oxe4ZgE3wooK SLE7e74+roHIWQ9hhb7eJy4IQSquVSb3dYFpHruwQVJxN20uKypEPzeVxO2EYAK4 e9GBmKw8rXzlsVME8M57mIQ4RgO3J/hOvmv2Rtpa+lJ26H5qpQqxcLuCpCZ5KR+C +2yTqhWbMBMHjpfQtibSEyJFfe8YTw== =8jUs -----END PGP SIGNATURE----- --XaUbO9McV5wPQijU--