Re: [cocci] Analysis of device attribute usage with SmPL?

Markus Elfring <[email protected]>
Newsgroups fr.inria.cocci
Message-ID <[email protected]>
> I'd like to find the position of all functions assigned by DEVICE_ATTR_RO.

I guess that such a data processing idea will trigger further collateral evolution.


> So I thought to use a 1st rule to search for the identifier inside DEVICE_ATTR_RO,

In which files would you expect such an item (device attribute?) to be found?


> then use a 2nd rule to search for the inherited meta variable, concatenated with the fixed string "_show". Like:

Will a need evolve for further data processing steps?


> @device_attr_ro@
> declarer name DEVICE_ATTR_RO;
> identifier attr_name;
> @@
>   DEVICE_ATTR_RO(attr_name);

Can development interests eventually grow for imports of such information
into databases?


…>   attr_name ## "_show" @ p_fn (...) {...}     // invalid syntax, but you get the point
> 
> 
> This doesn't work and I couldn't figure how to do it correctly.
…

You probably know further programming interfaces which support the recombination
of captured data in various ways.

Regards,
Markus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.