[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4866acc8-e86e-4861-8430-4653d8fa5041@marliere.net>
Date: Thu, 1 Aug 2024 16:26:10 -0300
From: "Ricardo B. Marliere" <ricardo@...liere.net>
To: Abhishek Tamboli <abhishektamboli9@...il.com>
Cc: gregkh@...uxfoundation.org, skhan@...uxfoundation.org,
dan.carpenter@...aro.org, rbmarliere@...il.com, christophe.jaillet@...adoo.fr,
Chris.Wulff@...mp.com, linux-kernel-mentees@...ts.linuxfoundation.org,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] usb: gadget: u_audio: Use C99 syntax for array
initializers
On 2 Aug 24 00:32, Abhishek Tamboli wrote:
> Convert array initializers to C99 syntax by adding the '=' after
> each designated initializer.
>
> Fix the following smatch warnings:
>
> drivers/usb/gadget/function/u_audio.c:1117:20:
> warning: obsolete array initializer, use C99 syntax
> drivers/usb/gadget/function/u_audio.c:1124:28:
> warning: obsolete array initializer, use C99 syntax
> drivers/usb/gadget/function/u_audio.c:1131:19:
> warning: obsolete array initializer, use C99 syntax
> drivers/usb/gadget/function/u_audio.c:1138:27:
> warning: obsolete array initializer, use C99 syntax
> drivers/usb/gadget/function/u_audio.c:1145:25:
> warning: obsolete array initializer, use C99 syntax
>
> Also, fix two checkpatch.pl warnings:
>
> WARNING: please, no spaces at the start of a line
> + [UAC_FBACK_CTRL] = {$
>
> WARNING: please, no spaces at the start of a line
> + [UAC_MUTE_CTRL] = {$
>
> Signed-off-by: Abhishek Tamboli <abhishektamboli9@...il.com>
Reviewed-by: Ricardo B. Marliere <ricardo@...liere.net>
> ---
> Changes in v2:
> - Wrapped commit log to 75 columns
> - Fix checkpatch.pl warnings
>
> drivers/usb/gadget/function/u_audio.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/usb/gadget/function/u_audio.c b/drivers/usb/gadget/function/u_audio.c
> index 89af0feb7512..0b3b8adf00c0 100644
> --- a/drivers/usb/gadget/function/u_audio.c
> +++ b/drivers/usb/gadget/function/u_audio.c
> @@ -1114,35 +1114,35 @@ static int u_audio_rate_get(struct snd_kcontrol *kcontrol,
> }
>
> static struct snd_kcontrol_new u_audio_controls[] = {
> - [UAC_FBACK_CTRL] {
> + [UAC_FBACK_CTRL] = {
> .iface = SNDRV_CTL_ELEM_IFACE_PCM,
> .name = "Capture Pitch 1000000",
> .info = u_audio_pitch_info,
> .get = u_audio_pitch_get,
> .put = u_audio_pitch_put,
> },
> - [UAC_P_PITCH_CTRL] {
> + [UAC_P_PITCH_CTRL] = {
> .iface = SNDRV_CTL_ELEM_IFACE_PCM,
> .name = "Playback Pitch 1000000",
> .info = u_audio_pitch_info,
> .get = u_audio_pitch_get,
> .put = u_audio_pitch_put,
> },
> - [UAC_MUTE_CTRL] {
> + [UAC_MUTE_CTRL] = {
> .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
> .name = "", /* will be filled later */
> .info = u_audio_mute_info,
> .get = u_audio_mute_get,
> .put = u_audio_mute_put,
> },
> - [UAC_VOLUME_CTRL] {
> + [UAC_VOLUME_CTRL] = {
> .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
> .name = "", /* will be filled later */
> .info = u_audio_volume_info,
> .get = u_audio_volume_get,
> .put = u_audio_volume_put,
> },
> - [UAC_RATE_CTRL] {
> + [UAC_RATE_CTRL] = {
> .iface = SNDRV_CTL_ELEM_IFACE_PCM,
> .name = "", /* will be filled later */
> .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
> --
> 2.34.1
>
>
Powered by blists - more mailing lists