Re: [PATCH v2] staging: vc04_services: bcm2835-audio: Fixed warnings, checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2018-11-12 at 19:45 -0500, Arnold Chand wrote:
> Corrected warnings and checks provided by scripts/checkpatch.pl which
> includes: alignment of parenthesis, lines over 80 characters and mutex
> definition without comment.
[]
> diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
[]
> @@ -162,7 +163,8 @@ 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);
> +		val |= (unsigned int)ucontrol->value.iec958.status[i] <<
> +		       (i * 8);

Perhaps this should be

	val = get_unaligned_be32(ucontrol->value.iec958.status);


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux