staging: vc04_services: bcm2835-audio: Fixed warnings, checks
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 48 lines · Arnold Chand
Corrected warnings and checks issued by
scripts/checkpatch.plwhich includes:
alignment of
parenthesis, lines over 80 characters and mutex definition without comment.Signed-off-by Arnold Chand <[email protected]>---
.../vc04_services/bcm2835-audio/bcm2835-ctl.c| 18 +++---.../vc04_services/bcm2835-audio/bcm2835-pcm.c| 25 ++++---- .../bcm2835-audio/bcm2835-vchiq.c| 59 ++++++++++---------.../vc04_services/bcm2835-audio/bcm2835.h| 4 +- 4 files changed, 56
insertions(+), 50 deletions(-)drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.cindex renamed from drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c +0
-0
a6ec72a5f0be..04df4e7a1d24100644--- 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(structsnd_kcontrol*kcontrol, } static int snd_bcm2835_ctl_put(structsnd_kcontrol*kcontrol,-
structsnd_ctl_elem_value*ucontrol)+
structsnd_ctl_elem_value*ucontrol) { structbcm2835_chip*chip =snd_kcontrol_chip(kcontrol); int val, *valp;@@ -101,7 +101,8 @@ static const
structsnd_kcontrol_newsnd_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 +130,7 @@ static const struct
snd_kcontrol_newsnd_bcm2835_ctl[] = { }; static int snd_bcm2835_spdif_default_info(structsnd_kcontrol*kcontrol,-
structsnd_ctl_elem_info*uinfo)+ struc
tsnd_ctl_elem_info*uinfo) {uinfo->type=SNDRV_CTL_ELEM_TYPE_IEC958;uinfo->count= 1;@@ -137,7 +138,7 @@ static int snd_bcm2835_spdif_default_info(structsnd_kcontrol*kcontrol, } static int
snd_bcm2835_spdif_default_get(structsnd_kcontrol*kcontrol,- structsnd_ctl_elem_value*ucontrol)+ structsnd_ctl_elem_value*ucontrol) { structbcm2835_chip*chip =snd_kcontrol_chip(kcontrol); int i;@@ -153,7 +154,7 @@ static int
snd_bcm2835_spdif_default_get(structsnd_kcontrol*kcontrol, } static int
snd_bcm2835_spdif_default_put(structsnd_kcontrol*kcontrol,- structsnd_ctl_elem_value*ucontrol)+ structsnd_ctl_elem_value*ucontrol) { structbcm2835_chip*chip =snd_kcontrol_chip(kcontrol); unsigned int val = 0;@@ -162,7 +163,8 @@ static
int snd_bcm2835_spdif_default_put(structsnd_kcontrol*kcontrol,mutex_lock(&chip->audio_mutex); for (i = 0; i < 4; i++)- val |=
(unsigned int)ucontrol->value.iec958.status[i] << (i * 8);+ val |=
(unsigned int)ucontrol->value.iec958.status[i] <<+ (i *
8); change = val !=chip->spdif_status;chip->spdif_status= val;@@
-172,7 +174,7 @@ static int snd_bcm2835_spdif_default_put(structsnd_kcontrol*kcontrol, } static int snd_bcm2835_spdif_mask_info(structsnd_kcontrol
*kcontrol,- structsnd_ctl_elem_info*uinfo)+struct snd_ctl_elem_info *uinfo) { uinfo->type =
Quoted 12 lines
SNDRV_CTL_ELEM_TYPE_IEC958;uinfo->count= 1;@@ -180,7 +182,7 @@ static int
snd_bcm2835_spdif_mask_info(structsnd_kcontrol*kcontrol, } static int
snd_bcm2835_spdif_mask_get(structsnd_kcontrol*kcontrol,- structsnd_ctl_elem_value*ucontrol)+ structsnd_ctl_elem_value*ucontrol) { /* * bcm2835 supports only
consumer mode and sets all other format flagsdiff --gita/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.cb/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.cindexe66da11af5cf..68766e57f6e2100644--- a/drivers/staging/vc04_services/bcm2835- audio/bcm2835-pcm.c+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835- pcm.c@@ -81,17 +81,17 @@ void bcm2835_playback_fifo(structbcm2835_alsa_stream*alsa_stream, } /* open callback */-static int
<snip>
Something went really wrong with your email client here :(
Quoted 64 lines · On Mon, 2018-11-12 at 17:08 -0800, [email protected] wrote:
Quoted 60 lines · Arnold Chand
Corrected warnings and checks issued by
scripts/checkpatch.plwhich includes:
alignment of
parenthesis, lines over 80 characters and mutex definition without comment.Signed-off-by Arnold Chand <[email protected]>---
.../vc04_services/bcm2835-audio/bcm2835-ctl.c| 18 +++---.../vc04_services/bcm2835-audio/bcm2835-pcm.c| 25 ++++---- .../bcm2835-audio/bcm2835-vchiq.c| 59 ++++++++++---------.../vc04_services/bcm2835-audio/bcm2835.h| 4 +- 4 files changed, 56
insertions(+), 50 deletions(-)drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.cindex renamed from drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c +0
-0
a6ec72a5f0be..04df4e7a1d24100644--- 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(structsnd_kcontrol*kcontrol, } static int snd_bcm2835_ctl_put(structsnd_kcontrol*kcontrol,-
structsnd_ctl_elem_value*ucontrol)+
structsnd_ctl_elem_value*ucontrol) { structbcm2835_chip*chip =snd_kcontrol_chip(kcontrol); int val, *valp;@@ -101,7 +101,8 @@ static const
structsnd_kcontrol_newsnd_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 +130,7 @@ static const struct
snd_kcontrol_newsnd_bcm2835_ctl[] = { }; static int snd_bcm2835_spdif_default_info(structsnd_kcontrol*kcontrol,-
structsnd_ctl_elem_info*uinfo)+ struc
tsnd_ctl_elem_info*uinfo) {uinfo->type=SNDRV_CTL_ELEM_TYPE_IEC958;uinfo->count= 1;@@ -137,7 +138,7 @@ static int snd_bcm2835_spdif_default_info(structsnd_kcontrol*kcontrol, } static int
snd_bcm2835_spdif_default_get(structsnd_kcontrol*kcontrol,- structsnd_ctl_elem_value*ucontrol)+ structsnd_ctl_elem_value*ucontrol) { structbcm2835_chip*chip =snd_kcontrol_chip(kcontrol); int i;@@ -153,7 +154,7 @@ static int
snd_bcm2835_spdif_default_get(structsnd_kcontrol*kcontrol, } static int
snd_bcm2835_spdif_default_put(structsnd_kcontrol*kcontrol,- structsnd_ctl_elem_value*ucontrol)+ structsnd_ctl_elem_value*ucontrol) { structbcm2835_chip*chip =snd_kcontrol_chip(kcontrol); unsigned int val = 0;@@ -162,7 +163,8 @@ static
int snd_bcm2835_spdif_default_put(structsnd_kcontrol*kcontrol,mutex_lock(&chip->audio_mutex); for (i = 0; i < 4; i++)- val |=
(unsigned int)ucontrol->value.iec958.status[i] << (i * 8);+ val |=
(unsigned int)ucontrol->value.iec958.status[i] <<+ (i *
8); change = val !=chip->spdif_status;chip->spdif_status= val;@@
-172,7 +174,7 @@ static int snd_bcm2835_spdif_default_put(structsnd_kcontrol*kcontrol, } static int snd_bcm2835_spdif_mask_info(structsnd_kcontrol
*kcontrol,- structsnd_ctl_elem_info*uinfo)+struct snd_ctl_elem_info *uinfo) { uinfo->type =
SNDRV_CTL_ELEM_TYPE_IEC958;uinfo->count= 1;@@ -180,7 +182,7 @@ static int
snd_bcm2835_spdif_mask_info(structsnd_kcontrol*kcontrol, } static int
snd_bcm2835_spdif_mask_get(structsnd_kcontrol*kcontrol,- structsnd_ctl_elem_value*ucontrol)+ structsnd_ctl_elem_value*ucontrol) { /* * bcm2835 supports only
consumer mode and sets all other format flagsdiff --gita/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.cb/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.cindexe66da11af5cf..68766e57f6e2100644--- a/drivers/staging/vc04_services/bcm2835- audio/bcm2835-pcm.c+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835- pcm.c@@ -81,17 +81,17 @@ void bcm2835_playback_fifo(structbcm2835_alsa_stream*alsa_stream, } /* open callback */-static int<snip>
Quoted 1 line
Something went really wrong with your email client here :(
Sorry, still trying to fix the issue with git and gmail. Resending patch separately but only for one file.