Message ID | 20240729174639.446105-1-abhishektamboli9@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | usb: gadget: u_audio: Use C99 syntax for array initializers | expand |
On Mon, Jul 29, 2024 at 11:16:39PM +0530, Abhishek Tamboli wrote: > Convert array initializers to C99 syntax by adding the '=' after each > designated initializer. This change resolves warnings from smatch > about obsolete array initializers. > > 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 > > Signed-off-by: Abhishek Tamboli <abhishektamboli9@gmail.com> > --- > drivers/usb/gadget/function/u_audio.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - This looks like a new version of a previously submitted patch, but you did not list below the --- line any changes from the previous version. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what needs to be done here to properly describe this. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot
diff --git a/drivers/usb/gadget/function/u_audio.c b/drivers/usb/gadget/function/u_audio.c index 89af0feb7512..47a1990743d8 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,
Convert array initializers to C99 syntax by adding the '=' after each designated initializer. This change resolves warnings from smatch about obsolete array initializers. 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 Signed-off-by: Abhishek Tamboli <abhishektamboli9@gmail.com> --- drivers/usb/gadget/function/u_audio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)