All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	Akshu Agrawal <akshu.agrawal@amd.com>,
	Lubomir Rintel <lkundrak@v3.sk>,
	Markus Elfring <elfring@users.sourceforge.net>,
	Jose Abreu <Jose.Abreu@synopsys.com>,
	"Gustavo A. R. Silva" <garsilva@embeddedor.com>,
	"moderated list:SOUND" <alsa-devel@alsa-project.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] ASoC: dwc: I2S Controller instance param added
Date: Tue, 17 Apr 2018 17:09:08 +0100	[thread overview]
Message-ID: <20180417160908.GH8973@sirena.org.uk> (raw)
In-Reply-To: <1523941201-15665-2-git-send-email-Vijendar.Mukunda@amd.com>

[-- Attachment #1: Type: text/plain, Size: 801 bytes --]

On Tue, Apr 17, 2018 at 10:29:51AM +0530, Vijendar Mukunda wrote:

> +#define I2S_SP_INSTANCE		1
> +#define I2S_BT_INSTANCE		2

This is obviously very specific to the system you're working with and
therefore doesn't belong in the generic driver.  The device should be
dealing with its own configuration, it shouldn't need to know about what
specifically is connected to it.  It's not even clear what they're doing
in this driver given that there doesn't appear to be any use of the
information, it feels like this is something that the machine driver
should be encapsulating.

Like I said with previous reviews this use of magic numbers for the
interfaces is a bit of a red flag, internally within a driver they're
fine but they shouldn't leak out too much except with things like
numbering an array.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>,
	"moderated list:SOUND" <alsa-devel@alsa-project.org>,
	open list <linux-kernel@vger.kernel.org>,
	Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Akshu Agrawal <akshu.agrawal@amd.com>,
	Lubomir Rintel <lkundrak@v3.sk>,
	"Gustavo A. R. Silva" <garsilva@embeddedor.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	Markus Elfring <elfring@users.sourceforge.net>
Subject: Re: [PATCH 1/4] ASoC: dwc: I2S Controller instance param added
Date: Tue, 17 Apr 2018 17:09:08 +0100	[thread overview]
Message-ID: <20180417160908.GH8973@sirena.org.uk> (raw)
In-Reply-To: <1523941201-15665-2-git-send-email-Vijendar.Mukunda@amd.com>


[-- Attachment #1.1: Type: text/plain, Size: 801 bytes --]

On Tue, Apr 17, 2018 at 10:29:51AM +0530, Vijendar Mukunda wrote:

> +#define I2S_SP_INSTANCE		1
> +#define I2S_BT_INSTANCE		2

This is obviously very specific to the system you're working with and
therefore doesn't belong in the generic driver.  The device should be
dealing with its own configuration, it shouldn't need to know about what
specifically is connected to it.  It's not even clear what they're doing
in this driver given that there doesn't appear to be any use of the
information, it feels like this is something that the machine driver
should be encapsulating.

Like I said with previous reviews this use of magic numbers for the
interfaces is a bit of a red flag, internally within a driver they're
fine but they shouldn't leak out too much except with things like
numbering an array.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2018-04-17 16:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1523941201-15665-1-git-send-email-Vijendar.Mukunda@amd.com>
2018-04-17  4:59 ` [PATCH 1/4] ASoC: dwc: I2S Controller instance param added Vijendar Mukunda
2018-04-17  4:59   ` Vijendar Mukunda
2018-04-17 16:09   ` Mark Brown [this message]
2018-04-17 16:09     ` Mark Brown
2018-04-18  9:41     ` Mukunda,Vijendar
2018-04-17  4:59 ` [PATCH 2/4] ASoC: amd: fixed checkpatch pl warnings Vijendar Mukunda
2018-04-17  4:59   ` Vijendar Mukunda
2018-04-17 17:09   ` Applied "ASoC: amd: fixed checkpatch pl warnings" to the asoc tree Mark Brown
2018-04-17 17:09     ` Mark Brown
2018-04-17 17:11   ` Mark Brown
2018-04-17 17:11     ` Mark Brown
2018-04-17  4:59 ` [PATCH 3/4] ASoC: amd: dma driver changes for BT I2S instance Vijendar Mukunda
2018-04-17  4:59   ` Vijendar Mukunda
2018-04-17  4:59 ` [PATCH 4/4] ASoC: amd: enabling bt i2s config after acp reset Vijendar Mukunda
2018-04-17  4:59   ` Vijendar Mukunda
2018-04-17 10:42   ` Agrawal, Akshu
2018-04-17 11:17   ` [alsa-devel] " kbuild test robot
2018-04-17 11:17     ` kbuild test robot
2018-04-17 11:41     ` Mukunda,Vijendar
2018-04-17 13:46   ` kbuild test robot
2018-04-17 13:46     ` kbuild test robot
2018-04-17 15:51   ` [PATCH V2 " Vijendar Mukunda
2018-04-17 15:51     ` Vijendar Mukunda
2018-04-17 16:10     ` Mark Brown
2018-04-17 16:10       ` Mark Brown

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=20180417160908.GH8973@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=Jose.Abreu@synopsys.com \
    --cc=Vijendar.Mukunda@amd.com \
    --cc=akshu.agrawal@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=elfring@users.sourceforge.net \
    --cc=garsilva@embeddedor.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkundrak@v3.sk \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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.