Re: ALSA: tons of false positives because of snd_ctl_find_id()

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

 



On Fri, Feb 02, 2018 at 06:07:14PM +0900, Takashi Sakamoto wrote:
> 
> In a design of ALSA control core, each element can be pointed according
> to data of 'struct snd_ctl_elem_id'. There're two independent ways to
> indicate arbitrary element:
>  1. by 'numerical ID' (.numid)
>  2. by a combination of 'interface' (.iface), 'device' (.device),
>     'sub device' (.subdevice), 'name' (.name) and 'index' (.index).
> 
> For our information, in ALSA control core, some elements with the same
> attributes are managed by data of 'struct snd_kcontrol'. I call it as
> 'element set'. The value of '.index' represents offset from the first
> element in the element set for a target element.
> 
> I don't get your concern clearly. But it's my pleasure that the above
> information will help you if you missed the two ways.
> 

Right.  Thanks.  I understood all that...

I've actually figured out a hack that will probably work fine to fix my
issue.  Smatch provides a way to hand edit the cross function DB:
http://repo.or.cz/smatch.git/blob/HEAD:/smatch_data/db/fixup_kernel.sh
I can probably solve this by adding a few lines of code to that file.
I'm testing it now.

What I was trying to say was even though we don't need to check .index
since we're not using it, it would simplify static analysis if we would
would set it to zero.  It shouldn't hurt anything since we're not going
to use it.

Anyway, leave it for now because I've got this easier hack around.

regards,
dan carpenter


_______________________________________________
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