All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: alsa-devel@alsa-project.org, maruthi.bayyavarapu@amd.com,
	lgirdwood@gmail.com, dri-devel@lists.freedesktop.org,
	rajeevkumar.linux@gmail.com,
	Alex Deucher <alexander.deucher@amd.com>,
	perex@perex.cz
Subject: Re: [PATCH 7/8] ASoC: AMD: add pm ops
Date: Tue, 5 Jan 2016 18:59:29 +0000	[thread overview]
Message-ID: <20160105185929.GN6588@sirena.org.uk> (raw)
In-Reply-To: <1450897275-17152-7-git-send-email-alexander.deucher@amd.com>


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

On Wed, Dec 23, 2015 at 02:01:14PM -0500, Alex Deucher wrote:

> +	stream = adata->play_stream;
> +	rtd = stream ? stream->runtime : NULL;
> +	if (rtd != NULL) {
> +		/* Resume playback stream from a suspended state */
> +		sdata = rtd->private_data;
> +		config_acp_dma(adata->acp_mmio, sdata);
> +	}

Please don't use the ternery operator like this, it's not bad to write
if statements and they're much more legible.  I was having to think far
too much about the various variables and if we were safely handling all
of them before I realised the next block overwrites them all anyway.
This is really

	stream = adata->play_stream;
	if (stream && stream->rtd)
		config_acp_dma(adata->acp_mmio, stream->rtd->private_data);

or a couple of nested if statements.  Otherwise this patch looks OK.

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

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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-01-05 18:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-23 19:01 [PATCH 0/8] Add ASoC support for AMD APUs [v6] Alex Deucher
2015-12-23 19:01 ` [PATCH 1/8] drm/amdgpu/cgs: add an interface to access PCI resources Alex Deucher
2015-12-23 19:01 ` [PATCH 2/8] drm/amdgpu: add irq domain support Alex Deucher
2015-12-23 19:01 ` [PATCH 3/8] drm/amd: add ACP driver support Alex Deucher
2015-12-23 19:01 ` [PATCH 4/8] drm/amd: add pm domain for ACP IP sub blocks Alex Deucher
2015-12-23 19:01 ` [PATCH 6/8] ASoC: AMD: add AMD ASoC ACP 2.x DMA driver Alex Deucher
2016-01-05 18:43   ` Mark Brown
2016-01-05 18:51     ` Mark Brown
2016-01-08 23:03     ` Alex Deucher
2016-01-09 19:41       ` Mark Brown
2016-01-09 19:53         ` Alex Deucher
2015-12-23 19:01 ` [PATCH 7/8] ASoC: AMD: add pm ops Alex Deucher
2016-01-05 18:59   ` Mark Brown [this message]
2015-12-23 19:01 ` [PATCH 8/8] ASoC: AMD: Manage ACP 2.x SRAM banks power Alex Deucher
2016-01-05 19:02   ` Mark Brown
2016-01-04 15:58 ` [PATCH 0/8] Add ASoC support for AMD APUs [v6] Mark Brown
2016-01-05 19:04 ` 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=20160105185929.GN6588@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lgirdwood@gmail.com \
    --cc=maruthi.bayyavarapu@amd.com \
    --cc=perex@perex.cz \
    --cc=rajeevkumar.linux@gmail.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.