All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: trix@redhat.com
Cc: srinivas.kandagatla@linaro.org, bgoswami@codeaurora.org,
	lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: codecs: lpass-wsa-macro: make sure array index is set
Date: Fri, 30 Apr 2021 12:23:19 +0100	[thread overview]
Message-ID: <20210430112319.GB5981@sirena.org.uk> (raw)
In-Reply-To: <20210429173642.3230615-1-trix@redhat.com>

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

On Thu, Apr 29, 2021 at 10:36:42AM -0700, trix@redhat.com wrote:

> The happens because 'ec_tx' is never initialized and there is
> no default in the switch statement that sets ec_tx.  Because there
> are only two cases for the switch, convert it to an if-else.

Add a default case that errors, that way if someone adds a new option
things are less painful.

[-- 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: trix@redhat.com
Cc: alsa-devel@alsa-project.org, bgoswami@codeaurora.org,
	linux-kernel@vger.kernel.org, tiwai@suse.com,
	lgirdwood@gmail.com
Subject: Re: [PATCH] ASoC: codecs: lpass-wsa-macro: make sure array index is set
Date: Fri, 30 Apr 2021 12:23:19 +0100	[thread overview]
Message-ID: <20210430112319.GB5981@sirena.org.uk> (raw)
In-Reply-To: <20210429173642.3230615-1-trix@redhat.com>

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

On Thu, Apr 29, 2021 at 10:36:42AM -0700, trix@redhat.com wrote:

> The happens because 'ec_tx' is never initialized and there is
> no default in the switch statement that sets ec_tx.  Because there
> are only two cases for the switch, convert it to an if-else.

Add a default case that errors, that way if someone adds a new option
things are less painful.

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

  reply	other threads:[~2021-04-30 11:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29 17:36 [PATCH] ASoC: codecs: lpass-wsa-macro: make sure array index is set trix
2021-04-29 17:36 ` trix
2021-04-30 11:23 ` Mark Brown [this message]
2021-04-30 11:23   ` 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=20210430112319.GB5981@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@codeaurora.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.com \
    --cc=trix@redhat.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.