Re: [PATCH 1/6] ALSA: hda: use list macro for parsing on cleanup

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

 



On Tue, Mar 15, 2016 at 11:00:53AM +0100, Takashi Iwai wrote:
> On Tue, 15 Mar 2016 10:57:11 +0100,
> Vinod Koul wrote:
> > 
> > It is always better to use list_for_each_entry_safe() while doing
> > cleanup. So use this instead of open coding this in list in
> > snd_hdac_stream_free_all()
> > 
> > Signed-off-by: Jeeja KP <jeeja.kp@xxxxxxxxx>
> > Signed-off-by: Vinod Koul <vinod.koul@xxxxxxxxx>
> 
> While this change is fine, we shouldn't trust blindly
> list_for_each_safe() as always safe.  It assumes that the list removal
> is done only for the current item.  But it's not always true.  The
> loop in the current code is one of standard idiom in such a case.

Yes thanks for the warning :)


> 
> In anyway, take my ack when Mark applies it:
>   Acked-by: Takashi Iwai <tiwai@xxxxxxx>

Will add this for v2

>-- 
~Vinod
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux