Re: [Cocci] sgen problems

2014-10-18 Thread Wolfram Sang
On Sat, Oct 18, 2014 at 08:02:00AM +0200, Julia Lawall wrote:
  @fix1_context depends on match1  !patch  (context || org || report)@
  identifier match1.__driver;
  position j0;
  @@
  
  *   static struct platform_driver __driver@j0 = {
  .driver = {
  .owner = THIS_MODULE,
  }
  };
  
  @fix2_context depends on match2  !patch  (context || org || report)@
  identifier match2.__driver;
  position j0;
  @@
  
  *   static struct platform_driver __driver@j0 = {
  .driver = {
  .owner = THIS_MODULE,
  }
  };
 
 In these cases, I think it would look nicer to put the *s and the @j0's 
 on .owner rather than at the start of the structure.

Is this a manual fix or a fix to sgen?

 Unless there is some situation in which the transformation is not 
 required, I think High confidence would be appropriate.

The calls I check for always set .owner. So it should be 'high', I'd
guess. However, if the behavioue of these calls are ever to be changed
there is a risk that this spatch gets not updated. More like a general
problem, though, which does not really influence the confidence.



signature.asc
Description: Digital signature
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] sgen problems

2014-10-17 Thread Julia Lawall
On Fri, 17 Oct 2014, Wolfram Sang wrote:

 Hi,

 so I was trying to convert my spatch from the platform-owner series to a
 Kernel-cocci with sgen. However, that didn't work and produced a corrupt
 cocci file (at least the name of the matching rules has been eaten). I
 used a self-compiled sgen from the Debian rc22. I attach the cocci and
 config file for easier reproducing. Does the sgen author read the list?
 Probably it would be easy to fix the broken file, but it seems more
 sustainable to me to fix the tool :)

I'm not sure whether the sgen author reads the list, but I will ask her to
fix the tool. Thanks very much for the feedback!

julia
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci