[alsa-devel] [PATCH v1 5/9] ALSA: hda - split snd_hda_codec_new function

Takashi Iwai tiwai at suse.de
Mon Feb 26 09:41:23 CET 2018


On Mon, 26 Feb 2018 09:33:01 +0100,
Ughreja, Rakesh A wrote:
> 
> 
> 
> >-----Original Message-----
> >From: Takashi Iwai [mailto:tiwai at suse.de]
> >Sent: Friday, February 23, 2018 10:22 PM
> >To: Ughreja, Rakesh A <rakesh.a.ughreja at intel.com>
> >Cc: alsa-devel at alsa-project.org; broonie at kernel.org;
> >liam.r.girdwood at linux.intel.com; Koul, Vinod <vinod.koul at intel.com>; Patches
> >Audio <patches.audio at intel.com>; pierre-louis.bossart at linux.intel.com
> >Subject: Re: [alsa-devel] [PATCH v1 5/9] ALSA: hda - split snd_hda_codec_new
> >function
> >
> >On Fri, 23 Feb 2018 09:12:26 +0100,
> >Rakesh Ughreja wrote:
> >>
> >> +int snd_hda_codec_device_new(struct hda_bus *bus, struct snd_card *card,
> >> +			unsigned int codec_addr, struct hda_codec *codec)
> >> +{
> >>  	char component[31];
> >
> >Unused after the patch?
> 
> We still use the component variable to construct the name, so I think we still
> need it. Following code,
> 
> +	sprintf(component, "hdaudioC%dD%d", card->number, codec_addr);
> +	err = snd_hdac_device_init(&codec->core, &bus->core, component,
> +				   codec_addr);

Ah yeah, I re-sused the variable for the name string.
It should have been named as "name" or such.


Takashi


More information about the Alsa-devel mailing list