All of lore.kernel.org
 help / color / mirror / Atom feed
From: vishnu <vravulap@amd.com>
To: Mark Brown <broonie@kernel.org>,
	"RAVULAPATI,
	VISHNU VARDHAN RAO"  <Vishnuvardhanrao.Ravulapati@amd.com>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	"Mukunda, Vijendar" <Vijendar.Mukunda@amd.com>,
	Maruthi Bayyavarapu <maruthi.bayyavarapu@amd.com>,
	Colin Ian King <colin.king@canonical.com>,
	YueHaibing <yuehaibing@huawei.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	"Mehta, Sanju" <Sanju.Mehta@amd.com>,
	"moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER
	MANAGEM..."  <alsa-devel@alsa-project.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/7] ASoC: amd: Enabling I2S instance in DMA and DAI
Date: Fri, 25 Oct 2019 06:53:16 +0000	[thread overview]
Message-ID: <3aed0c75-80e7-cc9d-59f9-6ef29b665efc@amd.com> (raw)
In-Reply-To: <20191024114015.GG5207@sirena.co.uk>

Hi Mark,

My inline responses.

On 24/10/19 5:10 PM, Mark Brown wrote:
> 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...
Sorry for this but I am not able to find indentation.I have tested with 
scripts/checkpatch.pl. It shows no warnings.
> 
>> +		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.I will create a separate patch for rectifying this.Thank you.
> 
>> +	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.
> 
Yes my intention is It should always have platformdata.


WARNING: multiple messages have this Message-ID (diff)
From: vishnu <vravulap@amd.com>
To: Mark Brown <broonie@kernel.org>,
	"RAVULAPATI,
	VISHNU VARDHAN RAO" <Vishnuvardhanrao.Ravulapati@amd.com>
Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER
	MANAGEM..." <alsa-devel@alsa-project.org>,
	Maruthi Bayyavarapu <maruthi.bayyavarapu@amd.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	open list <linux-kernel@vger.kernel.org>,
	YueHaibing <yuehaibing@huawei.com>, Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	"Mehta, Sanju" <Sanju.Mehta@amd.com>,
	"Mukunda, Vijendar" <Vijendar.Mukunda@amd.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	Colin Ian King <colin.king@canonical.com>
Subject: Re: [alsa-devel] [PATCH 3/7] ASoC: amd: Enabling I2S instance in DMA and DAI
Date: Fri, 25 Oct 2019 06:53:16 +0000	[thread overview]
Message-ID: <3aed0c75-80e7-cc9d-59f9-6ef29b665efc@amd.com> (raw)
In-Reply-To: <20191024114015.GG5207@sirena.co.uk>

Hi Mark,

My inline responses.

On 24/10/19 5:10 PM, Mark Brown wrote:
> 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...
Sorry for this but I am not able to find indentation.I have tested with 
scripts/checkpatch.pl. It shows no warnings.
> 
>> +		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.I will create a separate patch for rectifying this.Thank you.
> 
>> +	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.
> 
Yes my intention is It should always have platformdata.

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2019-10-25  6:53 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 21:05 [PATCH 1/7] ASoC: amd: Create multiple I2S platform device endpoints Ravulapati Vishnu vardhan rao
2019-10-18 21:05 ` [alsa-devel] " Ravulapati Vishnu vardhan rao
2019-10-18 21:05 ` [PATCH 2/7] ASoC: amd: Refactoring of DAI from DMA driver Ravulapati Vishnu vardhan rao
2019-10-18 21:05   ` [alsa-devel] " Ravulapati Vishnu vardhan rao
2019-10-25  7:06   ` vishnu
2019-10-25  7:06     ` [alsa-devel] " vishnu
2019-10-18 21:05 ` [PATCH 3/7] ASoC: amd: Enabling I2S instance in DMA and DAI Ravulapati Vishnu vardhan rao
2019-10-18 21:05   ` [alsa-devel] " Ravulapati Vishnu vardhan rao
2019-10-24 11:40   ` Mark Brown
2019-10-24 11:40     ` [alsa-devel] " Mark Brown
2019-10-25  6:53     ` vishnu [this message]
2019-10-25  6:53       ` vishnu
2019-10-25  9:55       ` Mark Brown
2019-10-25  9:55         ` [alsa-devel] " Mark Brown
2019-10-25 10:01         ` vishnu
2019-10-25 10:01           ` [alsa-devel] " vishnu
2019-10-25  6:57     ` vishnu
2019-10-25  6:57       ` [alsa-devel] " vishnu
2019-10-18 21:05 ` [PATCH 4/7] ASoC: amd: add ACP3x TDM mode support Ravulapati Vishnu vardhan rao
2019-10-18 21:05   ` [alsa-devel] " Ravulapati Vishnu vardhan rao
2019-10-25  7:06   ` vishnu
2019-10-25  7:06     ` [alsa-devel] " vishnu
2019-10-18 21:05 ` [PATCH 5/7] ASoC: amd: handle ACP3x i2s-sp watermark interrupt Ravulapati Vishnu vardhan rao
2019-10-18 21:05   ` [alsa-devel] " Ravulapati Vishnu vardhan rao
2019-10-25  7:07   ` vishnu
2019-10-25  7:07     ` [alsa-devel] " vishnu
2019-10-18 21:05 ` [PATCH 6/7] ASoC: amd: ACP powergating should be done by controller Ravulapati Vishnu vardhan rao
2019-10-18 21:05   ` [alsa-devel] " Ravulapati Vishnu vardhan rao
2019-10-18 10:39   ` Dan Carpenter
2019-10-18 10:39     ` [alsa-devel] " Dan Carpenter
2019-11-06 14:11     ` vishnu
2019-11-06 14:11       ` [alsa-devel] " vishnu
2019-10-18 21:05 ` [PATCH 7/7] ASoC: amd: Added ACP3x system resume and runtime pm ops Ravulapati Vishnu vardhan rao
2019-10-18 21:05   ` [alsa-devel] " Ravulapati Vishnu vardhan rao
2019-10-25  7:05 ` [PATCH 1/7] ASoC: amd: Create multiple I2S platform device endpoints vishnu
2019-10-25  7:05   ` [alsa-devel] " vishnu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3aed0c75-80e7-cc9d-59f9-6ef29b665efc@amd.com \
    --to=vravulap@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Sanju.Mehta@amd.com \
    --cc=Vijendar.Mukunda@amd.com \
    --cc=Vishnuvardhanrao.Ravulapati@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=colin.king@canonical.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maruthi.bayyavarapu@amd.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.