From: Takashi Iwai Subject: Re: [PATCH v1 5/9] ALSA: hda - split snd_hda_codec_new function Date: Mon, 26 Feb 2018 09:41:23 +0100 Message-ID: References: <1519373550-2545-1-git-send-email-rakesh.a.ughreja@intel.com> <1519373550-2545-6-git-send-email-rakesh.a.ughreja@intel.com> <85DFEED57DC57344B2483EF7BF8CB60579B29AE3@BGSMSX104.gar.corp.intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id A2468267079 for ; Mon, 26 Feb 2018 09:41:24 +0100 (CET) In-Reply-To: <85DFEED57DC57344B2483EF7BF8CB60579B29AE3@BGSMSX104.gar.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: "Ughreja, Rakesh A" Cc: "alsa-devel@alsa-project.org" , "Koul, Vinod" , "pierre-louis.bossart@linux.intel.com" , "liam.r.girdwood@linux.intel.com" , Patches Audio , "broonie@kernel.org" List-Id: alsa-devel@alsa-project.org On Mon, 26 Feb 2018 09:33:01 +0100, Ughreja, Rakesh A wrote: > > > > >-----Original Message----- > >From: Takashi Iwai [mailto:tiwai@suse.de] > >Sent: Friday, February 23, 2018 10:22 PM > >To: Ughreja, Rakesh A > >Cc: alsa-devel@alsa-project.org; broonie@kernel.org; > >liam.r.girdwood@linux.intel.com; Koul, Vinod ; Patches > >Audio ; pierre-louis.bossart@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