Hello Julia, On Fri, Apr 25, 2014 at 8:03 PM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Fri, 25 Apr 2014, SF Markus Elfring wrote: > >> > The attached patch illustrated a number of them. >> >> How do you see the chances for generalisation of this concrete example? > > I think it should be quite straightforward. One either takes the > assignments out of the function and puts them into a structure > initializer, or if there is a structure initializer already, one cuts it > up into what is wanted for each of the separate functions. > > Maybe creating the name of the new structure is an issue? I didn't look > carefully enough to see if there was a pattern. > > julia
I'm glad to know that should be straightforward. To name the new structure I've been trying to deduce the naming scheme that the original driver author used to name the GPIO operations and following that convention. But if for the sake of simplicity we use a standard name that will be used on all drivers, that's ok too. After all the structures are static and later drivers maintainers can rename the structure if they want a more suitable name. Thanks a lot to Markus and you for the feedback. Now that I know that is possible, I'll study the SmPL grammar, look at the examples and ask silly questions here if I find issues :-) Best regards, Javier _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci