From: Arnold Chand <arnold.chand@gmail.com>
To: "eric@anholt.net" <eric@anholt.net>
Cc: "stefan.wahren@i2se.com" <stefan.wahren@i2se.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com,
bcm-kernel-feedback-list@broadcom.com,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] staging: vc04_services: bcm2835-audio: bcm2835-ctl.c fixed warnings
Date: Tue, 13 Nov 2018 12:08:55 -0500 [thread overview]
Message-ID: <9e35c529cc004dca71227d34baed976e1eaa3b88.camel@gmail.com> (raw)
Fixed lines over 80 characters by adding braces where control flow
statements are more than one line, aligned parenthesis of function
arguments.
Signed-off-by: Arnold Chand <arnold.chand@gmail.com>
---
.../vc04_services/bcm2835-audio/bcm2835-ctl.c | 27 +++++++++++--------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
index a6ec72a5f0be..47347ec82572 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
@@ -68,7 +68,7 @@ static int snd_bcm2835_ctl_get(struct snd_kcontrol *kcontrol,
}
static int snd_bcm2835_ctl_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
+ struct snd_ctl_elem_value *ucontrol)
{
struct bcm2835_chip *chip = snd_kcontrol_chip(kcontrol);
int val, *valp;
@@ -88,8 +88,10 @@ static int snd_bcm2835_ctl_put(struct snd_kcontrol *kcontrol,
if (val != *valp) {
*valp = val;
changed = 1;
- if (bcm2835_audio_set_chip_ctls(chip))
- dev_err(chip->card->dev, "Failed to set ALSA controls..\n");
+ if (bcm2835_audio_set_chip_ctls(chip)) {
+ dev_err(chip->card->dev,
+ "Failed to set ALSA controls..\n");
+ }
}
mutex_unlock(&chip->audio_mutex);
return changed;
@@ -101,7 +103,8 @@ static const struct snd_kcontrol_new snd_bcm2835_ctl[] = {
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "PCM Playback Volume",
- .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ,
+ .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
+ SNDRV_CTL_ELEM_ACCESS_TLV_READ,
.private_value = PCM_PLAYBACK_VOLUME,
.info = snd_bcm2835_ctl_info,
.get = snd_bcm2835_ctl_get,
@@ -129,7 +132,7 @@ static const struct snd_kcontrol_new snd_bcm2835_ctl[] = {
};
static int snd_bcm2835_spdif_default_info(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_info *uinfo)
+ struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
uinfo->count = 1;
@@ -137,7 +140,7 @@ static int snd_bcm2835_spdif_default_info(struct snd_kcontrol *kcontrol,
}
static int snd_bcm2835_spdif_default_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
+ struct snd_ctl_elem_value *ucontrol)
{
struct bcm2835_chip *chip = snd_kcontrol_chip(kcontrol);
int i;
@@ -153,7 +156,7 @@ static int snd_bcm2835_spdif_default_get(struct snd_kcontrol *kcontrol,
}
static int snd_bcm2835_spdif_default_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
+ struct snd_ctl_elem_value *ucontrol)
{
struct bcm2835_chip *chip = snd_kcontrol_chip(kcontrol);
unsigned int val = 0;
@@ -161,8 +164,10 @@ static int snd_bcm2835_spdif_default_put(struct snd_kcontrol *kcontrol,
mutex_lock(&chip->audio_mutex);
- for (i = 0; i < 4; i++)
- val |= (unsigned int)ucontrol->value.iec958.status[i] << (i * 8);
+ for (i = 0; i < 4; i++) {
+ val |= (unsigned int)ucontrol->value.iec958.status[i] <<
+ (i * 8);
+ }
change = val != chip->spdif_status;
chip->spdif_status = val;
@@ -172,7 +177,7 @@ static int snd_bcm2835_spdif_default_put(struct snd_kcontrol *kcontrol,
}
static int snd_bcm2835_spdif_mask_info(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_info *uinfo)
+ struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
uinfo->count = 1;
@@ -180,7 +185,7 @@ static int snd_bcm2835_spdif_mask_info(struct snd_kcontrol *kcontrol,
}
static int snd_bcm2835_spdif_mask_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
+ struct snd_ctl_elem_value *ucontrol)
{
/*
* bcm2835 supports only consumer mode and sets all other format flags
--
2.19.1
reply other threads:[~2018-11-13 17:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=9e35c529cc004dca71227d34baed976e1eaa3b88.camel@gmail.com \
--to=arnold.chand@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=devel@driverdev.osuosl.org \
--cc=eric@anholt.net \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=stefan.wahren@i2se.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome